summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorMika Raento <mika.raento@elisa.fi>2014-09-15 16:26:57 +0300
committerMichael Niedermayer <michaelni@gmx.at>2014-09-15 22:16:44 +0200
commitf685f7d7a8386365f452cc38c546327f7df20296 (patch)
tree4f1a869432a76a7df84ddc2df3e18dd409814615 /doc
parentad1dadac86d4dff02a8d69b25637371cbc1f31f6 (diff)
hlsenc: single_file, support HLS ver 4 byteranges
This adds a new option -hls_flags single_file that creates one .ts file for HLS and adds byteranges to the .m3u8 file, instead of creating one .ts file for each segment. This is helpful at least for storing large number of videos, as the number of files per video is drastically reduced and copying and storing those files takes less requests and inodes. This is based on work by Nicolas Martyanoff, discussed on ffmpeg-devel in July 2014. That patch seems abandoned by the author, and contained unrelated changes. This patch tries to add the minimum amount of code to support the byterange playlists. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'doc')
-rw-r--r--doc/muxers.texi23
1 files changed, 19 insertions, 4 deletions
diff --git a/doc/muxers.texi b/doc/muxers.texi
index 57e81f49fb..40ae857040 100644
--- a/doc/muxers.texi
+++ b/doc/muxers.texi
@@ -194,15 +194,19 @@ can not be smaller than one centi second.
Apple HTTP Live Streaming muxer that segments MPEG-TS according to
the HTTP Live Streaming (HLS) specification.
-It creates a playlist file and numbered segment files. The output
-filename specifies the playlist filename; the segment filenames
-receive the same basename as the playlist, a sequential number and
-a .ts extension.
+It creates a playlist file, and one or more segment files. The output filename
+specifies the playlist filename.
+
+By default, the muxer creates a file for each segment produced. These files
+have the same name as the playlist, followed by a sequential number and a
+.ts extension.
For example, to convert an input file with @command{ffmpeg}:
@example
ffmpeg -i in.nut out.m3u8
@end example
+This example will produce the playlist, @file{out.m3u8}, and segment files:
+@file{out0.ts}, @file{out1.ts}, @file{out2.ts}, etc.
See also the @ref{segment} muxer, which provides a more generic and
flexible implementation of a segmenter, and can be used to perform HLS
@@ -241,6 +245,17 @@ Note that the playlist sequence number must be unique for each segment
and it is not to be confused with the segment filename sequence number
which can be cyclic, for example if the @option{wrap} option is
specified.
+
+@item hls_flags single_file
+If this flag is set, the muxer will store all segments in a single MPEG-TS
+file, and will use byte ranges in the playlist. HLS playlists generated with
+this way will have the version number 4.
+For example:
+@example
+ffmpeg -i in.nut -hls_flags single_file out.m3u8
+@end example
+Will produce the playlist, @file{out.m3u8}, and a single segment file,
+@file{out.ts}.
@end table
@anchor{ico}