diff options
author | Stefano Sabatini <stefasab@gmail.com> | 2012-01-28 22:21:43 +0100 |
---|---|---|
committer | Stefano Sabatini <stefasab@gmail.com> | 2012-07-10 00:53:01 +0200 |
commit | aef9e94f73b9e5e21f7a790343e0b4ffb9e2acee (patch) | |
tree | eb387647f758c3e07baa8a51d6fce7edc789fbbb /doc/muxers.texi | |
parent | 2058b52cf8a4eea9bf046f72b98e89fe9b36d3e3 (diff) | |
download | ffmpeg-aef9e94f73b9e5e21f7a790343e0b4ffb9e2acee.tar.gz |
lavf/segment: add -segment_time_delta option
Diffstat (limited to 'doc/muxers.texi')
-rw-r--r-- | doc/muxers.texi | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/doc/muxers.texi b/doc/muxers.texi index 7934fe2c89..aee90b53ce 100644 --- a/doc/muxers.texi +++ b/doc/muxers.texi @@ -474,6 +474,28 @@ the segment start and end time expressed in seconds. Default value is "flat". @item segment_time @var{time} Set segment duration to @var{time}. Default value is "2". +@item segment_time_delta @var{delta} +Specify the accuracy time when selecting the start time for a +segment. Default value is "0". + +When delta is specified a key-frame will start a new segment if its +PTS satisfies the relation: +@example +PTS >= start_time - time_delta +@end example + +This option is useful when splitting video content, which is always +split at GOP boundaries, in case a key frame is found just before the +specified split time. + +In particular may be used in combination with the @file{ffmpeg} option +@var{force_key_frames}. The key frame times specified by +@var{force_key_frames} may not be set accurately because of rounding +issues, with the consequence that a key frame time may result set just +before the specified time. For constant frame rate videos a value of +1/2*@var{frame_rate} should address the worst case mismatch between +the specified time and the time set by @var{force_key_frames}. + @item segment_times @var{times} Specify a list of split points. @var{times} contains a list of comma separated duration specifications, in increasing order. @@ -500,6 +522,18 @@ ffmpeg -i in.mkv -codec copy -map 0 -f segment -segment_list_type ext -segment_l @end example @item +As the example above, but use the @code{ffmpeg} @var{force_key_frames} +option to force key frames in the input at the specified location, together +with the segment option @var{segment_time_delta} to account for +possible roundings operated when setting key frame times. +@example +ffmpeg -i in.mkv -force_key_frames 1,2,3,5,8,13,21 -vcodec mpeg4 -acodec pcm_s16le -map 0 \ +-f segment -segment_list_type ext -segment_list out.list -segment_list_size 0 -segment_times 1,2,3,5,8,13,21 -segment_time_delta 0.05 out%03d.nut +@end example +In order to force key frames on the input file, transcoding is +required. + +@item To convert the @file{in.mkv} to TS segments using the @code{libx264} and @code{libfaac} encoders: @example |