laitimes

Convert mp3 and mp4 formats to Ogg Vorbis format on UnionTech UOS1060

author:Master Peng operation and maintenance

Original link: Convert mp3 and mp4 formats to Ogg Vorbis format on UnionTech UOS1060

Hello, everyone, today I will introduce you to an article to convert mp3 and mp4 formats to Ogg Vorbis format on UnionTech UOS1060, so what is Ogg Vorbis? Ogg Vorbis is an open, free audio coding format designed to provide high-quality audio compression. Its name consists of two parts:

  1. Ogg: Ogg is an open container format for encapsulating audio and video data. It is similar to container formats such as MP3, MP4, etc., but unlike these formats, Ogg is a free and open standard with no patent restrictions.
  1. Vorbis: Vorbis is an audio codec used for audio coding in Ogg containers. It is designed to provide audio compression with high sound quality without introducing a lot of distortion. Ogg Vorbis audio files usually have better sound quality than MP3 files with the same bitrate.

Developed by the Xiph.Org Foundation, Ogg Vorbis is a completely open audio coding standard with no patent restrictions and therefore free to use. It is widely used in many open source and freeware projects and can also be used in commercial applications. Due to its openness and high sound quality, Ogg Vorbis used to be one of the preferred formats for many free and open-source audio players.

1. View the system version information

root@uos-PC:~# uname -a
Linux uos-PC 4.19.0-arm64-desktop #6030 SMP Tue Jun 27 15:28:10 CST 2023 aarch64 GNU/Linux
root@uos-PC:~# 
root@uos-PC:~# 
root@uos-PC:~# cat /etc/os-version 
[Version] 
SystemName=UOS Desktop
SystemName[zh_CN]=统信桌面操作系统
ProductType=Desktop
ProductType[zh_CN]=桌面
EditionName=Professional
EditionName[zh_CN]=专业版
MajorVersion=20
MinorVersion=1060
OsBuild=11014.100.100
root@uos-PC:~#            
Convert mp3 and mp4 formats to Ogg Vorbis format on UnionTech UOS1060

2. Install FFMPEG software

root@uos-PC:~# sudo apt-get install ffmpeg
正在读取软件包列表... 完成
正在分析软件包的依赖关系树 
正在读取状态信息... 完成 
下列软件包是自动安装的并且现在不需要了:
libutempter0 squashfs-tools x11-apps x11-session-utils xbitmaps xinit
使用'sudo apt autoremove'来卸载它(它们)。
将会同时安装下列软件:
libavcodec58 libavdevice58 libavfilter7 libavformat58 libavresample4 libavutil56 libpostproc55
libswresample3 libswscale5
建议安装:
ffmpeg-doc
下列软件包将被升级:
ffmpeg libavcodec58 libavdevice58 libavfilter7 libavformat58 libavresample4 libavutil56 libpostproc55
libswresample3 libswscale5
升级了 10 个软件包,新安装了 0 个软件包,要卸载 0 个软件包,有 115 个软件包未被升级。
需要下载 8,697 kB 的归档。
解压缩后会消耗 6,144 B 的额外空间。
您希望继续执行吗? [Y/n] y
获取:1 https://professional-packages.chinauos.com/desktop-professional eagle/main arm64 ffmpeg arm64 7:4.1.9.12-deepin12 [1,431 kB]
获取:2 https://professional-packages.chinauos.com/desktop-professional eagle/main arm64 libavdevice58 arm64 7:4.1.9.12-deepin12 [128 kB]
获取:3 https://professional-packages.chinauos.com/desktop-professional eagle/main arm64 libavfilter7 arm64 7:4.1.9.12-deepin12 [963 kB]
获取:4 https://professional-packages.chinauos.com/desktop-professional eagle/main arm64 libswscale5 arm64 7:4.1.9.12-deepin12 [187 kB]
获取:5 https://professional-packages.chinauos.com/desktop-professional eagle/main arm64 libavformat58 arm64 7:4.1.9.12-deepin12 [965 kB]
获取:6 https://professional-packages.chinauos.com/desktop-professional eagle/main arm64 libavcodec58 arm64 7:4.1.9.12-deepin12 [4,484 kB]
获取:7 https://professional-packages.chinauos.com/desktop-professional eagle/main arm64 libswresample3 arm64 7:4.1.9.12-deepin12 [105 kB]
获取:8 https://professional-packages.chinauos.com/desktop-professional eagle/main arm64 libpostproc55 arm64 7:4.1.9.12-deepin12 [92.3 kB]
获取:9 https://professional-packages.chinauos.com/desktop-professional eagle/main arm64 libavresample4 arm64 7:4.1.9.12-deepin12 [98.6 kB]
获取:10 https://professional-packages.chinauos.com/desktop-professional eagle/main arm64 libavutil56 arm64 7:4.1.9.12-deepin12 [243 kB]
已下载 8,697 kB,耗时 10秒 (858 kB/s) 
(正在读取数据库 ... 系统当前共安装有 198266 个文件和目录。)
准备解压 .../0-ffmpeg_7%3a4.1.9.12-deepin12_arm64.deb ...
正在解压 ffmpeg (7:4.1.9.12-deepin12) 并覆盖 (7:4.1.9.9-deepin9) ...
/var/cache/apt/archives/ffmpeg_7%3a4.1.9.12-deepin12_arm64.deb
准备解压 .../1-libavdevice58_7%3a4.1.9.12-deepin12_arm64.deb ...
正在解压 libavdevice58:arm64 (7:4.1.9.12-deepin12) 并覆盖 (7:4.1.9.9-deepin9) ...
/var/cache/apt/archives/libavdevice58_7%3a4.1.9.12-deepin12_arm64.deb
准备解压 .../2-libavfilter7_7%3a4.1.9.12-deepin12_arm64.deb ...
正在解压 libavfilter7:arm64 (7:4.1.9.12-deepin12) 并覆盖 (7:4.1.9.9-deepin9) ...
/var/cache/apt/archives/libavfilter7_7%3a4.1.9.12-deepin12_arm64.deb
准备解压 .../3-libswscale5_7%3a4.1.9.12-deepin12_arm64.deb ...
正在解压 libswscale5:arm64 (7:4.1.9.12-deepin12) 并覆盖 (7:4.1.9.9-deepin9) ...
/var/cache/apt/archives/libswscale5_7%3a4.1.9.12-deepin12_arm64.deb
准备解压 .../4-libavformat58_7%3a4.1.9.12-deepin12_arm64.deb ...
正在解压 libavformat58:arm64 (7:4.1.9.12-deepin12) 并覆盖 (7:4.1.9.9-deepin9) ...
/var/cache/apt/archives/libavformat58_7%3a4.1.9.12-deepin12_arm64.deb
准备解压 .../5-libavcodec58_7%3a4.1.9.12-deepin12_arm64.deb ...
正在解压 libavcodec58:arm64 (7:4.1.9.12-deepin12) 并覆盖 (7:4.1.9.9-deepin9) ...
/var/cache/apt/archives/libavcodec58_7%3a4.1.9.12-deepin12_arm64.deb
准备解压 .../6-libswresample3_7%3a4.1.9.12-deepin12_arm64.deb ...
正在解压 libswresample3:arm64 (7:4.1.9.12-deepin12) 并覆盖 (7:4.1.9.9-deepin9) ...
/var/cache/apt/archives/libswresample3_7%3a4.1.9.12-deepin12_arm64.deb
准备解压 .../7-libpostproc55_7%3a4.1.9.12-deepin12_arm64.deb ...
正在解压 libpostproc55:arm64 (7:4.1.9.12-deepin12) 并覆盖 (7:4.1.9.9-deepin9) ...
/var/cache/apt/archives/libpostproc55_7%3a4.1.9.12-deepin12_arm64.deb
准备解压 .../8-libavresample4_7%3a4.1.9.12-deepin12_arm64.deb ...
正在解压 libavresample4:arm64 (7:4.1.9.12-deepin12) 并覆盖 (7:4.1.9.9-deepin9) ...
/var/cache/apt/archives/libavresample4_7%3a4.1.9.12-deepin12_arm64.deb
准备解压 .../9-libavutil56_7%3a4.1.9.12-deepin12_arm64.deb ...
正在解压 libavutil56:arm64 (7:4.1.9.12-deepin12) 并覆盖 (7:4.1.9.9-deepin9) ...
/var/cache/apt/archives/libavutil56_7%3a4.1.9.12-deepin12_arm64.deb
正在设置 libavutil56:arm64 (7:4.1.9.12-deepin12) ...
正在设置 libpostproc55:arm64 (7:4.1.9.12-deepin12) ...
正在设置 libswscale5:arm64 (7:4.1.9.12-deepin12) ...
正在设置 libswresample3:arm64 (7:4.1.9.12-deepin12) ...
正在设置 libavresample4:arm64 (7:4.1.9.12-deepin12) ...
正在设置 libavcodec58:arm64 (7:4.1.9.12-deepin12) ...
正在设置 libavformat58:arm64 (7:4.1.9.12-deepin12) ...
正在设置 libavfilter7:arm64 (7:4.1.9.12-deepin12) ...
正在设置 libavdevice58:arm64 (7:4.1.9.12-deepin12) ...
正在设置 ffmpeg (7:4.1.9.12-deepin12) ...
正在处理用于 man-db (2.8.5-2) 的触发器 ...
正在处理用于 libc-bin (2.28.23-deepin1) 的触发器 ...
root@uos-PC:~#            
Convert mp3 and mp4 formats to Ogg Vorbis format on UnionTech UOS1060

3. Record MP4 format video

Convert mp3 and mp4 formats to Ogg Vorbis format on UnionTech UOS1060

4. The recording is complete

Convert mp3 and mp4 formats to Ogg Vorbis format on UnionTech UOS1060

5. Convert mp4 format video to Ogg Vorbis file

  • -i input.mp4: Specifies the file name of the input MP4 file.
  • -vn: Indicates that you do not include the video stream, only convert audio.
  • -c:a libvorbis: Specifies that the Ogg Vorbis encoder is used for audio encoding.
  • output.ogg: Specifies the file name of the output Ogg Vorbis file.
uos@uos-PC:~/Desktop$ ls -ltr
总用量 200
-rw-r--r-- 1 uos uos 623 9月 25 15:23 deepin-tooltips.desktop
-rw-r--r-- 1 uos uos 5235 9月 25 15:23 dde-trash.desktop
-rw-r--r-- 1 uos uos 3618 9月 25 15:23 dde-home.desktop
-rw-r--r-- 1 uos uos 6777 9月 25 15:23 dde-computer.desktop
-rw-r--r-- 1 uos uos 180209 9月 26 15:25 录屏_dde-desktop_20230926152519.mp4
uos@uos-PC:~/Desktop$ mv 录屏_dde-desktop_20230926152519.mp4 test.mp4
uos@uos-PC:~/Desktop$ ls -ltr
总用量 200
-rw-r--r-- 1 uos uos 623 9月 25 15:23 deepin-tooltips.desktop
-rw-r--r-- 1 uos uos 5235 9月 25 15:23 dde-trash.desktop
-rw-r--r-- 1 uos uos 3618 9月 25 15:23 dde-home.desktop
-rw-r--r-- 1 uos uos 6777 9月 25 15:23 dde-computer.desktop
-rw-r--r-- 1 uos uos 180209 9月 26 15:25 test.mp4
uos@uos-PC:~/Desktop$ ffmpeg -i test.mp4 -vn -c:a libvorbis output.ogg
ffmpeg version 4.1.9-deepin12 Copyright (c) 2000-2022 the FFmpeg developers
built with gcc 8 (Uos 8.3.0.10-deepin1)
configuration: --prefix=/usr --extra-version=deepin12 --toolchain=hardened --libdir=/usr/lib/aarch64-linux-gnu --incdir=/usr/include/aarch64-linux-gnu --arch=arm64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-ftomx --enable-openal --enable-opengl --enable-sdl2 --enable-libdavs2 --enable-libxavs2 --enable-vaapi --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
libavutil 56. 22.100 / 56. 22.100
libavcodec 58. 35.100 / 58. 35.100
libavformat 58. 20.100 / 58. 20.100
libavdevice 58. 5.100 / 58. 5.100
libavfilter 7. 40.101 / 7. 40.101
libavresample 4. 0. 0 / 4. 0. 0
libswscale 5. 3.100 / 5. 3.100
libswresample 3. 3.100 / 3. 3.100
libpostproc 55. 3.100 / 55. 3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'test.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf58.20.100
Duration: 00:00:01.27, start: 0.000000, bitrate: 1135 kb/s
Stream #0:0(und): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 1920x1080, 2091 kb/s, 23.98 fps, 23.98 tbr, 24k tbn, 47.95 tbc (default)
Metadata:
handler_name : VideoHandler
Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 23 kb/s (default)
Metadata:
handler_name : SoundHandler
Stream mapping:
Stream #0:1 -> #0:0 (aac (native) -> vorbis (libvorbis))
Press [q] to stop, [?] for help
Output #0, ogg, to 'output.ogg':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf58.20.100
Stream #0:0(und): Audio: vorbis (libvorbis), 44100 Hz, stereo, fltp (default)
Metadata:
handler_name : SoundHandler
encoder : Lavc58.35.100 libvorbis
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
size= 6kB time=00:00:01.25 bitrate= 38.6kbits/s speed= 151x 
video:0kB audio:2kB subtitle:0kB other streams:0kB global headers:4kB muxing overhead: 228.385696%
uos@uos-PC:~/Desktop$            
Convert mp3 and mp4 formats to Ogg Vorbis format on UnionTech UOS1060

6. Put the mp3 format file on the desktop

Convert mp3 and mp4 formats to Ogg Vorbis format on UnionTech UOS1060

7. Convert mp3 format files into Ogg Vorbis files

  • -i input.mp3: Specifies the file name of the input MP3 file.
  • -c:a libvorbis: Specifies that the Ogg Vorbis encoder is used for audio encoding.
  • output.ogg: Specifies the file name of the output Ogg Vorbis file.
uos@uos-PC:~/Desktop$ ls -tlr
总用量 252
-rw-r--r-- 1 uos uos 623 9月 25 15:23 deepin-tooltips.desktop
-rw-r--r-- 1 uos uos 5235 9月 25 15:23 dde-trash.desktop
-rw-r--r-- 1 uos uos 3618 9月 25 15:23 dde-home.desktop
-rw-r--r-- 1 uos uos 6777 9月 25 15:23 dde-computer.desktop
-rw-r--r-- 1 uos uos 180209 9月 26 15:25 test.mp4
-rw-r--r-- 1 uos uos 6062 9月 26 15:26 output.ogg
-rw-r--r-- 1 uos uos 42093 9月 26 15:29 test.mp3
uos@uos-PC:~/Desktop$ ffmpeg -i test.mp3 -c:a libvorbis outputtest.ogg
ffmpeg version 4.1.9-deepin12 Copyright (c) 2000-2022 the FFmpeg developers
built with gcc 8 (Uos 8.3.0.10-deepin1)
configuration: --prefix=/usr --extra-version=deepin12 --toolchain=hardened --libdir=/usr/lib/aarch64-linux-gnu --incdir=/usr/include/aarch64-linux-gnu --arch=arm64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-ftomx --enable-openal --enable-opengl --enable-sdl2 --enable-libdavs2 --enable-libxavs2 --enable-vaapi --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
libavutil 56. 22.100 / 56. 22.100
libavcodec 58. 35.100 / 58. 35.100
libavformat 58. 20.100 / 58. 20.100
libavdevice 58. 5.100 / 58. 5.100
libavfilter 7. 40.101 / 7. 40.101
libavresample 4. 0. 0 / 4. 0. 0
libswscale 5. 3.100 / 5. 3.100
libswresample 3. 3.100 / 3. 3.100
libpostproc 55. 3.100 / 55. 3.100
[mp3 @ 0xaaaabcd40b80] Estimating duration from bitrate, this may be inaccurate
Input #0, mp3, from 'test.mp3': 
Metadata:
encoder : Lavf57.71.100
Duration: 00:00:05.26, start: 0.000000, bitrate: 64 kb/s
Stream #0:0: Audio: mp3, 16000 Hz, mono, fltp, 64 kb/s
Stream mapping:
Stream #0:0 -> #0:0 (mp3 (mp3float) -> vorbis (libvorbis))
Press [q] to stop, [?] for help
Output #0, ogg, to 'outputtest.ogg':
Metadata:
encoder : Lavf58.20.100
Stream #0:0: Audio: vorbis (libvorbis), 16000 Hz, mono, fltp
Metadata:
encoder : Lavc58.35.100 libvorbis
size= 22kB time=00:00:05.24 bitrate= 35.0kbits/s speed= 359x 
video:0kB audio:19kB subtitle:0kB other streams:0kB global headers:3kB muxing overhead: 19.624413%
uos@uos-PC:~/Desktop$            
Convert mp3 and mp4 formats to Ogg Vorbis format on UnionTech UOS1060

8. The conversion is complete

uos@uos-PC:~/Desktop$ ls -ltr
总用量 276
-rw-r--r-- 1 uos uos 623 9月 25 15:23 deepin-tooltips.desktop
-rw-r--r-- 1 uos uos 5235 9月 25 15:23 dde-trash.desktop
-rw-r--r-- 1 uos uos 3618 9月 25 15:23 dde-home.desktop
-rw-r--r-- 1 uos uos 6777 9月 25 15:23 dde-computer.desktop
-rw-r--r-- 1 uos uos 180209 9月 26 15:25 test.mp4
-rw-r--r-- 1 uos uos 6062 9月 26 15:26 output.ogg
-rw-r--r-- 1 uos uos 42093 9月 26 15:29 test.mp3
-rw-r--r-- 1 uos uos 22932 9月 26 15:30 outputtest.ogg
uos@uos-PC:~/Desktop$            
Convert mp3 and mp4 formats to Ogg Vorbis format on UnionTech UOS1060