1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

Merge commit '0e702124ee149593168cbbb7b30376249a64ae66'

* commit '0e702124ee149593168cbbb7b30376249a64ae66':
  doc: Provide better examples for hls and segment muxing

Merged-by: James Almer <jamrial@gmail.com>
This commit is contained in:
James Almer 2017-11-11 23:47:50 -03:00
commit 27aa69896b

View File

@ -468,9 +468,12 @@ 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.
Make sure to require a closed GOP when encoding and to set the GOP
size to fit your segment time constraint.
For example, to convert an input file with @command{ffmpeg}:
@example
ffmpeg -i in.nut out.m3u8
ffmpeg -i in.mkv -c:v h264 -flags +cgop -g 30 -hls_time 1 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.
@ -1649,6 +1652,9 @@ segment would usually span. Otherwise, the segment will be filled with the next
packet written. Defaults to @code{0}.
@end table
Make sure to require a closed GOP when encoding and to set the GOP
size to fit your segment time constraint.
@subsection Examples
@itemize
@ -1657,7 +1663,7 @@ Remux the content of file @file{in.mkv} to a list of segments
@file{out-000.nut}, @file{out-001.nut}, etc., and write the list of
generated segments to @file{out.list}:
@example
ffmpeg -i in.mkv -codec copy -map 0 -f segment -segment_list out.list out%03d.nut
ffmpeg -i in.mkv -codec hevc -flags +cgop -g 60 -map 0 -f segment -segment_list out.list out%03d.nut
@end example
@item