[FFmpeg-trac] #3091(undetermined:new): High Bitrate I-frame CBR MPEG encoding causes error

FFmpeg trac at avcodec.org
Thu Nov 7 05:23:39 CET 2013


#3091: High Bitrate I-frame CBR MPEG encoding causes error
-------------------------------------+-------------------------------------
             Reporter:  ortoni       |                    Owner:
                 Type:  defect       |                   Status:  new
             Priority:  normal       |                Component:
              Version:  unspecified  |  undetermined
             Keywords:               |               Resolution:
             Blocking:               |               Blocked By:
Analyzed by developer:  0            |  Reproduced by developer:  0
-------------------------------------+-------------------------------------

Comment (by ortoni):

 Sorry was following your exact CLI above - thought that was odd. Correct
 output below, seems unchanged :

 f86387bffmpeg.exe" -i c:\tmpdir\work.m2v -vcodec mpeg2video -pix_fmt
 yuv422p -intra -flags +ildct+ilme -b:v 150M -maxrate 150M -minrate 150M
 -bt 6M  -bufsize 47185920 -r 25 -an -y  c:\tmpdir\xdcam.m2v
 ffmpeg version N-57605-gf86387b Copyright (c) 2000-2013 the FFmpeg
 developers
   built on Oct 29 2013 18:01:53 with gcc 4.8.2 (GCC)
   configuration: --enable-gpl --enable-version3 --disable-w32threads
 --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r
 --enable-gnutls --enable-iconv --enable-libass --enable-libbluray
 --enable-libcaca --enable-libfreetype --enable-libgsm --enable-libilbc
 --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb
 --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-
 librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex
 --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-
 aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx
 --enable-libwavpack --enable-libx264 --enable-libxavs --enable-libxvid
 --enable-zlib
   libavutil      52. 48.100 / 52. 48.100
   libavcodec     55. 39.100 / 55. 39.100
   libavformat    55. 19.104 / 55. 19.104
   libavdevice    55.  5.100 / 55.  5.100
   libavfilter     3. 90.100 /  3. 90.100
   libswscale      2.  5.101 /  2.  5.101
   libswresample   0. 17.104 /  0. 17.104
   libpostproc    52.  3.100 / 52.  3.100
 Input #0, mpegvideo, from 'c:\tmpdir\work.m2v':
   Duration: N/A, bitrate: N/A
     Stream #0:0: Video: mpeg2video (4:2:2), yuv422p(tv, bt709), 1920x1080
 [SAR 1:1 DAR 16:9], max. 50000 kb/s, 25 fps, 25 tbr, 1200k tbn, 50 tbc
 [mpeg2video @ 02618b20] bitrate tolerance too small for bitrate
 Output #0, mpeg2video, to 'c:\tmpdir\xdcam.m2v':
     Stream #0:0: Video: mpeg2video, yuv422p, 1920x1080 [SAR 1:1 DAR 16:9],
 q=2-31, 150000 kb/s,
 90k tbn, 25 tbc
 Stream mapping:
   Stream #0:0 -> #0:0 (mpeg2video -> mpeg2video)
 Error while opening encoder for output stream #0:0 - maybe incorrect
 parameters such as bit_rate, rate, width or height

 Using -bt 8M proceeds:

 f86387bffmpeg.exe" -i c:\tmpdir\work.m2v -vcodec mpeg2video -pix_fmt
 yuv422p -intra -flags +ildct+ilme -b:v 150M -maxrate 150M -minrate 150M
 -bt 8M  -bufsize 47185920 -r 25 -an -y  c:\tmpdir\xdcam.m2v
 ffmpeg version N-57605-gf86387b Copyright (c) 2000-2013 the FFmpeg
 developers
   built on Oct 29 2013 18:01:53 with gcc 4.8.2 (GCC)
   configuration: --enable-gpl --enable-version3 --disable-w32threads
 --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r
 --enable-gnutls --enable-iconv --enable-libass --enable-libbluray
 --enable-libcaca --enable-libfreetype --enable-libgsm --enable-libilbc
 --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb
 --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-
 librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex
 --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-
 aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx
 --enable-libwavpack --enable-libx264 --enable-libxavs --enable-libxvid
 --enable-zlib
   libavutil      52. 48.100 / 52. 48.100
   libavcodec     55. 39.100 / 55. 39.100
   libavformat    55. 19.104 / 55. 19.104
   libavdevice    55.  5.100 / 55.  5.100
   libavfilter     3. 90.100 /  3. 90.100
   libswscale      2.  5.101 /  2.  5.101
   libswresample   0. 17.104 /  0. 17.104
   libpostproc    52.  3.100 / 52.  3.100
 Input #0, mpegvideo, from 'c:\tmpdir\work.m2v':
   Duration: N/A, bitrate: N/A
     Stream #0:0: Video: mpeg2video (4:2:2), yuv422p(tv, bt709), 1920x1080
 [SAR 1:1 DAR 16:9], max. 50000 kb/s, 25 fps, 25 tbr, 1200k tbn, 50 tbc
 Output #0, mpeg2video, to 'c:\tmpdir\xdcam.m2v':
   Metadata:
     encoder         : Lavf55.19.104
     Stream #0:0: Video: mpeg2video, yuv422p, 1920x1080 [SAR 1:1 DAR 16:9],
 q=2-31, 150000 kb/s,90k tbn, 25 tbc
 Stream mapping:
   Stream #0:0 -> #0:0 (mpeg2video -> mpeg2video)
 Press [q] to stop, [?] for help
 frame=  500 fps= 58 q=1.6 Lsize=  364771kB time=00:00:19.96
 bitrate=149709.6kbits/s
 video:364771kB audio:0kB subtitle:0 global headers:0kB muxing overhead
 0.000000%

 but this encoding above shows in MediaInfo:
 Bit rate                                 : 149 Mbps
 Maximum bit rate                  : 46.8 Mbps

 and my m2v essence tool shows at bitrate of 45,142,400 and VBV size=
 13,631,488 in the Sequence header,


 But 99M is happy:

 f86387bffmpeg.exe" -i c:\tmpdir\work.m2v -vcodec mpeg2video -pix_fmt
 yuv422p -intra -flags +ildct+ilme -b:v 99M -maxrate 99M -minrate 99M -bt
 6M  -bufsize 47185920 -r 25 -an -y  c:\tmpdir\xdcam.m2v
 ffmpeg version N-57605-gf86387b Copyright (c) 2000-2013 the FFmpeg
 developers
   built on Oct 29 2013 18:01:53 with gcc 4.8.2 (GCC)
   configuration: --enable-gpl --enable-version3 --disable-w32threads
 --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r
 --enable-gnutls --enable-iconv --enable-libass --enable-libbluray
 --enable-libcaca --enable-libfreetype --enable-libgsm --enable-libilbc
 --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb
 --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-
 librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex
 --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-
 aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx
 --enable-libwavpack --enable-libx264 --enable-libxavs --enable-libxvid
 --enable-zlib
   libavutil      52. 48.100 / 52. 48.100
   libavcodec     55. 39.100 / 55. 39.100
   libavformat    55. 19.104 / 55. 19.104
   libavdevice    55.  5.100 / 55.  5.100
   libavfilter     3. 90.100 /  3. 90.100
   libswscale      2.  5.101 /  2.  5.101
   libswresample   0. 17.104 /  0. 17.104
   libpostproc    52.  3.100 / 52.  3.100
 Input #0, mpegvideo, from 'c:\tmpdir\work.m2v':
   Duration: N/A, bitrate: N/A
     Stream #0:0: Video: mpeg2video (4:2:2), yuv422p(tv, bt709), 1920x1080
 [SAR 1:1 DAR 16:9], max. 50000 kb/s, 25 fps, 25 tbr, 1200k tbn, 50 tbc
 Output #0, mpeg2video, to 'c:\tmpdir\xdcam.m2v':
   Metadata:
     encoder         : Lavf55.19.104
     Stream #0:0: Video: mpeg2video, yuv422p, 1920x1080 [SAR 1:1 DAR 16:9],
 q=2-31, 99000 kb/s, 90k tbn, 25 tbc

 And for this one MediaInfo reports:
 Overall bit rate                         : 98.4 Mbps
 Bit rate                                 : 99.0 Mbps

 m2v sequence header bitrate = 99,000,000 and vbv = 13,631,488

 Its just anything over 100Mbps seems not to encode correctly

-- 
Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/3091#comment:11>
FFmpeg <http://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list