[FFmpeg-devel] doc/hlsenc: hls_segment_filename, use_localtime, , use_localtime_mkdir, hls_flags

Submitted by Bodecs Bela on Jan. 2, 2017, 1:24 p.m.

Details

Message ID c1d98521-c960-9fd8-9807-518b673a8dca@vivanet.hu
State New
Headers show

Commit Message

Bodecs Bela Jan. 2, 2017, 1:24 p.m.
2017.01.02. 13:54 keltezéssel, Moritz Barsnick írta:
> On Mon, Jan 02, 2017 at 12:49:50 +0100, Bodecs Bela wrote:
>> Subject: [FFmpeg-devel] [PATCH] doc/hlsenc: hls_segment_filename, use_localtime, , use_localtime_mkdir, hls_flags
>                                                                                     ^^
> There's a ", " too much in that part of the commit message.
>
>> +@var{filename} may contain full path or relative path specification, but only the file name part without any path info will be contained in the m3u8 segment list.
> You should break this line.
>
>> +Should relative path is specified, path of created segment files will be relative to the current working directory.
> ->
>    Should a relative path be specified, the path of the created segment
>    files will be relative to the current working directory.
>
>> +When -use_localtime_mkdir is set, the whole expanded value of @var{filename} will be written into m3u8 segment list.
>          ^ I think you should omit the dashes, as these are primarily
>            library options, not command line options.
>
> And do add an article: "...  will be written into the m3u8 segment
> list."
>
>> -@file{file-20160215-1455569023.ts}, @file{file-20160215-1455569024.ts}, etc.
>> +@file{file-20160215-1455569023.ts}, @file{file-20160215-1455569024.ts}, etc. (Notice: in some systems/environments %s specifier is not available. See strftime() documentation!)
> ->
>    Note: On some systems/environments, the code{%s} specifier is not available. See
>    code{strftime()} documentation.
>
> (Avoid exclamation marks.)
>
>> +This example will create a directory hierarchy 2016/02/15 (if any of them does not exist), and then
>                                                                               ^ do
Thank you. I have made all suggested changes.
> Moritz
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

Comments

Michael Niedermayer Jan. 5, 2017, 12:24 a.m.
On Mon, Jan 02, 2017 at 02:24:22PM +0100, Bodecs Bela wrote:
> 
> 
> 2017.01.02. 13:54 keltezéssel, Moritz Barsnick írta:
> >On Mon, Jan 02, 2017 at 12:49:50 +0100, Bodecs Bela wrote:
> >>Subject: [FFmpeg-devel] [PATCH] doc/hlsenc: hls_segment_filename, use_localtime, , use_localtime_mkdir, hls_flags
> >                                                                                    ^^
> >There's a ", " too much in that part of the commit message.
> >
> >>+@var{filename} may contain full path or relative path specification, but only the file name part without any path info will be contained in the m3u8 segment list.
> >You should break this line.
> >
> >>+Should relative path is specified, path of created segment files will be relative to the current working directory.
> >->
> >   Should a relative path be specified, the path of the created segment
> >   files will be relative to the current working directory.
> >
> >>+When -use_localtime_mkdir is set, the whole expanded value of @var{filename} will be written into m3u8 segment list.
> >         ^ I think you should omit the dashes, as these are primarily
> >           library options, not command line options.
> >
> >And do add an article: "...  will be written into the m3u8 segment
> >list."
> >
> >>-@file{file-20160215-1455569023.ts}, @file{file-20160215-1455569024.ts}, etc.
> >>+@file{file-20160215-1455569023.ts}, @file{file-20160215-1455569024.ts}, etc. (Notice: in some systems/environments %s specifier is not available. See strftime() documentation!)
> >->
> >   Note: On some systems/environments, the code{%s} specifier is not available. See
> >   code{strftime()} documentation.
> >
> >(Avoid exclamation marks.)
> >
> >>+This example will create a directory hierarchy 2016/02/15 (if any of them does not exist), and then
> >                                                                              ^ do
> Thank you. I have made all suggested changes.
> >Moritz
> >_______________________________________________
> >ffmpeg-devel mailing list
> >ffmpeg-devel@ffmpeg.org
> >http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> 

>  muxers.texi |   47 +++++++++++++++++++++++++++++++++++------------
>  1 file changed, 35 insertions(+), 12 deletions(-)
> c0e3481cbb64139648b9138baea7b18ce75c7de8  0001-doc-muxers-hls_segment_filename-use_localtime-use_lo.patch
> From 2720f2410feb9c51a6d37477f432780dc2594c5d Mon Sep 17 00:00:00 2001
> From: Bela Bodecs <bodecsb@vivanet.hu>
> Date: Sun, 1 Jan 2017 22:48:27 +0100
> Subject: [PATCH] doc/muxers: hls_segment_filename, use_localtime,
>  use_localtime_mkdir, hls_flags

seems this was already approved by steven and this fixes all issues
found by Moritz so applied

thx

[...]
Michael Niedermayer Jan. 5, 2017, 12:37 a.m.
On Thu, Jan 05, 2017 at 01:24:00AM +0100, Michael Niedermayer wrote:
> On Mon, Jan 02, 2017 at 02:24:22PM +0100, Bodecs Bela wrote:
> > 
> > 
> > 2017.01.02. 13:54 keltezéssel, Moritz Barsnick írta:
> > >On Mon, Jan 02, 2017 at 12:49:50 +0100, Bodecs Bela wrote:
> > >>Subject: [FFmpeg-devel] [PATCH] doc/hlsenc: hls_segment_filename, use_localtime, , use_localtime_mkdir, hls_flags
> > >                                                                                    ^^
> > >There's a ", " too much in that part of the commit message.
> > >
> > >>+@var{filename} may contain full path or relative path specification, but only the file name part without any path info will be contained in the m3u8 segment list.
> > >You should break this line.
> > >
> > >>+Should relative path is specified, path of created segment files will be relative to the current working directory.
> > >->
> > >   Should a relative path be specified, the path of the created segment
> > >   files will be relative to the current working directory.
> > >
> > >>+When -use_localtime_mkdir is set, the whole expanded value of @var{filename} will be written into m3u8 segment list.
> > >         ^ I think you should omit the dashes, as these are primarily
> > >           library options, not command line options.
> > >
> > >And do add an article: "...  will be written into the m3u8 segment
> > >list."
> > >
> > >>-@file{file-20160215-1455569023.ts}, @file{file-20160215-1455569024.ts}, etc.
> > >>+@file{file-20160215-1455569023.ts}, @file{file-20160215-1455569024.ts}, etc. (Notice: in some systems/environments %s specifier is not available. See strftime() documentation!)
> > >->
> > >   Note: On some systems/environments, the code{%s} specifier is not available. See
> > >   code{strftime()} documentation.
> > >
> > >(Avoid exclamation marks.)
> > >
> > >>+This example will create a directory hierarchy 2016/02/15 (if any of them does not exist), and then
> > >                                                                              ^ do
> > Thank you. I have made all suggested changes.
> > >Moritz
> > >_______________________________________________
> > >ffmpeg-devel mailing list
> > >ffmpeg-devel@ffmpeg.org
> > >http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> > 
> 
> >  muxers.texi |   47 +++++++++++++++++++++++++++++++++++------------
> >  1 file changed, 35 insertions(+), 12 deletions(-)
> > c0e3481cbb64139648b9138baea7b18ce75c7de8  0001-doc-muxers-hls_segment_filename-use_localtime-use_lo.patch
> > From 2720f2410feb9c51a6d37477f432780dc2594c5d Mon Sep 17 00:00:00 2001
> > From: Bela Bodecs <bodecsb@vivanet.hu>
> > Date: Sun, 1 Jan 2017 22:48:27 +0100
> > Subject: [PATCH] doc/muxers: hls_segment_filename, use_localtime,
> >  use_localtime_mkdir, hls_flags
> 
> seems this was already approved by steven and this fixes all issues
> found by Moritz so applied

this was already applied by steven :)

[...]

Patch hide | download patch | download mbox

From 2720f2410feb9c51a6d37477f432780dc2594c5d Mon Sep 17 00:00:00 2001
From: Bela Bodecs <bodecsb@vivanet.hu>
Date: Sun, 1 Jan 2017 22:48:27 +0100
Subject: [PATCH] doc/muxers: hls_segment_filename, use_localtime,
 use_localtime_mkdir, hls_flags

added some more details and example. hls_flags option list reformatted
to table

Signed-off-by: Bela Bodecs <bodecsb@vivanet.hu>
---
 doc/muxers.texi | 47 +++++++++++++++++++++++++++++++++++------------
 1 file changed, 35 insertions(+), 12 deletions(-)

diff --git a/doc/muxers.texi b/doc/muxers.texi
index c2598b2..018f289 100644
--- a/doc/muxers.texi
+++ b/doc/muxers.texi
@@ -441,8 +441,15 @@  ffmpeg -i in.nut -hls_segment_filename 'file%03d.ts' out.m3u8
 This example will produce the playlist, @file{out.m3u8}, and segment files:
 @file{file000.ts}, @file{file001.ts}, @file{file002.ts}, etc.
 
+@var{filename} may contain full path or relative path specification,
+but only the file name part without any path info will be contained in the m3u8 segment list.
+Should a relative path be specified, the path of the created segment
+files will be relative to the current working directory.
+When use_localtime_mkdir is set, the whole expanded value of @var{filename} will be written into the m3u8 segment list.
+
+
 @item use_localtime
-Use strftime on @var{filename} to expand the segment filename with localtime.
+Use strftime() on @var{filename} to expand the segment filename with localtime.
 The segment number is also available in this mode, but to use it, you need to specify second_level_segment_index
 hls_flag and %%d will be the specifier.
 @example
@@ -450,6 +457,8 @@  ffmpeg -i in.nut -use_localtime 1 -hls_segment_filename 'file-%Y%m%d-%s.ts' out.
 @end example
 This example will produce the playlist, @file{out.m3u8}, and segment files:
 @file{file-20160215-1455569023.ts}, @file{file-20160215-1455569024.ts}, etc.
+Note: On some systems/environments, the @code{%s} specifier is not available. See
+  @code{strftime()} documentation.
 @example
 ffmpeg -i in.nut -use_localtime 1 -hls_flags second_level_segment_index -hls_segment_filename 'file-%Y%m%d-%%04d.ts' out.m3u8
 @end example
@@ -457,14 +466,21 @@  This example will produce the playlist, @file{out.m3u8}, and segment files:
 @file{file-20160215-0001.ts}, @file{file-20160215-0002.ts}, etc.
 
 @item use_localtime_mkdir
-Used together with -use_localtime, it will create up to one subdirectory which
+Used together with -use_localtime, it will create all subdirectories which
 is expanded in @var{filename}.
 @example
 ffmpeg -i in.nut -use_localtime 1 -use_localtime_mkdir 1 -hls_segment_filename '%Y%m%d/file-%Y%m%d-%s.ts' out.m3u8
 @end example
 This example will create a directory 201560215 (if it does not exist), and then
 produce the playlist, @file{out.m3u8}, and segment files:
-@file{201560215/file-20160215-1455569023.ts}, @file{201560215/file-20160215-1455569024.ts}, etc.
+@file{20160215/file-20160215-1455569023.ts}, @file{20160215/file-20160215-1455569024.ts}, etc.
+
+@example
+ffmpeg -i in.nut -use_localtime 1 -use_localtime_mkdir 1 -hls_segment_filename '%Y/%m/%d/file-%Y%m%d-%s.ts' out.m3u8
+@end example
+This example will create a directory hierarchy 2016/02/15 (if any of them do not exist), and then
+produce the playlist, @file{out.m3u8}, and segment files:
+@file{2016/02/15/file-20160215-1455569023.ts}, @file{2016/02/15/file-20160215-1455569024.ts}, etc.
 
 
 @item hls_key_info_file @var{key_info_file}
@@ -523,7 +539,12 @@  ffmpeg -f lavfi -re -i testsrc -c:v h264 -hls_flags delete_segments \
   -hls_key_info_file file.keyinfo out.m3u8
 @end example
 
-@item hls_flags single_file
+
+@item hls_flags @var{flags}
+Possible values:
+
+@table @samp
+@item single_file
 If this flag is set, the muxer will store all segments in a single MPEG-TS
 file, and will use byte ranges in the playlist. HLS playlists generated with
 this way will have the version number 4.
@@ -534,37 +555,39 @@  ffmpeg -i in.nut -hls_flags single_file out.m3u8
 Will produce the playlist, @file{out.m3u8}, and a single segment file,
 @file{out.ts}.
 
-@item hls_flags delete_segments
+@item delete_segments
 Segment files removed from the playlist are deleted after a period of time
 equal to the duration of the segment plus the duration of the playlist.
 
-@item hls_flags append_list
+@item append_list
 Append new segments into the end of old segment list,
 and remove the @code{#EXT-X-ENDLIST} from the old segment list.
 
-@item hls_flags round_durations
+@item round_durations
 Round the duration info in the playlist file segment info to integer
 values, instead of using floating point.
 
-@item hls_flags discont_starts
+@item discont_starts
 Add the @code{#EXT-X-DISCONTINUITY} tag to the playlist, before the
 first segment's information.
 
-@item hls_flags omit_endlist
+@item omit_endlist
 Do not append the @code{EXT-X-ENDLIST} tag at the end of the playlist.
 
-@item hls_flags split_by_time
+@item split_by_time
 Allow segments to start on frames other than keyframes. This improves
 behavior on some players when the time between keyframes is inconsistent,
 but may make things worse on others, and can cause some oddities during
 seeking. This flag should be used with the @code{hls_time} option.
 
-@item hls_flags program_date_time
+@item program_date_time
 Generate @code{EXT-X-PROGRAM-DATE-TIME} tags.
 
-@item hls_flags second_level_segment_index
+@item second_level_segment_index
 Makes it possible to use segment indexes as %%d besides date/time values when use_localtime is on.
 
+@end table
+
 @item hls_playlist_type event
 Emit @code{#EXT-X-PLAYLIST-TYPE:EVENT} in the m3u8 header. Forces
 @option{hls_list_size} to 0; the playlist can only be appended to.
-- 
2.5.3.windows.1