[FFmpeg-user] Confusion about vorbis audio for mkv output

Ulf Zibis Ulf.Zibis at CoSoCo.de
Thu Feb 18 02:04:41 EET 2021


Am 18.02.21 um 00:52 schrieb Paul B Mahol:
> On Thu, Feb 18, 2021 at 12:50 AM Ulf Zibis <Ulf.Zibis at cosoco.de> wrote:
>
>> Hi,
>>
>> Using the following command I get an error:
>>
>> The encoder 'vorbis' is experimental but experimental codecs are not
>> enabled, add '-strict -2' if you want to use it.
>>
>> I'm also missing '-strict -2' at
>> https://ffmpeg.org/ffmpeg-all.html#Codec-Options
>>
>> $ ~/Projects/ffmpeg/dev_2/ffmpeg -i INPUT_2.mkv -i Musik.mkv -map 0:v -map
>> 1:a -c:v copy -c:a vorbis INPUT_3.mkv
>> ffmpeg version N-101141-g8331eb058d Copyright (c) 2000-2021 the FFmpeg
>> developers
>>     built with gcc 9 (Ubuntu 9.3.0-17ubuntu1~20.04)
>>     configuration:
>>     libavutil      56. 65.100 / 56. 65.100
>>     libavcodec     58.123.100 / 58.123.100
>>     libavformat    58. 67.100 / 58. 67.100
>>     libavdevice    58. 12.100 / 58. 12.100
>>     libavfilter     7.107.100 /  7.107.100
>>     libswscale      5.  8.100 /  5.  8.100
>>     libswresample   3.  8.100 /  3.  8.100
>> Input #0, matroska,webm, from 'INPUT_2.mkv':
>>     Metadata:
>>       SOURCE_TYPE     : dvd
>>       ENCODER         : Lavf58.67.100
>>     Duration: 01:31:56.13, start: 0.000000, bitrate: 114 kb/s
>>     Chapters:
>>       Chapter #0:0: start 0.000000, end 10.911556
>>       Chapter #0:1: start 10.911556, end 819.225778
>>       Chapter #0:2: start 819.225778, end 1839.369956
>>       Chapter #0:3: start 1839.369956, end 2689.490133
>>       Chapter #0:4: start 2689.490133, end 3289.574978
>>       Chapter #0:5: start 3289.574978, end 4584.758089
>>       Chapter #0:6: start 4584.758089, end 5516.019689
>>     Stream #0:0: Video: mpeg4 (Simple Profile), yuv420p(progressive), 16x16
>> [SAR 16:15 DAR 16:15], 25 fps, 25 tbr, 1k tbn, 25 tbc (default)
>>       Metadata:
>>         ENCODER         : Lavc58.123.100 mpeg4
>>         DURATION        : 01:31:56.120000000
>>     Stream #0:1(deu): Audio: vorbis, 48000 Hz, stereo, fltp (default)
>>       Metadata:
>>         LANGUAGE-ISO639_2: deu
>>         LANGUAGE-SIMPLE : Deutsch
>>         LANGUAGE-DESCRIPTION: Deutsch
>>         ENCODER         : Lavc58.18.100 libvorbis
>>         DURATION        : 01:31:56.130000000
>> [matroska,webm @ 0x5556cb1e5a80] Could not find codec parameters for
>> stream 0 (Video: h264, none, 426x240): unspecified pixel format
>> Consider increasing the value for the 'analyzeduration' (0) and
>> 'probesize' (5000000) options
>> Input #1, matroska,webm, from Musik.mkv':
>>     Metadata:
>>       ENCODER         : Lavf58.16.100
>>     Duration: 01:56:18.94, start: -0.007000, bitrate: 108 kb/s
>>     Stream #1:0: Video: h264, none, 426x240, 1k tbr, 1k tbn, 2k tbc
>> (default)
>>       Metadata:
>>         HANDLER_NAME    : ISO Media file produced by Google Inc. Created
>> on: 04/18/2020.
>>         DURATION        : 00:00:00.000000000
>>     Stream #1:1(eng): Audio: opus, 48000 Hz, stereo, fltp (default)
>>       Metadata:
>>         DURATION        : 01:56:18.941000000
>> File 'INPUT_3.mkv' already exists. Overwrite? [y/N] y
>> Stream mapping:
>>     Stream #0:0 -> #0:0 (copy)
>>     Stream #1:1 -> #0:1 (opus (native) -> vorbis (native))
>> Press [q] to stop, [?] for help
>> [vorbis @ 0x5556cb205880] The encoder 'vorbis' is experimental but
>> experimental codecs are not enabled, add '-strict -2' if you want to use it.
>> Conversion failed!
>>
>> But when I transcode a mpg video to mkv, then automatically a vorbis audio
>> stream is created, even it is stated "experimental":
>>
>> $ ffmpeg -i Kiosk\ Mozartstr.\ -\ Andreas.mpg
>> Kiosk\ Mozartstr.\ -\ Andreas.mkv
>> ffmpeg version 4.3.1-static https://johnvansickle.com/ffmpeg/ Copyright
>> (c) 2000-2020 the FFmpeg developers
>>     built with gcc 8 (Debian 8.3.0-6)
>>     configuration: --enable-gpl --enable-version3 --enable-static
>> --disable-debug --disable-ffplay --disable-indev=sndio
>> --disable-outdev=sndio --cc=gcc --enable-fontconfig --enable-frei0r
>> --enable-gnutls --enable-gmp --enable-libgme --enable-gray --enable-libaom
>> --enable-libfribidi --enable-libass --enable-libvmaf --enable-libfreetype
>> --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb
>> --enable-libopenjpeg --enable-librubberband --enable-libsoxr
>> --enable-libspeex --enable-libsrt --enable-libvorbis --enable-libopus
>> --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc
>> --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265
>> --enable-libxml2 --enable-libdav1d --enable-libxvid --enable-libzvbi
>> --enable-libzimg
>>     libavutil      56. 51.100 / 56. 51.100
>>     libavcodec     58. 91.100 / 58. 91.100
>>     libavformat    58. 45.100 / 58. 45.100
>>     libavdevice    58. 10.100 / 58. 10.100
>>     libavfilter     7. 85.100 /  7. 85.100
>>     libswscale      5.  7.100 /  5.  7.100
>>     libswresample   3.  7.100 /  3.  7.100
>>     libpostproc    55.  7.100 / 55.  7.100
>> Input #0, mpeg, from 'Kiosk Mozartstr. - Andreas.mpg':
>>     Duration: 00:26:00.49, start: 0.529989, bitrate: 1793 kb/s
>>       Stream #0:0[0x1e0]: Video: mpeg2video (Main), yuv420p(tv, bt470bg,
>> progressive), 352x288 [SAR 12:11 DAR 4:3], 25 fps, 25 tbr, 90k tbn, 50 tbc
>>       Side data:
>>         cpb: bitrate max/min/avg: 9578800/0/0 buffer size: 1835008
>> vbv_delay: N/A
>>       Stream #0:1[0x1c0]: Audio: mp2, 48000 Hz, stereo, s16p, 384 kb/s
>> File 'Kiosk Mozartstr. - Andreas.mkv' already exists. Overwrite? [y/N] y
>> Stream mapping:
>>     Stream #0:0 -> #0:0 (mpeg2video (native) -> h264 (libx264))
>>     Stream #0:1 -> #0:1 (mp2 (native) -> vorbis (libvorbis))
>> Press [q] to stop, [?] for help
>> [libx264 @ 0x66c8ac0] using SAR=12/11
>> [libx264 @ 0x66c8ac0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.1
>> Cache64
>> [libx264 @ 0x66c8ac0] profile High, level 1.3, 4:2:0, 8-bit
>> [libx264 @ 0x66c8ac0] 264 - core 161 r3018 db0d417 - 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=3
>> 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, matroska, to 'Kiosk Mozartstr. - Andreas.mkv':
>>     Metadata:
>>       encoder         : Lavf58.45.100
>>       Stream #0:0: Video: h264 (libx264) (H264 / 0x34363248), yuv420p,
>> 352x288 [SAR 12:11 DAR 4:3], q=-1--1, 25 fps, 1k tbn, 25 tbc
>>       Metadata:
>>         encoder         : Lavc58.91.100 libx264
>>       Side data:
>>         cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: N/A
>>       Stream #0:1: Audio: vorbis (libvorbis) (oV[0][0] / 0x566F), 48000 Hz,
>> stereo, fltp
>>       Metadata:
>>         encoder         : Lavc58.91.100 libvorbis
>> frame=39012 fps= 50 q=-1.0 Lsize=  142440kB time=00:26:00.36 bitrate=
>> 747.8kbits/s speed=2.02x
>> video:126928kB audio:14674kB subtitle:0kB other streams:0kB global
>> headers:4kB muxing overhead: 0.591646%
>> [libx264 @ 0x66c8ac0] frame I:303   Avg QP:22.95  size: 18951
>> [libx264 @ 0x66c8ac0] frame P:10864 Avg QP:25.32  size:  7268
>> [libx264 @ 0x66c8ac0] frame B:27845 Avg QP:28.91  size:  1626
>> [libx264 @ 0x66c8ac0] consecutive B-frames:  1.9%  3.2% 16.8% 78.1%
>> [libx264 @ 0x66c8ac0] mb I  I16..4:  2.3% 87.0% 10.7%
>> [libx264 @ 0x66c8ac0] mb P  I16..4:  0.5%  8.9%  1.0%  P16..4: 41.9% 28.0%
>> 18.0%  0.0%  0.0%    skip: 1.7%
>> [libx264 @ 0x66c8ac0] mb B  I16..4:  0.1%  1.0%  0.1%  B16..8: 48.1%
>> 7.8%  2.1%  direct: 7.6%  skip:33.4%  L0:36.1% L1:39.8% BI:24.1%
>> [libx264 @ 0x66c8ac0] 8x8 transform intra:86.3% inter:80.9%
>> [libx264 @ 0x66c8ac0] coded y,uvDC,uvAC intra: 87.5% 88.2% 46.9% inter:
>> 32.6% 47.2% 4.6%
>> [libx264 @ 0x66c8ac0] i16 v,h,dc,p: 26% 32% 12% 30%
>> [libx264 @ 0x66c8ac0] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 18% 19% 26% 5%  6%
>> 6%  6%  6%  8%
>> [libx264 @ 0x66c8ac0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 20% 20% 13% 6%  8%
>> 8%  9%  7%  8%
>> [libx264 @ 0x66c8ac0] i8c dc,h,v,p: 56% 19% 17%  8%
>> [libx264 @ 0x66c8ac0] Weighted P-Frames: Y:4.4% UV:1.8%
>> [libx264 @ 0x66c8ac0] ref P L0: 44.6% 15.3% 31.0%  8.8%  0.3%
>> [libx264 @ 0x66c8ac0] ref B L0: 84.6% 13.4%  2.0%
>> [libx264 @ 0x66c8ac0] ref B L1: 96.0%  4.0%
>> [libx264 @ 0x66c8ac0] kb/s:666.33
>>
>> How can that be?
>>
> Carefully read text next time before posting.
>
> libvorbis != vorbis.

When I use
-c:a libvorbis
I get
Unknown encoder 'libvorbis'

What does '-strict -2' mean?
It is missing at
https://ffmpeg.org/ffmpeg-all.html#Codec-Options

-Ulf



More information about the ffmpeg-user mailing list