• LiuQi's avatar
    avformat/hlsenc: add a use_localtime option to expand the segment filename with localtime · a4055d3e
    LiuQi authored
    test examples:
    
    ./ffmpeg -re -i ~/Movies/objectC/facebook.mp4 -v verbose -c copy -f hls -hls_segment_filename test-%s.ts -use_localtime 1 -bsf:v h264_mp4toannexb aaa.m3u8
    
    [StevenLiu@localhost ffmpeg]$ cat aaa.m3u8;ll test-*.ts
    test-1441052221.ts
    test-1441052231.ts
    test-1441052235.ts
    test-1441052243.ts
    test-1441052249.ts
    -rw-r--r--  1 StevenLiu  staff  1310736  9  1 04:15 test-1441052131.ts
    -rw-r--r--  1 StevenLiu  staff   495192  9  1 04:15 test-1441052141.ts
    -rw-r--r--  1 StevenLiu  staff  1310736  9  1 04:17 test-1441052212.ts
    -rw-r--r--  1 StevenLiu  staff  1067840  9  1 04:17 test-1441052221.ts
    -rw-r--r--  1 StevenLiu  staff   235564  9  1 04:17 test-1441052231.ts
    -rw-r--r--  1 StevenLiu  staff  1187220  9  1 04:17 test-1441052235.ts
    -rw-r--r--  1 StevenLiu  staff   694848  9  1 04:17 test-1441052243.ts
    -rw-r--r--  1 StevenLiu  staff   526588  9  1 04:17 test-1441052249.ts
    [StevenLiu@localhost ffmpeg]$
    
    ./ffmpeg -re -i ~/Movies/objectC/facebook.mp4 -v verbose -c copy -f hls -hls_segment_filename test-%s.ts -use_localtime 1 -bsf:v h264_mp4toannexb aaa.m3u8
    
    [StevenLiu@localhost ffmpeg]$ cat aaa.m3u8;ll aaa-*.ts
    aaa-1441052417.ts
    aaa-1441052427.ts
    aaa-1441052437.ts
    aaa-1441052440.ts
    aaa-1441052449.ts
    -rw-r--r--  1 StevenLiu  staff  1310736  9  1 04:19 aaa-1441052382.ts
    -rw-r--r--  1 StevenLiu  staff   277300  9  1 04:19 aaa-1441052392.ts
    -rw-r--r--  1 StevenLiu  staff  1310736  9  1 04:20 aaa-1441052417.ts
    -rw-r--r--  1 StevenLiu  staff  1067840  9  1 04:20 aaa-1441052427.ts
    -rw-r--r--  1 StevenLiu  staff   235564  9  1 04:20 aaa-1441052437.ts
    -rw-r--r--  1 StevenLiu  staff  1187220  9  1 04:20 aaa-1441052440.ts
    -rw-r--r--  1 StevenLiu  staff   338776  9  1 04:20 aaa-1441052449.ts
    [StevenLiu@localhost ffmpeg]$
    Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
    a4055d3e
Name
Last commit
Last update
compat Loading commit data...
doc Loading commit data...
libavcodec Loading commit data...
libavdevice Loading commit data...
libavfilter Loading commit data...
libavformat Loading commit data...
libavresample Loading commit data...
libavutil Loading commit data...
libpostproc Loading commit data...
libswresample Loading commit data...
libswscale Loading commit data...
presets Loading commit data...
tests Loading commit data...
tools Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
COPYING.GPLv2 Loading commit data...
COPYING.GPLv3 Loading commit data...
COPYING.LGPLv2.1 Loading commit data...
COPYING.LGPLv3 Loading commit data...
CREDITS Loading commit data...
Changelog Loading commit data...
INSTALL.md Loading commit data...
LICENSE.md Loading commit data...
MAINTAINERS Loading commit data...
Makefile Loading commit data...
README.md Loading commit data...
RELEASE Loading commit data...
arch.mak Loading commit data...
cmdutils.c Loading commit data...
cmdutils.h Loading commit data...
cmdutils_common_opts.h Loading commit data...
cmdutils_opencl.c Loading commit data...
common.mak Loading commit data...
configure Loading commit data...
ffmpeg.c Loading commit data...
ffmpeg.h Loading commit data...
ffmpeg_dxva2.c Loading commit data...
ffmpeg_filter.c Loading commit data...
ffmpeg_opt.c Loading commit data...
ffmpeg_vdpau.c Loading commit data...
ffmpeg_videotoolbox.c Loading commit data...
ffplay.c Loading commit data...
ffprobe.c Loading commit data...
ffserver.c Loading commit data...
ffserver_config.c Loading commit data...
ffserver_config.h Loading commit data...
library.mak Loading commit data...
version.sh Loading commit data...