Update documentation to match code behavior after previous changes, also
reword the examples section.
... | ... |
@@ -411,7 +411,7 @@ For example a 3D WebM clip can be created using the following command line: |
411 | 411 |
ffmpeg -i sample_left_right_clip.mpg -an -c:v libvpx -metadata stereo_mode=left_right -y stereo_clip.webm |
412 | 412 |
@end example |
413 | 413 |
|
414 |
-@section segment |
|
414 |
+@section segment, stream_segment, ssegment |
|
415 | 415 |
|
416 | 416 |
Basic stream segmenter. |
417 | 417 |
|
... | ... |
@@ -419,30 +419,60 @@ The segmenter muxer outputs streams to a number of separate files of nearly |
419 | 419 |
fixed duration. Output filename pattern can be set in a fashion similar to |
420 | 420 |
@ref{image2}. |
421 | 421 |
|
422 |
+@code{stream_segment} is a variant of the muxer used to write to |
|
423 |
+streaming output formats, i.e. which do not require global headers, |
|
424 |
+and is recommended for outputting e.g. to MPEG transport stream segments. |
|
425 |
+@code{ssegment} is a shorter alias for @code{stream_segment}. |
|
426 |
+ |
|
422 | 427 |
Every segment starts with a video keyframe, if a video stream is present. |
428 |
+Note that if you want accurate splitting for a video file, you need to |
|
429 |
+make the input key frames correspond to the exact splitting times |
|
430 |
+expected by the segmenter, or the segment muxer will start the new |
|
431 |
+segment with the key frame found next after the specified start |
|
432 |
+time. |
|
433 |
+ |
|
423 | 434 |
The segment muxer works best with a single constant frame rate video. |
424 | 435 |
|
425 | 436 |
Optionally it can generate a flat list of the created segments, one segment |
426 |
-per line. |
|
437 |
+per line, by setting the option @var{segment_list}. |
|
438 |
+ |
|
439 |
+The segment muxer supports the following options: |
|
427 | 440 |
|
428 | 441 |
@table @option |
429 | 442 |
@item segment_format @var{format} |
430 | 443 |
Override the inner container format, by default it is guessed by the filename |
431 | 444 |
extension. |
432 | 445 |
@item segment_time @var{t} |
433 |
-Set segment duration to @var{t} seconds. |
|
446 |
+Set segment duration to @var{t} seconds. Default value is 2. |
|
434 | 447 |
@item segment_list @var{name} |
435 |
-Generate also a listfile named @var{name}. |
|
448 |
+Generate also a listfile named @var{name}. If not specified no |
|
449 |
+listfile is generated. |
|
436 | 450 |
@item segment_list_size @var{size} |
437 |
-Overwrite the listfile once it reaches @var{size} entries. |
|
451 |
+Overwrite the listfile once it reaches @var{size} entries. If 0 |
|
452 |
+the listfile is never overwritten. Default value is 5. |
|
438 | 453 |
@item segment_wrap @var{limit} |
439 | 454 |
Wrap around segment index once it reaches @var{limit}. |
440 | 455 |
@end table |
441 | 456 |
|
457 |
+Some examples follow. |
|
458 |
+ |
|
459 |
+@itemize |
|
460 |
+@item |
|
461 |
+To remux the content of file @file{in.mkv} to a list of segments |
|
462 |
+@file{out-000.nut}, @file{out-001.nut}, etc., and write the list of |
|
463 |
+generated segments to @file{out.list}: |
|
442 | 464 |
@example |
443 | 465 |
ffmpeg -i in.mkv -codec copy -map 0 -f segment -segment_list out.list out%03d.nut |
444 | 466 |
@end example |
445 | 467 |
|
468 |
+@item |
|
469 |
+To convert the @file{in.mkv} to TS segments using the @code{libx264} |
|
470 |
+and @code{libfaac} encoders: |
|
471 |
+@example |
|
472 |
+ffmpeg -i in.mkv -map 0 -codec:v libx264 -codec:a libfaac -f ssegment -segment_list out.list out%03d.ts |
|
473 |
+@end example |
|
474 |
+@end itemize |
|
475 |
+ |
|
446 | 476 |
@section mp3 |
447 | 477 |
|
448 | 478 |
The MP3 muxer writes a raw MP3 stream with an ID3v2 header at the beginning and |