[FFmpeg-user] Recent ffmpeg gives warnings and buffer underflow during stream copy

Hans Carlson forbyta at inbox.com
Sat Jan 23 23:37:38 CET 2016


I just built the most recent ffmpeg from git (cloned today Jan 23rd) and 
when I stream copy an mpeg2 file (see example output below) in some cases 
I'm getting a LOT of buffer underflow errors and in all cases (so far) I'm 
getting a couple warnings:

   [vob @ 0x1dde980] VBV buffer size not set, using default size of 130KB
   [vob @ 0x1dde980] Timestamps are unset in a packet for stream 0.

If I use ffmpeg 2.8.5 (output also below), I don't get any buffer 
underflow errors or either of the warning messages.

I believe the change that caused the buffer underflow errors and the "VBV 
buffer size" warning is in libavformat/mpegenc.c at this point:

   https://github.com/FFmpeg/FFmpeg/blob/8bcadaacc2b8dc3c5d6569835a5ca20e62d3efca/libavformat/mpegenc.c

and the change that caused the "Timestamps are unset" warning is in 
libavformat/mux.c at this point:

   https://github.com/FFmpeg/FFmpeg/blob/8de1ee9f725aa3c550f425bd3120bcd95d5b2ea8/libavformat/mux.c

-------------------------------------------------------------------------------

   $ ffmpeg-dev -i clip.mpg -codec copy -f vob clip-copy-dev.mpg
   ffmpeg version N-78014-gce855bf Copyright (c) 2000-2016 the FFmpeg developers
     built with gcc 4.9.2 (GCC) 20150212 (Red Hat 4.9.2-6)
     configuration: --prefix=/usr/local/ffmpeg-master-20160122 --enable-gpl --enable-version3 --enable-nonfree --disable-static --enable-shared --disable-debug --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-x11grab --disable-ffplay --disable-ffserver
     libavutil      55. 14.100 / 55. 14.100
     libavcodec     57. 22.100 / 57. 22.100
     libavformat    57. 22.100 / 57. 22.100
     libavdevice    57.  0.100 / 57.  0.100
     libavfilter     6. 27.100 /  6. 27.100
     libswscale      4.  0.100 /  4.  0.100
     libswresample   2.  0.101 /  2.  0.101
     libpostproc    54.  0.100 / 54.  0.100
   Input #0, mpeg, from 'clip.mpg':
     Duration: 00:05:00.01, start: 0.536378, bitrate: 12570 kb/s
       Stream #0:0[0x1e0]: Video: mpeg2video (Main), yuv420p(tv), 1920x1080 [SAR 1:1 DAR 16:9], max. 30000 kb/s, 23.98 fps, 23.98 tbr, 90k tbn, 47.95 tbc
       Stream #0:1[0x80]: Audio: ac3, 48000 Hz, 5.1(side), fltp, 448 kb/s
       Stream #0:2[0x81]: Audio: ac3, 48000 Hz, stereo, fltp, 192 kb/s
   [vob @ 0x1a37aa0] VBV buffer size not set, using default size of 130KB
   If you want the mpeg file to be compliant to some specification
   Like DVD, VCD or others, make sure you set the correct buffer size
   Output #0, vob, to 'clip-copy-dev.mpg':
     Metadata:
       encoder         : Lavf57.22.100
       Stream #0:0: Video: mpeg2video, yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, max. 30000 kb/s, 23.98 fps, 23.98 tbr, 90k tbn, 23.98 tbc
       Stream #0:1: Audio: ac3, 48000 Hz, 5.1(side), 448 kb/s
   Stream mapping:
     Stream #0:0 -> #0:0 (copy)
     Stream #0:1 -> #0:1 (copy)
   Press [q] to stop, [?] for help
   [vob @ 0x1a37aa0] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly
   [vob @ 0x1a37aa0] buffer underflow st=0 bufi=235395 size=237308
   [vob @ 0x1a37aa0] packet too large, ignoring buffer limits to mux it
   [vob @ 0x1a37aa0] buffer underflow st=0 bufi=235395 size=237308
   ... [many buffer underflow messages]
   [vob @ 0x1a37aa0] buffer underflow st=0 bufi=318458 size=319139
   [vob @ 0x1a37aa0] packet too large, ignoring buffer limits to mux it
   [vob @ 0x1a37aa0] buffer underflow st=0 bufi=318458 size=319139
   frame= 7193 fps=4921 q=-1.0 Lsize=  453204kB time=00:05:00.00 bitrate=12375.5kbits/s speed= 205x
   video:431243kB audio:16406kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 1.240936%

   $ ffmpeg -i clip.mpg -codec copy -f vob clip-copy-2.8.5.mpg
   ffmpeg version 2.8.5 Copyright (c) 2000-2016 the FFmpeg developers
     built with gcc 4.9.2 (GCC) 20150212 (Red Hat 4.9.2-6)
     configuration: --enable-gpl --enable-version3 --enable-nonfree --disable-static --enable-shared --disable-debug --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-x11grab --disable-ffplay --disable-ffserver
     libavutil      54. 31.100 / 54. 31.100
     libavcodec     56. 60.100 / 56. 60.100
     libavformat    56. 40.101 / 56. 40.101
     libavdevice    56.  4.100 / 56.  4.100
     libavfilter     5. 40.101 /  5. 40.101
     libswscale      3.  1.101 /  3.  1.101
     libswresample   1.  2.101 /  1.  2.101
     libpostproc    53.  3.100 / 53.  3.100
   Input #0, mpeg, from 'clip.mpg':
     Duration: 00:05:00.01, start: 0.536378, bitrate: 12570 kb/s
       Stream #0:0[0x1e0]: Video: mpeg2video (Main), yuv420p(tv), 1920x1080 [SAR 1:1 DAR 16:9], max. 30000 kb/s, 23.98 fps, 23.98 tbr, 90k tbn, 47.95 tbc
       Stream #0:1[0x80]: Audio: ac3, 48000 Hz, 5.1(side), fltp, 448 kb/s
       Stream #0:2[0x81]: Audio: ac3, 48000 Hz, stereo, fltp, 192 kb/s
   Output #0, vob, to 'clip-copy-2.8.5.mpg':
     Metadata:
       encoder         : Lavf56.40.101
       Stream #0:0: Video: mpeg2video, yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, max. 30000 kb/s, 23.98 fps, 23.98 tbr, 90k tbn, 23.98 tbc
       Stream #0:1: Audio: ac3, 48000 Hz, 5.1(side), 448 kb/s
   Stream mapping:
     Stream #0:0 -> #0:0 (copy)
     Stream #0:1 -> #0:1 (copy)
   Press [q] to stop, [?] for help
   frame= 7193 fps=4595 q=-1.0 Lsize=  453204kB time=00:05:00.00 bitrate=12375.5kbits/s
   video:431243kB audio:16406kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 1.240936%


More information about the ffmpeg-user mailing list