diff options
author | James Almer <jamrial@gmail.com> | 2017-11-11 23:47:50 -0300 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2017-11-11 23:47:50 -0300 |
commit | 27aa69896bd6a816026f0fd57b12ad1fc147ab65 (patch) | |
tree | ac25704c3b93f707b5970d20165b9ee80ded0bd2 | |
parent | 82fc222f676fd4e0dc8328e3abf17fba45d11af5 (diff) | |
parent | 0e702124ee149593168cbbb7b30376249a64ae66 (diff) | |
download | ffmpeg-27aa69896bd6a816026f0fd57b12ad1fc147ab65.tar.gz |
Merge commit '0e702124ee149593168cbbb7b30376249a64ae66'
* commit '0e702124ee149593168cbbb7b30376249a64ae66':
doc: Provide better examples for hls and segment muxing
Merged-by: James Almer <jamrial@gmail.com>
-rw-r--r-- | doc/muxers.texi | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/doc/muxers.texi b/doc/muxers.texi index 91bbe673c5..43f3776b13 100644 --- a/doc/muxers.texi +++ b/doc/muxers.texi @@ -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 |