[FFmpeg-devel] matroska encoder option -- force new Cluster on keyframe
Nicolas George
nicolas.george at normalesup.org
Sun Jul 21 11:26:51 CEST 2013
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).
Regards,
--
Nicolas George
-------------- 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/45500284/attachment.asc>
More information about the ffmpeg-devel
mailing list