Browse code

doc/muxers/hls: extend documentation

In particular, reference segment muxer and clarify difference between
segment filename number and playlist sequence number.

Should fix trac ticket #2601.

Stefano Sabatini authored on 2014/01/02 08:30:37
Showing 1 changed files
... ...
@@ -184,26 +184,49 @@ can not be smaller than one centi second.
184 184
 @section hls
185 185
 
186 186
 Apple HTTP Live Streaming muxer that segments MPEG-TS according to
187
-the HTTP Live Streaming specification.
187
+the HTTP Live Streaming (HLS) specification.
188 188
 
189 189
 It creates a playlist file and numbered segment files. The output
190 190
 filename specifies the playlist filename; the segment filenames
191 191
 receive the same basename as the playlist, a sequential number and
192 192
 a .ts extension.
193 193
 
194
+For example, to convert an input file with @command{ffmpeg}:
194 195
 @example
195 196
 ffmpeg -i in.nut out.m3u8
196 197
 @end example
197 198
 
199
+See also the @ref{segment} muxer, which provides a more generic and
200
+flexible implementation of a segmenter, and can used to perform HLS
201
+segmentation.
202
+
203
+This muxer supports the following options:
204
+
198 205
 @table @option
199
-@item -hls_time @var{seconds}
200
-Set the segment length in seconds.
201
-@item -hls_list_size @var{size}
202
-Set the maximum number of playlist entries.
203
-@item -hls_wrap @var{wrap}
204
-Set the number after which index wraps.
205
-@item -start_number @var{number}
206
-Start the sequence from @var{number}.
206
+@item hls_time @var{seconds}
207
+Set the segment length in seconds. Default value is 2.
208
+
209
+@item hls_list_size @var{size}
210
+Set the maximum number of playlist entries. If set to 0 the list file
211
+will contain all the segments. Default value is 5.
212
+
213
+@item hls_wrap @var{wrap}
214
+Set the number after which the segment filename number (the number
215
+specified in each segment file) wraps. If set to 0 the number will be
216
+never wrapped. Default value is 0.
217
+
218
+This option is useful to avoid to fill the disk with many segment
219
+files, and limits the maximum number of segment files written to disk
220
+to @var{wrap}.
221
+
222
+@item start_number @var{number}
223
+Start the playlist sequence number from @var{number}. Default value is
224
+0.
225
+
226
+Note that the playlist sequence number must be unique for each segment
227
+and it is not to be confused with the segment filename sequence number
228
+which can be cyclic, for example if the @option{wrap} option is
229
+specified.
207 230
 @end table
208 231
 
209 232
 @anchor{ico}
... ...
@@ -648,6 +671,7 @@ situations, giving a small seek granularity at the cost of additional container
648 648
 overhead.
649 649
 @end table
650 650
 
651
+@anchor{segment}
651 652
 @section segment, stream_segment, ssegment
652 653
 
653 654
 Basic stream segmenter.