[root@localhost shipin]# ffmpeg -i test.mp4 -strict -2 -vcodec libx264 -acodec opus -ac 1 opus-h264.mp4
ffmpeg version 59394826 Copyright (c) 2000-2020 the FFmpeg developers
built with gcc 8 (GCC)
configuration: --prefix=/usr/local/ffmpeg/ --enable-shared --enable-version3 --enable-gpl --enable-nonfree --enable-libx264 --enable-libfdk-aac --enable-libvpx --enable-libopus --extra-cflags=-I/usr/local/ffmpeg/include --extra-ldflags=-L/usr/local/ffmpeg/lib/ --extra-libs='-lopus -lx264 -lfdk-aac -lvpx'
WARNING: library configuration mismatch
avutil configuration: --prefix=/root/workspace/mediasoup-demo/server/node_modules/mediasoup/worker/deps/owt-server/./scripts/../build/libdeps/build/ --enable-shared --disable-static --enable-version3 --enable-gpl --enable-nonfree --enable-libx264 --enable-libfdk-aac --enable-libvpx --enable-libopus --disable-vaapi --enable-libfreetype --enable-nonfree
avcodec configuration: --prefix=/root/workspace/mediasoup-demo/server/node_modules/mediasoup/worker/deps/owt-server/./scripts/../build/libdeps/build/ --enable-shared --disable-static --enable-version3 --enable-gpl --enable-nonfree --enable-libx264 --enable-libfdk-aac --enable-libvpx --enable-libopus --disable-vaapi --enable-libfreetype --enable-nonfree
avformat configuration: --prefix=/root/workspace/mediasoup-demo/server/node_modules/mediasoup/worker/deps/owt-server/./scripts/../build/libdeps/build/ --enable-shared --disable-static --enable-version3 --enable-gpl --enable-nonfree --enable-libx264 --enable-libfdk-aac --enable-libvpx --enable-libopus --disable-vaapi --enable-libfreetype --enable-nonfree
avdevice configuration: --prefix=/root/workspace/mediasoup-demo/server/node_modules/mediasoup/worker/deps/owt-server/./scripts/../build/libdeps/build/ --enable-shared --disable-static --enable-version3 --enable-gpl --enable-nonfree --enable-libx264 --enable-libfdk-aac --enable-libvpx --enable-libopus --disable-vaapi --enable-libfreetype --enable-nonfree
avfilter configuration: --prefix=/root/workspace/mediasoup-demo/server/node_modules/mediasoup/worker/deps/owt-server/./scripts/../build/libdeps/build/ --enable-shared --disable-static --enable-version3 --enable-gpl --enable-nonfree --enable-libx264 --enable-libfdk-aac --enable-libvpx --enable-libopus --disable-vaapi --enable-libfreetype --enable-nonfree
swscale configuration: --prefix=/root/workspace/mediasoup-demo/server/node_modules/mediasoup/worker/deps/owt-server/./scripts/../build/libdeps/build/ --enable-shared --disable-static --enable-version3 --enable-gpl --enable-nonfree --enable-libx264 --enable-libfdk-aac --enable-libvpx --enable-libopus --disable-vaapi --enable-libfreetype --enable-nonfree
swresample configuration: --prefix=/root/workspace/mediasoup-demo/server/node_modules/mediasoup/worker/deps/owt-server/./scripts/../build/libdeps/build/ --enable-shared --disable-static --enable-version3 --enable-gpl --enable-nonfree --enable-libx264 --enable-libfdk-aac --enable-libvpx --enable-libopus --disable-vaapi --enable-libfreetype --enable-nonfree
postproc configuration: --prefix=/root/workspace/mediasoup-demo/server/node_modules/mediasoup/worker/deps/owt-server/./scripts/../build/libdeps/build/ --enable-shared --disable-static --enable-version3 --enable-gpl --enable-nonfree --enable-libx264 --enable-libfdk-aac --enable-libvpx --enable-libopus --disable-vaapi --enable-libfreetype --enable-nonfree
libavutil 56. 31.100 / 56. 51.100
libavcodec 58. 54.100 / 58. 91.100
libavformat 58. 29.100 / 58. 45.100
libavdevice 58. 8.100 / 58. 10.100
libavfilter 7. 57.100 / 7. 85.100
libswscale 5. 5.100 / 5. 7.100
libswresample 3. 5.100 / 3. 7.100
libpostproc 55. 5.100 / 55. 7.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'test.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
Duration: 00:00:55.96, start: 0.000000, bitrate: 298 kb/s
Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 640x360 [SAR 1:1 DAR 16:9], 261 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default)
Metadata:
handler_name : VideoHandler
Stream #0:1(eng): Audio: aac (HE-AAC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 31 kb/s (default)
Metadata:
handler_name : SoundHandler
File 'opus-h264.mp4' already exists. Overwrite ? [y/N] y
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
Stream #0:1 -> #0:1 (aac (native) -> opus (native))
Press [q] to stop, [?] for help
[graph 0 input from stream 0:0 @ 0xaa9f40] sws_param option is deprecated and ignored
[libx264 @ 0x753cc0] using SAR=1/1
[libx264 @ 0x753cc0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
[libx264 @ 0x753cc0] profile High, level 3.0, 4:2:0, 8-bit
[libx264 @ 0x753cc0] 264 - core 161 - H.264/MPEG-4 AVC codec - Copyleft 2003-2020 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=4 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, mp4, to 'opus-h264.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf58.45.100
Stream #0:0(und): Video: h264 (libx264) (avc1 / 0x31637661), yuv420p, 640x360 [SAR 1:1 DAR 16:9], q=-1--1, 25 fps, 12800 tbn, 25 tbc (default)
Metadata:
handler_name : VideoHandler
encoder : Lavc58.54.100 libx264
Side data:
cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: N/A
Stream #0:1(eng): Audio: opus (Opus / 0x7375704F), 48000 Hz, mono, fltp, 128 kb/s (default)
Metadata:
handler_name : SoundHandler
encoder : Lavc58.54.100 opus
frame= 1401 fps=241 q=-1.0 Lsize= 4298kB time=00:00:55.96 bitrate= 629.2kbits/s dup=2 drop=0 speed=9.62x
video:3392kB audio:877kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.666211%
[libx264 @ 0x753cc0] frame I:19 Avg QP:20.61 size: 20796
[libx264 @ 0x753cc0] frame P:540 Avg QP:24.01 size: 4305
[libx264 @ 0x753cc0] frame B:842 Avg QP:29.11 size: 895
[libx264 @ 0x753cc0] consecutive B-frames: 3.4% 47.4% 6.4% 42.8%
[libx264 @ 0x753cc0] mb I I16..4: 8.1% 40.4% 51.5%
[libx264 @ 0x753cc0] mb P I16..4: 1.8% 6.5% 2.4% P16..4: 41.1% 12.2% 6.0% 0.0% 0.0% skip:30.0%
[libx264 @ 0x753cc0] mb B I16..4: 0.2% 0.6% 0.2% B16..8: 25.4% 3.6% 0.7% direct: 0.7% skip:68.4% L0:40.4% L1:51.2% BI: 8.5%
[libx264 @ 0x753cc0] 8x8 transform intra:55.6% inter:56.2%
[libx264 @ 0x753cc0] coded y,uvDC,uvAC intra: 66.3% 67.9% 30.3% inter: 8.5% 8.5% 0.7%
[libx264 @ 0x753cc0] i16 v,h,dc,p: 42% 16% 9% 33%
[libx264 @ 0x753cc0] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 34% 17% 15% 4% 5% 7% 5% 7% 6%
[libx264 @ 0x753cc0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 33% 16% 13% 6% 6% 8% 6% 7% 5%
[libx264 @ 0x753cc0] i8c dc,h,v,p: 49% 16% 27% 8%
[libx264 @ 0x753cc0] Weighted P-Frames: Y:1.7% UV:0.7%
[libx264 @ 0x753cc0] ref P L0: 63.3% 20.8% 12.3% 3.6% 0.0%
[libx264 @ 0x753cc0] ref B L0: 89.2% 9.4% 1.3%
[libx264 @ 0x753cc0] ref B L1: 99.5% 0.5%
[libx264 @ 0x753cc0] kb/s:495.77
[opus @ 0x792fc0] Average Intensity Stereo band: 21.0
[opus @ 0x792fc0] Dual Stereo used: 0.00%
[root@localhost shipin]#
[root@localhost shipin]#
[root@localhost shipin]#
[root@localhost shipin]#
[root@localhost shipin]#
[root@localhost shipin]# ffprobe opus-h264.mp4
ffprobe version ffc5cf6 Copyright (c) 2007-2020 the FFmpeg developers
built with gcc 8 (GCC)
configuration:
libavutil 56. 31.100 / 56. 31.100
libavcodec 58. 54.100 / 58. 54.100
libavformat 58. 29.100 / 58. 29.100
libavdevice 58. 8.100 / 58. 8.100
libavfilter 7. 57.100 / 7. 57.100
libswscale 5. 5.100 / 5. 5.100
libswresample 3. 5.100 / 3. 5.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'opus-h264.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf58.45.100
Duration: 00:00:56.04, start: 0.000000, bitrate: 628 kb/s
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 640x360 [SAR 1:1 DAR 16:9], 495 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default)
Metadata:
handler_name : VideoHandler
Stream #0:1(eng): Audio: opus (Opus / 0x7375704F), 48000 Hz, mono, fltp, 128 kb/s (default)
Metadata:
handler_name : SoundHandler
[root@localhost shipin]#
[root@localhost shipin]#
ffmpeg -i opus-h264.mp4 -strict -2 -vcodec libx264 -acodec aac aac-h264.mp4