Warning: VBV buffer size not set

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

Warning: VBV buffer size not set

Ulf Zibis
Hi,

with:
ffmpeg -i "concat:CYD-001.vob|CYD-002.vob|..." -c copy CYD_copy.vob
I get the warning:
[svcd @ 0x56377151e140] 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

How can I aviod the warning?

Much thanks for your help

Ulf

--
Von meinem Seibert gesendet

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

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Warning: VBV buffer size not set

Hans Carlson-2
On Sat, 8 Dec 2018, Ulf Zibis wrote:

> with:
> ffmpeg -i "concat:CYD-001.vob|CYD-002.vob|..." -c copy CYD_copy.vob
> I get the warning:
> [svcd @ 0x56377151e140] 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
>
> How can I aviod the warning?

Two things...

1) This has nothing to do with the warning you're receiving, but you
should NOT concat VOB's like that. It works... "sometimes"... which is why
many people unfortunately suggest it, but it quite often does not work.
VOB's are not simple MPEG files.  You'd be better off using one of the
following methods:

   - tools/dvd2concat (script included with ffmpeg source)
   - mpv ... --stream-dump ...
   - mplayer ... --dumpstream ...

You'll need to read the man pages for each to get the exact command and
options.

2) With regards to the VBV buffer size warning...  Unfortunately, I don't
have a good answer, only a little history.  This has been an issue for a
few years and I wish I knew how to fix it.  I've resorted to patching the
source to use a higher default buffer size but I know that's not the
correct or even a good solution.  I've always intended to try and dig
deeper to find the cause, but lack of time and experience with the code
has always halted my progress.

The "VBV buffer size not set" warning itself is nothing new... it's been
in the code for several years as far as I can tell.  But I never noticed
the warning until around version ~3.0... specifically, this change:

   https://github.com/FFmpeg/FFmpeg/commit/079b5d4ef888bd42bf0147a6d964b8bc9ec0f3c5#diff-00823e6d5f4d3807869c905426e6bdd1

After that change, the VBV warning started to get displayed when doing a
stream copy on mpeg files.  From what I can tell, in versions prior to
this change ffmpeg determined the "VBV buffer size" for the destination
file by looking at the source file. But when the above change happened
that value was no longer available, so internally no buffer size was found
for the destination file, which triggers the "VBV buffer size not set"
warning message.

Starting with the above change (or there abouts), ffmpeg started to use a
different internal structure ("side data") to store some of the
information about a file.  My guess as to the problem with the VBV buffer
warning is that it has something to do with how this "side data" is
populated, but I've never dug deep enough to figure that out.
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Warning: VBV buffer size not set

Carl Eugen Hoyos-2
In reply to this post by Ulf Zibis
2018-12-08 22:28 GMT+01:00, Ulf Zibis <[hidden email]>:

> with:
> ffmpeg -i "concat:CYD-001.vob|CYD-002.vob|..." -c copy CYD_copy.vob
> I get the warning:
> [svcd @ 0x56377151e140] 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
>
> How can I aviod the warning?

Use the target option.

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

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Warning: VBV buffer size not set

Carl Eugen Hoyos-2
2018-12-12 20:11 GMT+01:00, Carl Eugen Hoyos <[hidden email]>:
> 2018-12-08 22:28 GMT+01:00, Ulf Zibis <[hidden email]>:
>
>> with:
>> ffmpeg -i "concat:CYD-001.vob|CYD-002.vob|..." -c copy CYD_copy.vob

(My answer wasn't wrong but your command line does not make
much sense.)

If your command succeeds (ie you ignore Hans' warning but still
get a useful output file) the following will also work and has
many advantages (apart from not showing a muxer warning):
cat CYD-001.vob CYD-002.vob ... >CYD_copy.vob

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

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Warning: VBV buffer size not set

Hans Carlson-2
In reply to this post by Carl Eugen Hoyos-2
On Wed, 12 Dec 2018, Carl Eugen Hoyos wrote:

> 2018-12-08 22:28 GMT+01:00, Ulf Zibis <[hidden email]>:
>
>> with:
>> ffmpeg -i "concat:CYD-001.vob|CYD-002.vob|..." -c copy CYD_copy.vob
>> I get the warning:
>> [svcd @ 0x56377151e140] 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
>>
>> How can I aviod the warning?
>
> Use the target option.

If the target option is used WITHOUT "-c copy", then it's true you won't
see this warning.  But then it's doing a re-encode... NOT a copy.  The
problem comes when trying to do a COPY and the target option doesn't help
in that case.

So, I'll rephrase Ulf's original question... how do you avoid this warning
while doing a stream COPY (remux)?

FYI.  You get the same result here with or without "-target XXX".

   $ ffmpeg -i TEST.mpg -target ntsc-dvd -codec copy -f vob - > /dev/null
   ffmpeg version N-92681-g0e833f615b Copyright (c) 2000-2018 the FFmpeg developers
     built with gcc 7 (GCC)
     configuration: --disable-optimizations --disable-stripping --enable-static --disable-shared --disable-ffplay
     libavutil      56. 24.101 / 56. 24.101
     libavcodec     58. 42.100 / 58. 42.100
     libavformat    58. 24.100 / 58. 24.100
     libavdevice    58.  6.101 / 58.  6.101
     libavfilter     7. 46.101 /  7. 46.101
     libswscale      5.  4.100 /  5.  4.100
     libswresample   3.  4.100 /  3.  4.100
   Input #0, mpeg, from 'TEST.mpg':
     Duration: 00:00:09.88, start: 0.533367, bitrate: 142 kb/s
       Stream #0:0[0x1e0]: Video: mpeg2video (Main), yuv420p(tv, progressive), 720x480 [SAR 32:27 DAR 16:9], 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc
   [vob @ 0x4000e00] VBV buffer size not set, using default size of 230KB
   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 'pipe:':
     Metadata:
       encoder         : Lavf58.24.100
       Stream #0:0: Video: mpeg2video (Main), yuv420p(tv, progressive), 720x480 [SAR 32:27 DAR 16:9], q=2-31, 6000 kb/s, 29.97 fps, 29.97 tbr, 90k tbn, 29.97 tbc
   Stream mapping:
     Stream #0:0 -> #0:0 (copy)
   Press [q] to stop, [?] for help
   [vob @ 0x4000e00] 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
   frame=  300 fps=0.0 q=-1.0 Lsize=     172kB time=00:00:09.94 bitrate= 141.7kbits/s speed=4.21e+03x
   video:169kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 1.759272%
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Warning: VBV buffer size not set

Carl Eugen Hoyos-2
2018-12-13 0:57 GMT+01:00, Hans Carlson <[hidden email]>:

> On Wed, 12 Dec 2018, Carl Eugen Hoyos wrote:
>
>> 2018-12-08 22:28 GMT+01:00, Ulf Zibis <[hidden email]>:
>>
>>> with:
>>> ffmpeg -i "concat:CYD-001.vob|CYD-002.vob|..." -c copy CYD_copy.vob
>>> I get the warning:
>>> [svcd @ 0x56377151e140] 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
>>>
>>> How can I aviod the warning?
>>
>> Use the target option.
>
> If the target option is used WITHOUT "-c copy", then it's true you won't
> see this warning.  But then it's doing a re-encode... NOT a copy.  The
> problem comes when trying to do a COPY and the target option doesn't
> help in that case.
>
> So, I'll rephrase Ulf's original question... how do you avoid this warning
> while doing a stream COPY (remux)?

You cannot, as the maximum bit-rate cannot be set when remuxing.
The muxer has to assume that your input confirms to the relevant
specification. Note that command lines without "-f" make it
impossible for ffmpeg to even understand which standard you want.

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

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Warning: VBV buffer size not set

Hans Carlson-2
On Thu, 13 Dec 2018, Carl Eugen Hoyos wrote:

> 2018-12-13 0:57 GMT+01:00, Hans Carlson <[hidden email]>:
>>
>> So, I'll rephrase Ulf's original question... how do you avoid this
>> warning while doing a stream COPY (remux)?
>
> You cannot, as the maximum bit-rate cannot be set when remuxing. The
> muxer has to assume that your input confirms to the relevant
> specification. Note that command lines without "-f" make it impossible
> for ffmpeg to even understand which standard you want.

So why did re-muxing work fine without any warnings before this change?

   https://github.com/FFmpeg/FFmpeg/commit/079b5d4ef888bd42bf0147a6d964b8bc9ec0f3c5#diff-00823e6d5f4d3807869c905426e6bdd1

Prior to this change, the buffer size (along with other values) were
copied from the decoding context and used for the encoding context.  This
was done in ffmpeg.c:transcode_init() in an if statement specifically for
stream_copy:

     2903   enc_ctx->bit_rate       = dec_ctx->bit_rate;
     2904   enc_ctx->rc_max_rate    = dec_ctx->rc_max_rate;
     2905   enc_ctx->rc_buffer_size = dec_ctx->rc_buffer_size;
     2906   enc_ctx->field_order    = dec_ctx->field_order;

   NOTE: Line numbers are based on rev: 079b5d4ef888bd42bf0147a6d964b8bc9ec0f3c5

Why is it now "impossible" to get that same information from the decoding
context?

Forgive my ignorance, but from my perspective, it USED to work and now it
doesn't work.
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Warning: VBV buffer size not set

Ulf Zibis
In reply to this post by Carl Eugen Hoyos-2
Hi,

Am 12.12.18 um 20:15 schrieb Carl Eugen Hoyos:
> (My answer wasn't wrong but your command line does not make
> much sense.)
>
> If your command succeeds (ie you ignore Hans' warning but still
> get a useful output file) the following will also work and has
> many advantages (apart from not showing a muxer warning):
> cat CYD-001.vob CYD-002.vob ... >CYD_copy.vob

With this I got an unusable result. The file was not playable with
several video players, but the result from

ffmpeg -i "concat:CYD-001.vob|CYD-002.vob|..." -c copy CYD_copy.vob

was.

If you are familiar with German, you can follow the whole case here (the
partial .vob-files had to be created by dvd::rip):
https://forum.ubuntuusers.de/topic/konvertiertes-video-am-ende-ohne-ton-geeignete/
Especially note this post:
https://forum.ubuntuusers.de/post/9029332/

-Ulf


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

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".