[FFmpeg-devel] [PATCH] Add rc_max_rate to ffprobe stream output
michaelni at gmx.at
Sun Jun 8 16:18:32 CEST 2014
On Sun, Jun 08, 2014 at 03:42:59PM +0200, Stefano Sabatini wrote:
> On date Sunday 2014-06-08 14:10:12 +0200, Michael Niedermayer encoded:
> > On Sun, Jun 08, 2014 at 12:57:28PM +0200, Stefano Sabatini wrote:
> > > On date Wednesday 2014-06-04 18:49:18 +0000, Carl Eugen Hoyos encoded:
> > > > Stefano Sabatini <stefasab <at> gmail.com> writes:
> > > >
> > > > > > + if (dec_ctx->rc_max_rate > 0) print_val
> > > > > ("max_bit_rate", dec_ctx->rc_max_rate, unit_bit_per_second_str);
> > > > > > + else print_str_opt("max_bit_rate", "N/A");
> > > > >
> > > > > AVCodecContext.rc_max_rate is an encoding parameter
> > > >
> > > > The documentation is now fixed.
> > >
> > > ffmpeg-codecs(1)
> > >
> > > maxrate integer (encoding,audio,video)
> > > Set max bitrate tolerance (in bits/s). Requires bufsize to be set.
> > >
> > > So the question still stands: what's the use case for this?
> > the max rate is part of the paremeters needed for creating correct
> > valid VBR/CBR mpeg*/h26*. Which can be especially important if you
> > care about spec compliance or supporting hw players. or intent to
> > transmit the data over a channel with low latency that doesnt have
> > infinite bandwidth and want to have a proof it will work and not just
> > hope it will ...
> > ok above is talk about encoding but
> > concrete use cases, you have some stream, be that clasical broadcast,
> > internet streaming stuff, or some kind of storage media.
> > and you want to create a similar compatible stream, you need to know
> > the buffer sizes and max rate for that.
> > ffprobe displaying what existing streams use should be helpfull in
> > choosing valid parameters if you have no access to the proper specs
> > and its not one of the common formats like DVD/VCD ...
> So what about updating the option bits (libavcodec/options_table.h,
What exactly do you want me to change ?
that file looks a bit small, i dont think thats the file you meant
> Otherwise there is no much chance for a random
> user to understand how to interpret that value (and that that value is
> meaningful only for MPEG video, and is probably meaningless for other
its really not just meaningfull for some but practically every
variable bitrate codec not just video but all.
Only codecs that work by chance and hope in a constrained bandwidth
environment have no maximum bitrate
because if you have a 512kbit/sec connection/channel and a variable
bitrate encoder decides to encode to 1024kbit/sec due to higher
complexity content you WILL hit a problem eventually. Only by
specifying the limits to how far and for how long a encoder can go
over the target bitrate (to say it with fuzzy terms) can it work.
This is perfectly true even for local files but the average HDD/SSD
is generally fast enough for the average content so people can
all ignore it for their movies and it works.
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
it is not once nor twice but times without number that the same ideas make
their appearance in the world. -- Aristotle
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 181 bytes
Desc: Digital signature
More information about the ffmpeg-devel