[FFmpeg-devel] matroska encoder option -- force new Cluster on keyframe

Michael Niedermayer michaelni at gmx.at
Sun Jul 21 12:23:21 CEST 2013


On Sun, Jul 21, 2013 at 11:26:51AM +0200, Nicolas George wrote:
> Le tridi 3 thermidor, an CCXXI, Bernie Habermeier a écrit :
> > This is why I think this should be an option, and one that you'd only turn
> > on if you thought this was something that makes sense to you.  Overall,
> > when you transcode a movie, you have to make a lot of tradeoffs about size
> > and quality.  This option just allows you to make an additional decision
> > regarding seek time efficiency -- for cases where you absolutely care
> > about this -- perhaps on mobile devices.
> 
> Currently, the logic to start a new cluster seems to be:
> 
> * If the output file is not seekable (streaming/net), whatever comes first:
> 
>   * after 32 ko;
>   * after 1 s.
> 
> * If the output file is seekable, whatever comes first:
> 
>   * after 5 Mo;
>   * after 5 s;
>   * before a video key frame if the current cluster is already > 4 ko.
> 

> The most obvious seems to make all these values options:
> 
>   -max_stream_cluster_size 32k
>   -max_stream_cluster_duration 1000
>   -max_cluster_size 5M
>   -max_cluster_duration 5000
>   -min_cluster_size 4k

making all nummeric values of the current heuristic user setable
parameters might make it harder to change the heuristic later

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Its not that you shouldnt use gotos but rather that you should write
readable code and code with gotos often but not always is less readable
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20130721/10631df0/attachment.asc>


More information about the ffmpeg-devel mailing list