Commit 27aa6989 authored by James Almer's avatar James Almer

Merge commit '0e702124'

* commit '0e702124':
  doc: Provide better examples for hls and segment muxing
Merged-by: 's avatarJames Almer <jamrial@gmail.com>
parents 82fc222f 0e702124
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment