diff options
author | Bodecs Bela <bodecsb@vivanet.hu> | 2017-01-12 15:43:10 +0300 |
---|---|---|
committer | Steven Liu <lq@chinaffmpeg.org> | 2017-01-12 15:43:10 +0300 |
commit | 8811d6d9a07f9d1b8d22397c0e009d075d67fda0 (patch) | |
tree | c2e63311e7365a4a711c1dc9ae8253a70fd0b843 /doc/muxers.texi | |
parent | e1f49712099d3b68c35cf8ebb95cc7f34b06ee55 (diff) |
avformat/hlsenc: hls_start_number_source and start_number
start_number option starts the playlist sequence number
(#EXT-X-MEDIA-SEQUENCE) from the specified number. Unless hls_flags
single_file is set, it also specifies starting sequence numbers of
segment and subtitle filenames. Sometimes it is usefull to have unique
starting numbers at each run, but currently it is only achiveable by
setting this parameter manually.
This patch enables to specify start_number source parameter by
introducing hls_start_number_source with 3 possible values:
generic/epoch/datetime. This ensures to set start sequence number
automatically for practically unique numbers. Generic option is the
default and this is the curent behaviour: start_number option value
specifies the start sequence number. (start_number default value is 0)
If hls_start_number_source is set to epoch, then the start number will
be the seconds since epoch (1970-01-01 00:00:00). If set to datetime,
then the start sequence number will be based on the current date/time
value as YYYYmmddHHMMSS. e.g. 20161231235659.
Hls speficication allows 64 bit integers as sequence numbers. This patch
also changes some code where only 32 bit integer values were handled
correctly.
Reviewed-by: Moritz Barsnick <barsnick@gmx.net>
Signed-off-by: Bela Bodecs <bodecsb@vivanet.hu>
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
Diffstat (limited to 'doc/muxers.texi')
-rw-r--r-- | doc/muxers.texi | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/doc/muxers.texi b/doc/muxers.texi index 351cd8c5c4..26a8f2dbc3 100644 --- a/doc/muxers.texi +++ b/doc/muxers.texi @@ -416,9 +416,34 @@ This option is useful to avoid to fill the disk with many segment files, and limits the maximum number of segment files written to disk to @var{wrap}. + +@item hls_start_number_source +Start the playlist sequence number (@code{#EXT-X-MEDIA-SEQUENCE}) according to the specified source. +Unless @code{hls_flags single_file} is set, it also specifies source of starting sequence numbers of +segment and subtitle filenames. In any case, if @code{hls_flags append_list} +is set and read playlist sequence number is greater than the specified start sequence number, +then that value will be used as start value. + +It accepts the following values: + +@table @option + +@item generic (default) +Set the starting sequence numbers according to @var{start_number} option value. + +@item epoch +The start number will be the seconds since epoch (1970-01-01 00:00:00) + +@item datetime +The start number will be based on the current date/time as YYYYmmddHHMMSS. e.g. 20161231235759. + +@end table + @item start_number @var{number} -Start the playlist sequence number from @var{number}. Default value is -0. +Start the playlist sequence number (@code{#EXT-X-MEDIA-SEQUENCE}) from the specified @var{number} +when @var{hls_start_number_source} value is @var{generic}. (This is the default case.) +Unless @code{hls_flags single_file} is set, it also specifies starting sequence numbers of segment and subtitle filenames. +Default value is 0. @item hls_allow_cache @var{allowcache} Explicitly set whether the client MAY (1) or MUST NOT (0) cache media segments. |