[FFmpeg-devel] matroska encoder option -- force new Cluster on keyframe
Bernie Habermeier
bernt at wulfram.com
Sun Jul 21 11:31:29 CEST 2013
On Jul 21, 2013, at 2:26 AM, 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
>
> (with a word in the doc that the max size/duration can be exceeded by up to
> one packet)
>
> It would also probably be the easiest.
>
> Note that the current logic seems to already implement what Michael and you
> have been discussing: start a new cluster at each keyframe except if they
> are too frequent (4 ko).
But I explicitly WANT to have an option that doesn't "take it under advisement".
Specifically, I want to control exact placement of my I-frames, and therefore CuePoints, and I want to a 100% guarantee that I have a new Cluster start for each such CuePoint. What you're proposing does not do that at all, and has a completely different feel to it. We can certainly add this kind of control, and I'm fine implementing that, but that is specifically not what I want.
Cheers,
Bernie
More information about the ffmpeg-devel
mailing list