[FFmpeg-cvslog] r25385 - trunk/libavformat/mpegenc.c
Michael Niedermayer
michaelni
Thu Oct 7 20:46:40 CEST 2010
On Thu, Oct 07, 2010 at 11:22:53AM -0700, Baptiste Coudurier wrote:
> On 10/07/2010 03:33 AM, Michael Niedermayer wrote:
>> On Wed, Oct 06, 2010 at 08:12:27PM -0700, Baptiste Coudurier wrote:
>>> On 10/6/10 7:31 PM, Michael Niedermayer wrote:
>>>> On Wed, Oct 06, 2010 at 07:05:22PM -0700, Baptiste Coudurier wrote:
>>>>> On 10/06/2010 06:57 PM, michael wrote:
>>>>>> Author: michael
>>>>>> Date: Thu Oct 7 03:57:39 2010
>>>>>> New Revision: 25385
>>>>>>
>>>>>> Log:
>>>>>> Warn if muxing mpeg ps is attempted without a VBV buffer size.
>>>>>>
>>>>>> Modified:
>>>>>> trunk/libavformat/mpegenc.c
>>>>>>
>>>>>> Modified: trunk/libavformat/mpegenc.c
>>>>>> ==============================================================================
>>>>>> --- trunk/libavformat/mpegenc.c Thu Oct 7 03:57:35 2010 (r25384)
>>>>>> +++ trunk/libavformat/mpegenc.c Thu Oct 7 03:57:39 2010 (r25385)
>>>>>> @@ -367,8 +367,10 @@ static int mpeg_mux_init(AVFormatContext
>>>>>> stream->id = mpv_id++;
>>>>>> if (st->codec->rc_buffer_size)
>>>>>> stream->max_buffer_size = 6*1024 + st->codec->rc_buffer_size/8;
>>>>>> - else
>>>>>> + else{
>>>>>> + av_log(ctx, AV_LOG_WARNING, "VBV buffer size not set, muxing may fail\n");
>>>>>> stream->max_buffer_size = 230*1024; //FIXME this is probably too small as default
>>>>>> + }
>>>>>
>>>>> Humm, this will warn for every VBR encode. I'm not sure at all that is
>>>>> wanted.
>>>>
>>>> VBR has buffers too, so it needs a buffer size too
>>>
>>> Hummm, but the encoder does not set rc_buffer_size when encoding VBR ?
>>
>> it does, it even requires it in some cases.
>> example:
>> -vb 30MB -minrate 10MB -maxrate 50MB -bt 50MB
>> (minrate != maxrate thus not CBR)
>
> .... I'm talking about no maxrate specified.
of course then theres no way to mux within the limits of that rate and buffer
as no such limits are known. Maybe we should just suppress all warnings or
bump buffer_size to some bitrate proportional value and hope. I dont know
but either way the resulting file is then no longer guranteed to play on
picky players
In that sense yes i see now why adding that warning was maybe silly, i just
thought many people would perfer to make sure the size is set and get a compliant
file, it also could be pointing at application bugs, that is ones forgetting
to pass the buffer size over from the encoder like ffmpeg.c did which was
used by some as example i expect
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
When the tyrant has disposed of foreign enemies by conquest or treaty, and
there is nothing more to fear from them, then he is always stirring up
some war or other, in order that the people may require a leader. -- Plato
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-cvslog/attachments/20101007/749d4081/attachment.pgp>
More information about the ffmpeg-cvslog
mailing list