From 6c31c99289e39ac1bf2b44828d2795086aa0d6a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johan=20Str=C3=B6m?= Date: Wed, 3 Feb 2016 22:20:07 +0100 Subject: hlsenc: add use_localtime_mkdir option to automatically create time-based directory Use with -use_localtime, and set -hls_segment_filename to a path which contains a subdirectory i.e. /some/path/%Y%m%d/%Y%m%dT%H%M%S-%s.ts This will mkdir the %Y%m%d-part of the path if it does not already exist. In addition, each filename in the playlist output will be prefixed with this subdirectory (if playlist and segment shares the same base path). Signed-off-by: Michael Niedermayer --- doc/muxers.texi | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'doc') diff --git a/doc/muxers.texi b/doc/muxers.texi index 2e6bb4c..f2ad7fe 100644 --- a/doc/muxers.texi +++ b/doc/muxers.texi @@ -318,6 +318,26 @@ ffmpeg 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. +@item use_localtime +Use strftime on @var{filename} to expand the segment filename with localtime. +The segment number (%d) is not available in this mode. +@example +ffmpeg in.nut -use_localtime 1 -hls_segment_filename 'file-%Y%m%d-%s.ts' out.m3u8 +@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. + +@item use_localtime_mkdir +Used together with -use_localtime, it will create up to one subdirectory which +is expanded in @var{filename}. +@example +ffmpeg 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. + + @item hls_key_info_file @var{key_info_file} Use the information in @var{key_info_file} for segment encryption. The first line of @var{key_info_file} specifies the key URI written to the playlist. The -- cgit v1.1