Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#3494 closed enhancement (fixed)

scary warning message when using mpeg

Reported by: Roger Pack Owned by:
Priority: wish Component: avformat
Version: git-master Keywords: mpegps
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Summary of the bug: warning message output when using mpeg with default values.

Specifically:
$ ffmpeg -f lavfi -i testsrc yo.mpg
...
[mpeg @ 026ed0c0] VBV buffer size not set, muxing may fail

I doubt that using default "muxing may fail" could this error message be clarified somehow? Or are the defaults not enough and muxing might fail? It makes it feel like muxing to mpg by default "might be broken"

How to reproduce:

ffmpeg -f lavfi -i testsrc yo.mpg
ffmpeg version N-61760-g5df8dfe Copyright (c) 2000-2014 the FFmpeg developers
  built on Mar 24 2014 11:42:36 with gcc 4.8.2 (GCC)
  configuration: --arch=x86 --target-os=mingw32 --cross-prefix=/home/rogerdpack/dev/ffmpeg-windows-build-helpers/sandbox/mingw-w64-i686/bin/i686-w64-mingw32- --pkg-config=pkg-config --enable-gpl --enable-libx264 --enable-avisynth --enable-libxvid --enable-libmp3lame --enable-version3 --enable-zlib --enable-librtmp --enable-libvorbis --enable-libtheora --enable-libspeex --enable-libopenjpeg --enable-gnutls --enable-libgsm --enable-libfreetype --enable-libopus --disable-w32threads --enable-frei0r --enable-filter=frei0r --enable-libvo-aacenc --enable-bzlib --enable-libxavs --extra-cflags=-DPTW32_STATIC_LIB --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libvo-amrwbenc --enable-libschroedinger --enable-libvpx --enable-libilbc --prefix=/home/rogerdpack/dev/ffmpeg-windows-build-helpers/sandbox/mingw-w64-i686/i686-w64-mingw32 --enable-static --disable-shared --enable-libsoxr --enable-fontconfig --enable-libass --enable-libutvideo --enable-libbluray --enable-iconv --enable-libtwolame --extra-cflags=-DLIBTWOLAME_STATIC --enable-libzvbi --enable-libcaca --enable-libmodplug --extra-libs=-lstdc++ --extra-libs=-lpng --enable-libvidstab --enable-libx265 --extra-cflags= --extra-cflags= --enable-runtime-cpudetect
  libavutil      52. 67.100 / 52. 67.100
  libavcodec     55. 52.103 / 55. 52.103
  libavformat    55. 34.101 / 55. 34.101
  libavdevice    55. 11.100 / 55. 11.100
  libswscale      2.  5.102 /  2.  5.102
  libswresample   0. 18.100 /  0. 18.100
  libpostproc    52.  3.100 / 52.  3.100
Input #0, lavfi, from 'testsrc':
  Duration: N/A, start: 0.000000, bitrate: N/A
    Stream #0:0: Video: rawvideo (RGB[24] / 0x18424752), rgb24, 320x240 [SAR 1:1 DAR 4:3], 25 tbr, 25 tbn, 25 tbc
File 'yo.mpg' already exists. Overwrite ? [y/N] y
[mpeg @ 026ed0c0] VBV buffer size not set, muxing may fail
Output #0, mpeg, to 'yo.mpg':
  Metadata:
    encoder         : Lavf55.34.101
    Stream #0:0: Video: mpeg1video, yuv420p, 320x240 [SAR 1:1 DAR 4:3], q=2-31,
 200 kb/s, 90k tbn, 25 tbc
Stream mapping:
  Stream #0:0 -> #0:0 (rawvideo -> mpeg1video)
Press [q] to stop, [?] for help
frame=  330 fps=0.0 q=3.2 size=     520kB time=00:00:13.12 bitrate= 324.7kbits/frame=  675 fps=674 q=5.7 size=     946kB time=00:00:26.92 bitrate= 287.9kbits/frame=  950 fps=674 q=5.9 Lsize=    1242kB time=00:00:37.96 bitrate= 268.0kbits/s
video:1231kB audio:0kB subtitle:0 data:0 global headers:0kB muxing overhead 0.889020%

Change History (9)

comment:1 by Carl Eugen Hoyos, 10 years ago

I probably simply don't understand this ticket but could it be a duplicate of ticket #2879?

comment:2 by Roger Pack, 10 years ago

there's no real problem, just a "scare" to users who see this message:

VBV buffer size not set, muxing may fail

shouldn't the defaults be set up to *not* warn that they are about to fail, that is? For default values, I wouldn't expect them to have warnings about "you're setting some value wrong!" that type of thing.

Thanks (doesn't appear immediately like #2879 to me...)

comment:3 by Carl Eugen Hoyos, 10 years ago

I still don't understand:
The user does not set a value that is needed for (correct) processing of an input file (in this case: muxing to a program stream). FFmpeg guesses a value and warns the user that the guessed value may fail. What should be changed? And what do you mean with "default"? (I believe I understand the word but not what it means in the context of your report.)

comment:4 by Roger Pack, 10 years ago

Hmm...

I guess for most of us, we want to specify an mpg output and have it "just work"...we don't even know what a VBV buffer is, nor what size is appropriate...hmm...

perhaps the error message can be reworded...something like this?

"VBV buffer size not set, using default buffer size of 130KB, muxing may fail for large streams"

or something.
(I also noticed a "FIXME this is probably too small" for the default
https://github.com/ffmpeg/ffmpeg/blob/master/libavformat/mpegenc.c#L390
maybe the default could be made larger at the same time, just for good measure).
Thanks!

in reply to:  4 comment:5 by Carl Eugen Hoyos, 10 years ago

Replying to rogerdpack:

perhaps the error message can be reworded...something like this?

"VBV buffer size not set, using default buffer size of 130KB, muxing may fail for large streams"

Are you planning to send a patch (without the "for large streams")?

comment:6 by Roger Pack, 10 years ago

I wasn't sure what the best verbiage would be...actually I'm a little confused why there's any question here, if I didn't specify a "max" rate does it even need an rc_buffer_size to be set? Is this something special to mpeg?

Maybe a message like
"VBV buffer size not set, using default size 130KB, increase (by setting bufsize) if muxing fails" or something? Or maybe even a link to some wiki page in the message, to describe the situation?

Thanks!

comment:7 by Michael Niedermayer, 10 years ago

Resolution: fixed
Status: newclosed

Maybe fixed in 572f5eb1afc6a6cfafcbe4da42120ae4e42a6af1
improvments welcome ...

comment:8 by Carl Eugen Hoyos, 10 years ago

Component: undeterminedavformat
Keywords: mpegps added
Priority: normalwish
Version: unspecifiedgit-master

comment:9 by Roger Pack, 10 years ago

awesome perfect thank you!

Note: See TracTickets for help on using tickets.