Buffer Underflow in case of high resolution mpeg1video encoding

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Buffer Underflow in case of high resolution mpeg1video encoding

inge
Hello,

I've been using ffmpeg to encode raw data using the following command line argument:

ffmpeg -r 24 -pix_fmt rgba -s 2560x1440 -f rawvideo -y -i - -c:v mpeg1video -qscale:v 4 -vf vflip filename.mpeg

During encoding I get the following output:
[mpeg @ 000000000434c3c0] buffer underflow st=0 bufi=234679 size=263328
[mpeg @ 000000000434c3c0] packet too large, ignoring buffer limits to mux it
[mpeg @ 000000000434c3c0] buffer underflow st=0 bufi=234679 size=263328
[mpeg @ 000000000434c3c0] buffer underflow st=0 bufi=236708 size=263328
[mpeg @ 000000000434c3c0] packet too large, ignoring buffer limits to mux it
[mpeg @ 000000000434c3c0] buffer underflow st=0 bufi=236708 size=263328
...

I noticed that using a lower resolution, for example 1920x1080, does not give me a buffer underflow.
Also using a qscale of 5 instead of 4 prevents it.
It's also interesting to note that the output seems to be fine, despite these messages.

Can someone help me understand what exactly a buffer underflow means in this context? And/Or how to prevent it from happening? I've searched around for some time now and I'm still none the wiser.

Much appreciated!
Inge
Reply | Threaded
Open this post in threaded view
|

Re: Buffer Underflow in case of high resolution mpeg1video encoding

Carl Eugen Hoyos
inge <inge.becht91 <at> gmail.com> writes:

> ffmpeg -r 24 -pix_fmt rgba -s 2560x1440 -f rawvideo -y
> -i - -c:v mpeg1video -qscale:v 4 -vf vflip filename.mpeg

Please provide the complete, uncut console output
whenever asking for support here.

Carl Eugen

_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user
Reply | Threaded
Open this post in threaded view
|

Re: Buffer Underflow in case of high resolution mpeg1video encoding

inge
Sorry about that!
Here is the whole output:


ffmpeg version N-66352-g33c752b Copyright (c) 2000-2014 the FFmpeg developers
  built on Sep 19 2014 23:23:41 with gcc 4.9.1 (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-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --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-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-decklink --enable-zlib
  libavutil      54.  7.100 / 54.  7.100
  libavcodec     56.  1.101 / 56.  1.101
  libavformat    56.  4.102 / 56.  4.102
  libavdevice    56.  0.100 / 56.  0.100
  libavfilter     5.  1.101 /  5.  1.101
  libswscale      3.  0.100 /  3.  0.100
  libswresample   1.  1.100 /  1.  1.100
  libpostproc    53.  0.100 / 53.  0.100
Input #0, rawvideo, from 'pipe:':
  Duration: N/A, start: 0.000000, bitrate: N/A
    Stream #0:0: Video: rawvideo (RGBA / 0x41424752), rgba, 2560x1440, -1463812 kb/s, 24 tbr, 24 tbn, 24 tbc
Please use -q:a or -q:v, -qscale is ambiguous
[mpeg @ 000000000431c3c0] 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, mpeg, to 'filename.mpeg':
  Metadata:
    encoder         : Lavf56.4.102
    Stream #0:0: Video: mpeg1video, yuv420p, 2560x1440, q=2-31, 200 kb/s, 24 fps, 90k tbn, 24 tbc
    Metadata:
      encoder         : Lavc56.1.101 mpeg1video
Stream mapping:
  Stream #0:0 -> #0:0 (rawvideo (native) -> mpeg1video (native))
frame=   14 fps=0.0 q=4.0 size=     908kB time=00:00:00.50 bitrate=14876.7kbits/s    
frame=   26 fps= 25 q=4.0 size=    1626kB time=00:00:01.00 bitrate=13320.2kbits/s    
frame=   38 fps= 24 q=4.0 size=    2578kB time=00:00:01.50 bitrate=14079.3kbits/s    
frame=   50 fps= 24 q=4.0 size=    3486kB time=00:00:02.00 bitrate=14278.7kbits/s    
frame=   62 fps= 24 q=4.0 size=    4322kB time=00:00:02.50 bitrate=14162.3kbits/s    
frame=   72 fps= 23 q=4.0 size=    4784kB time=00:00:02.91 bitrate=13436.8kbits/s    
frame=   82 fps= 22 q=4.0 size=    5382kB time=00:00:03.33 bitrate=13226.8kbits/s    
frame=   91 fps= 22 q=4.0 size=    5932kB time=00:00:03.70 bitrate=13104.3kbits/s    
frame=  101 fps= 21 q=4.0 size=    6518kB time=00:00:04.12 bitrate=12944.4kbits/s    
frame=  111 fps= 21 q=4.0 size=    7094kB time=00:00:04.54 bitrate=12795.8kbits/s    
frame=  121 fps= 21 q=4.0 size=    7552kB time=00:00:04.95 bitrate=12477.2kbits/s    
frame=  131 fps= 21 q=4.0 size=    8132kB time=00:00:05.37 bitrate=12393.9kbits/s    
frame=  140 fps= 20 q=4.0 size=    8706kB time=00:00:05.75 bitrate=12403.4kbits/s    
frame=  150 fps= 20 q=4.0 size=    9286kB time=00:00:06.16 bitrate=12335.8kbits/s    
frame=  159 fps= 20 q=4.0 size=    9886kB time=00:00:06.54 bitrate=12380.0kbits/s    
frame=  168 fps= 20 q=4.0 size=   10376kB time=00:00:06.91 bitrate=12289.2kbits/s    
frame=  177 fps= 20 q=4.0 size=   11312kB time=00:00:07.29 bitrate=12708.7kbits/s    
frame=  186 fps= 20 q=4.0 size=   12242kB time=00:00:07.66 bitrate=13080.8kbits/s    
frame=  195 fps= 20 q=4.0 size=   13162kB time=00:00:08.04 bitrate=13408.1kbits/s    
frame=  205 fps= 19 q=4.0 size=   13720kB time=00:00:08.45 bitrate=13288.0kbits/s    
frame=  215 fps= 19 q=4.0 size=   14382kB time=00:00:08.87 bitrate=13275.2kbits/s    
frame=  225 fps= 19 q=4.0 size=   15142kB time=00:00:09.29 bitrate=13349.9kbits/s    
frame=  234 fps= 19 q=4.0 size=   16022kB time=00:00:09.66 bitrate=13577.8kbits/s    
frame=  244 fps= 19 q=4.0 size=   16980kB time=00:00:10.08 bitrate=13795.1kbits/s    
frame=  253 fps= 19 q=4.0 size=   17804kB time=00:00:10.45 bitrate=13945.9kbits/s    
frame=  262 fps= 19 q=4.0 size=   18866kB time=00:00:10.83 bitrate=14266.2kbits/s    
frame=  271 fps= 19 q=4.0 size=   19640kB time=00:00:11.20 bitrate=14354.6kbits/s    
frame=  281 fps= 19 q=4.0 size=   20408kB time=00:00:11.62 bitrate=14381.3kbits/s    
frame=  290 fps= 19 q=4.0 size=   21302kB time=00:00:12.00 bitrate=14542.2kbits/s    
frame=  302 fps= 19 q=4.0 size=   22318kB time=00:00:12.50 bitrate=14626.3kbits/s    
frame=  313 fps= 19 q=4.0 size=   23506kB time=00:00:12.95 bitrate=14860.0kbits/s    
frame=  324 fps= 19 q=4.0 size=   24808kB time=00:00:13.41 bitrate=15147.4kbits/s    
frame=  336 fps= 19 q=4.0 size=   26020kB time=00:00:13.91 bitrate=15316.6kbits/s    
frame=  348 fps= 19 q=4.0 size=   27140kB time=00:00:14.41 bitrate=15421.8kbits/s    
frame=  360 fps= 19 q=4.0 size=   28300kB time=00:00:14.91 bitrate=15541.9kbits/s    
frame=  372 fps= 19 q=4.0 size=   29324kB time=00:00:15.41 bitrate=15582.0kbits/s    
frame=  384 fps= 20 q=4.0 size=   30368kB time=00:00:15.91 bitrate=15629.8kbits/s    
frame=  396 fps= 20 q=4.0 size=   31480kB time=00:00:16.41 bitrate=15708.7kbits/s    
frame=  408 fps= 20 q=4.0 size=   32444kB time=00:00:16.91 bitrate=15711.2kbits/s    
frame=  418 fps= 20 q=4.0 size=   33466kB time=00:00:17.33 bitrate=15816.5kbits/s    
frame=  429 fps= 20 q=4.0 size=   34764kB time=00:00:17.79 bitrate=16006.7kbits/s    
[mpeg @ 000000000431c3c0] buffer underflow st=0 bufi=234050 size=236304
[mpeg @ 000000000431c3c0] packet too large, ignoring buffer limits to mux it
[mpeg @ 000000000431c3c0] buffer underflow st=0 bufi=234050 size=236304
[mpeg @ 000000000431c3c0] buffer underflow st=0 bufi=236079 size=236304
[mpeg @ 000000000431c3c0] packet too large, ignoring buffer limits to mux it
[mpeg @ 000000000431c3c0] buffer underflow st=0 bufi=236079 size=236304
frame=  441 fps= 20 q=4.0 size=   36128kB time=00:00:18.29 bitrate=16180.1kbits/s    
[mpeg @ 000000000431c3c0] buffer underflow st=0 bufi=233707 size=238471
[mpeg @ 000000000431c3c0] packet too large, ignoring buffer limits to mux it
[mpeg @ 000000000431c3c0] buffer underflow st=0 bufi=233707 size=238471
[mpeg @ 000000000431c3c0] buffer underflow st=0 bufi=235736 size=238471
[mpeg @ 000000000431c3c0] packet too large, ignoring buffer limits to mux it
[mpeg @ 000000000431c3c0] buffer underflow st=0 bufi=235736 size=238471
[mpeg @ 000000000431c3c0] buffer underflow st=0 bufi=237777 size=238471
[mpeg @ 000000000431c3c0] packet too large, ignoring buffer limits to mux it
[mpeg @ 000000000431c3c0] buffer underflow st=0 bufi=237777 size=238471
frame=  453 fps= 20 q=4.0 size=   37468kB time=00:00:18.79 bitrate=16333.7kbits/s    
[mpeg @ 000000000431c3c0] buffer underflow st=0 bufi=234979 size=248802
[mpeg @ 000000000431c3c0] packet too large, ignoring buffer limits to mux it
[mpeg @ 000000000431c3c0] buffer underflow st=0 bufi=234979 size=248802
[mpeg @ 000000000431c3c0] buffer underflow st=0 bufi=237008 size=248802
[mpeg @ 000000000431c3c0] packet too large, ignoring buffer limits to mux it
[mpeg @ 000000000431c3c0] buffer underflow st=0 bufi=237008 size=248802
[mpeg @ 000000000431c3c0] buffer underflow st=0 bufi=239049 size=248802
[mpeg @ 000000000431c3c0] packet too large, ignoring buffer limits to mux it
[mpeg @ 000000000431c3c0] buffer underflow st=0 bufi=239049 size=248802
[mpeg @ 000000000431c3c0] buffer underflow st=0 bufi=241090 size=248802
[mpeg @ 000000000431c3c0] packet too large, ignoring buffer limits to mux it
[mpeg @ 000000000431c3c0] buffer underflow st=0 bufi=241090 size=248802
[mpeg @ 000000000431c3c0] buffer underflow st=0 bufi=243131 size=248802
[mpeg @ 000000000431c3c0] packet too large, ignoring buffer limits to mux it
[mpeg @ 000000000431c3c0] buffer underflow st=0 bufi=243131 size=248802
[mpeg @ 000000000431c3c0] buffer underflow st=0 bufi=245172 size=248802
[mpeg @ 000000000431c3c0] packet too large, ignoring buffer limits to mux it
[mpeg @ 000000000431c3c0] buffer underflow st=0 bufi=245172 size=248802
[mpeg @ 000000000431c3c0] buffer underflow st=0 bufi=247213 size=248802
[mpeg @ 000000000431c3c0] packet too large, ignoring buffer limits to mux it
[mpeg @ 000000000431c3c0] buffer underflow st=0 bufi=247213 size=248802
frame=  465 fps= 20 q=4.0 size=   38878kB time=00:00:19.29 bitrate=16509.1kbits/s    
[mpeg @ 000000000431c3c0] buffer underflow st=0 bufi=234643 size=250215
[mpeg @ 000000000431c3c0] packet too large, ignoring buffer limits to mux it
[mpeg @ 000000000431c3c0] buffer underflow st=0 bufi=234643 size=250215
[mpeg @ 000000000431c3c0] buffer underflow st=0 bufi=236672 size=250215
[mpeg @ 000000000431c3c0] packet too large, ignoring buffer limits to mux it
[mpeg @ 000000000431c3c0] buffer underflow st=0 bufi=236672 size=250215
[mpeg @ 000000000431c3c0] buffer underflow st=0 bufi=238713 size=250215
[mpeg @ 000000000431c3c0] packet too large, ignoring buffer limits to mux it
[mpeg @ 000000000431c3c0] buffer underflow st=0 bufi=238713 size=250215
[mpeg @ 000000000431c3c0] buffer underflow st=0 bufi=240754 size=250215
[mpeg @ 000000000431c3c0] packet too large, ignoring buffer limits to mux it
[mpeg @ 000000000431c3c0] buffer underflow st=0 bufi=240754 size=250215
[mpeg @ 000000000431c3c0] buffer underflow st=0 bufi=242795 size=250215
[mpeg @ 000000000431c3c0] packet too large, ignoring buffer limits to mux it
[mpeg @ 000000000431c3c0] buffer underflow st=0 bufi=242795 size=250215
[mpeg @ 000000000431c3c0] buffer underflow st=0 bufi=244836 size=250215
[mpeg @ 000000000431c3c0] packet too large, ignoring buffer limits to mux it
[mpeg @ 000000000431c3c0] buffer underflow st=0 bufi=244836 size=250215
[mpeg @ 000000000431c3c0] buffer underflow st=0 bufi=246877 size=250215
[mpeg @ 000000000431c3c0] packet too large, ignoring buffer limits to mux it
[mpeg @ 000000000431c3c0] buffer underflow st=0 bufi=246877 size=250215
[mpeg @ 000000000431c3c0] buffer underflow st=0 bufi=248918 size=250215
[mpeg @ 000000000431c3c0] packet too large, ignoring buffer limits to mux it
[mpeg @ 000000000431c3c0] buffer underflow st=0 bufi=248918 size=250215
frame=  477 fps= 20 q=4.0 size=   40062kB time=00:00:19.79 bitrate=16582.1kbits/s    
[mpeg @ 000000000431c3c0] buffer underflow st=0 bufi=233803 size=247655
[mpeg @ 000000000431c3c0] packet too large, ignoring buffer limits to mux it
[mpeg @ 000000000431c3c0] buffer underflow st=0 bufi=233803 size=247655
[mpeg @ 000000000431c3c0] buffer underflow st=0 bufi=235832 size=247655
[mpeg @ 000000000431c3c0] packet too large, ignoring buffer limits to mux it
[mpeg @ 000000000431c3c0] buffer underflow st=0 bufi=235832 size=247655
[mpeg @ 000000000431c3c0] buffer underflow st=0 bufi=237873 size=247655
[mpeg @ 000000000431c3c0] packet too large, ignoring buffer limits to mux it
[mpeg @ 000000000431c3c0] buffer underflow st=0 bufi=237873 size=247655
[mpeg @ 000000000431c3c0] buffer underflow st=0 bufi=239914 size=247655
[mpeg @ 000000000431c3c0] packet too large, ignoring buffer limits to mux it
[mpeg @ 000000000431c3c0] buffer underflow st=0 bufi=239914 size=247655
[mpeg @ 000000000431c3c0] buffer underflow st=0 bufi=241955 size=247655
[mpeg @ 000000000431c3c0] packet too large, ignoring buffer limits to mux it
[mpeg @ 000000000431c3c0] buffer underflow st=0 bufi=241955 size=247655
[mpeg @ 000000000431c3c0] buffer underflow st=0 bufi=243996 size=247655
[mpeg @ 000000000431c3c0] packet too large, ignoring buffer limits to mux it
[mpeg @ 000000000431c3c0] buffer underflow st=0 bufi=243996 size=247655
[mpeg @ 000000000431c3c0] buffer underflow st=0 bufi=246037 size=247655
[mpeg @ 000000000431c3c0] packet too large, ignoring buffer limits to mux it
[mpeg @ 000000000431c3c0] buffer underflow st=0 bufi=246037 size=247655
frame=  488 fps= 20 q=4.0 size=   41034kB time=00:00:20.25 bitrate=16600.0kbits/s    
frame=  499 fps= 20 q=4.0 size=   42084kB time=00:00:20.70 bitrate=16648.0kbits/s    
frame=  510 fps= 20 q=4.0 size=   42854kB time=00:00:21.16 bitrate=16585.5kbits/s    
frame=  522 fps= 20 q=4.0 size=   43036kB time=00:00:21.66 bitrate=16271.6kbits/s    
frame=  534 fps= 20 q=4.0 size=   43216kB time=00:00:22.16 bitrate=15971.1kbits/s    
frame=  546 fps= 20 q=4.0 size=   43396kB time=00:00:22.66 bitrate=15683.8kbits/s    
frame=  557 fps= 20 q=4.0 size=   43576kB time=00:00:23.12 bitrate=15436.7kbits/s    
frame=  568 fps= 20 q=4.0 size=   43756kB time=00:00:23.58 bitrate=15199.3kbits/s    
frame=  579 fps= 20 q=4.0 size=   43934kB time=00:00:24.04 bitrate=14970.1kbits/s    
frame=  590 fps= 20 q=4.0 size=   44104kB time=00:00:24.50 bitrate=14746.9kbits/s    
frame=  602 fps= 20 q=4.0 size=   44284kB time=00:00:25.00 bitrate=14511.0kbits/s    
frame=  614 fps= 20 q=4.0 size=   44464kB time=00:00:25.50 bitrate=14284.3kbits/s    
frame=  624 fps= 20 q=4.0 Lsize=   44486kB time=00:00:25.95 bitrate=14039.0kbits/s    

video:44321kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.371842%


If there is anything else I should provide, let me know!
Reply | Threaded
Open this post in threaded view
|

Re: Buffer Underflow in case of high resolution mpeg1video encoding

Carl Eugen Hoyos
inge <inge.becht91 <at> gmail.com> writes:

> [mpeg  <at>  000000000431c3c0] VBV buffer size not set,
> using default size of 130KB

Set -bufsize and -maxrate to (very) high values for
high resolution / low quantiser mpegvideo.
(I am not sure if the resulting file will conform
to any specification but it will play with all
open-source decoders.)

Carl Eugen

_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user