#8733 closed defect (wontfix)
hls segments list repeated names
Reported by: | krs_vital | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | undetermined |
Version: | unspecified | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | no | |
Analyzed by developer: | no |
Description
i trying to set repeated numbering names fro hls segments which should be called 0.ts ... 9.ts and so on in a circle...
ffmpeg version N-98130-g38737b3 Copyright (c) 2000-2020 the FFmpeg developers
command:
/usr/local/bin/ffmpeg -dts_delta_threshold 3600 -err_detect ignore_err -rtpflags +skip_rtcp+h264_mode0 -rtsp_flags +prefer_tcp -rtsp_transport tcp -i rtsp://admin:1q2w3e09@172.22.56.177:554/profile1 -y -sn -dn -hls_time 1 -hls_flags +delete_segments+split_by_time -map 0:v -ignore_unknown -hls_segment_filename /hls/test/123/%00d.ts -f hls -vcodec copy -acodec copy /hls/test/123/index.m3u8
i tried to set %d, %01d, %001d and so on, but names of files doesnt change and begin from 0 to infinity allways....
what am I doing wrong?
Change History (14)
comment:1 by , 4 years ago
comment:2 by , 4 years ago
1:%01d
/usr/local/bin/ffmpeg -re -i /hls/test.ts -y -sn -dn -hls_time 1 -hls_flags +split_by_time -hls_segment_filename /hls/test/123/%01d.ts -f hls -c copy /hls/test/123/index.m3u8
ffmpeg version N-98130-g38737b3 Copyright (c) 2000-2020 the FFmpeg developers
built with gcc 4.8.5 (GCC) 20150623 (Red Hat 4.8.5-39)
configuration: --libdir=/usr/lib64
libavutil 56. 54.100 / 56. 54.100
libavcodec 58. 92.100 / 58. 92.100
libavformat 58. 46.101 / 58. 46.101
libavdevice 58. 11.100 / 58. 11.100
libavfilter 7. 86.100 / 7. 86.100
libswscale 5. 8.100 / 5. 8.100
libswresample 3. 8.100 / 3. 8.100
Input #0, mpegts, from '/hls/test.ts':
Duration: 00:00:23.76, start: 1.400000, bitrate: 3270 kb/s
Program 1
Metadata:
service_name : profile1
service_provider: FFmpeg
Stream #0:0[0x100]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuvj420p(pc, bt709, progressive), 1920x1080, 25 fps, 25 tbr, 90k tbn, 180k tbc
Stream #0:1[0x101]: Data: bin_data ([6][0][0][0] / 0x0006)
Output #0, hls, to '/hls/test/123/index.m3u8':
Metadata:
encoder : Lavf58.46.101
Stream #0:0: Video: h264 (High) ([27][0][0][0] / 0x001B), yuvj420p(pc, bt709, progressive), 1920x1080, q=2-31, 25 fps, 25 tbr, 90k tbn, 90k tbc
Stream mapping:
Press [q] to stop, ? for help
[hls @ 0x3d22780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 12 times
[hls @ 0x3d22780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 11 times
[hls @ 0x3d22780] Opening '/hls/test/123/0.ts' for writing
[hls @ 0x3d22780] Opening '/hls/test/123/index.m3u8.tmp' for writing
[hls @ 0x3d22780] pkt->duration = 0, maybe the hls segment duration will not precise
[hls @ 0x3d22780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 12 times
[hls @ 0x3d22780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 10 times
[hls @ 0x3d22780] Opening '/hls/test/123/1.ts' for writing
[hls @ 0x3d22780] Opening '/hls/test/123/index.m3u8.tmp' for writing
[hls @ 0x3d22780] pkt->duration = 0, maybe the hls segment duration will not precise
[hls @ 0x3d22780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 12 times
[hls @ 0x3d22780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 10 times
[hls @ 0x3d22780] Opening '/hls/test/123/2.ts' for writing
[hls @ 0x3d22780] Opening '/hls/test/123/index.m3u8.tmp' for writing
[hls @ 0x3d22780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 1 times
[hls @ 0x3d22780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 11 times
[hls @ 0x3d22780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 10 times
[hls @ 0x3d22780] Opening '/hls/test/123/3.ts' for writing
[hls @ 0x3d22780] Opening '/hls/test/123/index.m3u8.tmp' for writing
[hls @ 0x3d22780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 1 times
[hls @ 0x3d22780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 12 times
[hls @ 0x3d22780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 9 times
[hls @ 0x3d22780] Opening '/hls/test/123/4.ts' for writing
[hls @ 0x3d22780] Opening '/hls/test/123/index.m3u8.tmp' for writing
[hls @ 0x3d22780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 1 times
[hls @ 0x3d22780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 12 times
[hls @ 0x3d22780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 9 times
[hls @ 0x3d22780] Opening '/hls/test/123/5.ts' for writing
[hls @ 0x3d22780] Opening '/hls/test/123/index.m3u8.tmp' for writing
[hls @ 0x3d22780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 2 times
[hls @ 0x3d22780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 11 times
[hls @ 0x3d22780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 9 times
[hls @ 0x3d22780] Opening '/hls/test/123/6.ts' for writing
[hls @ 0x3d22780] Opening '/hls/test/123/index.m3u8.tmp' for writing
[hls @ 0x3d22780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 2 times
[hls @ 0x3d22780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 12 times
[hls @ 0x3d22780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 8 times
[hls @ 0x3d22780] Opening '/hls/test/123/7.ts' for writing
[hls @ 0x3d22780] Opening '/hls/test/123/index.m3u8.tmp' for writing
[hls @ 0x3d22780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 2 times
[hls @ 0x3d22780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 12 times
[hls @ 0x3d22780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 8 times
[hls @ 0x3d22780] Opening '/hls/test/123/8.ts' for writing
[hls @ 0x3d22780] Opening '/hls/test/123/index.m3u8.tmp' for writing
[hls @ 0x3d22780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 3 times
[hls @ 0x3d22780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 12 times
[hls @ 0x3d22780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 7 times
[hls @ 0x3d22780] Opening '/hls/test/123/9.ts' for writing
[hls @ 0x3d22780] Opening '/hls/test/123/index.m3u8.tmp' for writing
[hls @ 0x3d22780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 4 times
[hls @ 0x3d22780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 12 times
[hls @ 0x3d22780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 7 times
[hls @ 0x3d22780] Opening '/hls/test/123/10.ts' for writing
[hls @ 0x3d22780] Opening '/hls/test/123/index.m3u8.tmp' for writing
[hls @ 0x3d22780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 4 times
[hls @ 0x3d22780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 11 times
[hls @ 0x3d22780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 7 times
[hls @ 0x3d22780] Opening '/hls/test/123/11.ts' for writing
[hls @ 0x3d22780] Opening '/hls/test/123/index.m3u8.tmp' for writing
[hls @ 0x3d22780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 4 times
[hls @ 0x3d22780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 12 times
[hls @ 0x3d22780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 6 times
[hls @ 0x3d22780] Opening '/hls/test/123/12.ts' for writing
[hls @ 0x3d22780] Opening '/hls/test/123/index.m3u8.tmp' for writing
[hls @ 0x3d22780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 4 times
[hls @ 0x3d22780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 12 times
[hls @ 0x3d22780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 6 times
[hls @ 0x3d22780] Opening '/hls/test/123/13.ts' for writing
[hls @ 0x3d22780] Opening '/hls/test/123/index.m3u8.tmp' for writing
[hls @ 0x3d22780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 5 times
[hls @ 0x3d22780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 11 times
[hls @ 0x3d22780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 6 times
[hls @ 0x3d22780] Opening '/hls/test/123/14.ts' for writing
[hls @ 0x3d22780] Opening '/hls/test/123/index.m3u8.tmp' for writing
[hls @ 0x3d22780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 5 times
[hls @ 0x3d22780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 12 times
[hls @ 0x3d22780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 5 times
[hls @ 0x3d22780] Opening '/hls/test/123/15.ts' for writing
[hls @ 0x3d22780] Opening '/hls/test/123/index.m3u8.tmp' for writing
[hls @ 0x3d22780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 5 times
[hls @ 0x3d22780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 12 times
[hls @ 0x3d22780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 5 times
[hls @ 0x3d22780] Opening '/hls/test/123/16.ts' for writing
[hls @ 0x3d22780] Opening '/hls/test/123/index.m3u8.tmp' for writing
[hls @ 0x3d22780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 6 times
[hls @ 0x3d22780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 11 times
[hls @ 0x3d22780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 5 times
[hls @ 0x3d22780] Opening '/hls/test/123/17.ts' for writing
[hls @ 0x3d22780] Opening '/hls/test/123/index.m3u8.tmp' for writing
[hls @ 0x3d22780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 6 times
[hls @ 0x3d22780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 12 times
[hls @ 0x3d22780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 4 times
[hls @ 0x3d22780] Opening '/hls/test/123/18.ts' for writing
[hls @ 0x3d22780] Opening '/hls/test/123/index.m3u8.tmp' for writing
[hls @ 0x3d22780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 6 times
[hls @ 0x3d22780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 12 times
[hls @ 0x3d22780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 4 times
[hls @ 0x3d22780] Opening '/hls/test/123/19.ts' for writing
[hls @ 0x3d22780] Opening '/hls/test/123/index.m3u8.tmp' for writing
[hls @ 0x3d22780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 7 times
[hls @ 0x3d22780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 11 times
[hls @ 0x3d22780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 4 times
[hls @ 0x3d22780] Opening '/hls/test/123/20.ts' for writing
[hls @ 0x3d22780] Opening '/hls/test/123/index.m3u8.tmp' for writing
[hls @ 0x3d22780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 7 times
[hls @ 0x3d22780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 1 times
[hls @ 0x3d22780] Opening '/hls/test/123/21.ts' for writing
[hls @ 0x3d22780] Opening '/hls/test/123/index.m3u8.tmp' for writing
frame= 537 fps= 25 q=-1.0 Lsize=N/A time=00:00:21.40 bitrate=N/A speed= 1x
video:8184kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
Exiting normally, received signal 2.
2:%d
/usr/local/bin/ffmpeg -re -i /hls/test.ts -y -sn -dn -hls_time 1 -hls_flags +split_by_time -hls_segment_filename /hls/test/123/%d.ts -f hls -c copy /hls/test/123/index.m3u8
ffmpeg version N-98130-g38737b3 Copyright (c) 2000-2020 the FFmpeg developers
built with gcc 4.8.5 (GCC) 20150623 (Red Hat 4.8.5-39)
configuration: --libdir=/usr/lib64
libavutil 56. 54.100 / 56. 54.100
libavcodec 58. 92.100 / 58. 92.100
libavformat 58. 46.101 / 58. 46.101
libavdevice 58. 11.100 / 58. 11.100
libavfilter 7. 86.100 / 7. 86.100
libswscale 5. 8.100 / 5. 8.100
libswresample 3. 8.100 / 3. 8.100
Input #0, mpegts, from '/hls/test.ts':
Duration: 00:00:23.76, start: 1.400000, bitrate: 3270 kb/s
Program 1
Metadata:
service_name : profile1
service_provider: FFmpeg
Stream #0:0[0x100]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuvj420p(pc, bt709, progressive), 1920x1080, 25 fps, 25 tbr, 90k tbn, 180k tbc
Stream #0:1[0x101]: Data: bin_data ([6][0][0][0] / 0x0006)
Output #0, hls, to '/hls/test/123/index.m3u8':
Metadata:
encoder : Lavf58.46.101
Stream #0:0: Video: h264 (High) ([27][0][0][0] / 0x001B), yuvj420p(pc, bt709, progressive), 1920x1080, q=2-31, 25 fps, 25 tbr, 90k tbn, 90k tbc
Stream mapping:
Press [q] to stop, ? for help
[hls @ 0x4259780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 12 times
[hls @ 0x4259780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 11 times
[hls @ 0x4259780] Opening '/hls/test/123/0.ts' for writing
[hls @ 0x4259780] Opening '/hls/test/123/index.m3u8.tmp' for writing
[hls @ 0x4259780] pkt->duration = 0, maybe the hls segment duration will not precise
[hls @ 0x4259780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 11 times
[hls @ 0x4259780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 11 times
[hls @ 0x4259780] Opening '/hls/test/123/1.ts' for writing
[hls @ 0x4259780] Opening '/hls/test/123/index.m3u8.tmp' for writing
[hls @ 0x4259780] pkt->duration = 0, maybe the hls segment duration will not precise
[hls @ 0x4259780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 12 times
[hls @ 0x4259780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 10 times
[hls @ 0x4259780] Opening '/hls/test/123/2.ts' for writing
[hls @ 0x4259780] Opening '/hls/test/123/index.m3u8.tmp' for writing
[hls @ 0x4259780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 1 times
[hls @ 0x4259780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 11 times
[hls @ 0x4259780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 10 times
[hls @ 0x4259780] Opening '/hls/test/123/3.ts' for writing
[hls @ 0x4259780] Opening '/hls/test/123/index.m3u8.tmp' for writing
[hls @ 0x4259780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 1 times
[hls @ 0x4259780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 12 times
[hls @ 0x4259780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 9 times
[hls @ 0x4259780] Opening '/hls/test/123/4.ts' for writing
[hls @ 0x4259780] Opening '/hls/test/123/index.m3u8.tmp' for writing
[hls @ 0x4259780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 1 times
[hls @ 0x4259780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 12 times
[hls @ 0x4259780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 9 times
[hls @ 0x4259780] Opening '/hls/test/123/5.ts' for writing
[hls @ 0x4259780] Opening '/hls/test/123/index.m3u8.tmp' for writing
[hls @ 0x4259780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 2 times
[hls @ 0x4259780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 11 times
[hls @ 0x4259780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 9 times
[hls @ 0x4259780] Opening '/hls/test/123/6.ts' for writing
[hls @ 0x4259780] Opening '/hls/test/123/index.m3u8.tmp' for writing
[hls @ 0x4259780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 2 times
[hls @ 0x4259780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 12 times
[hls @ 0x4259780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 8 times
[hls @ 0x4259780] Opening '/hls/test/123/7.ts' for writing
[hls @ 0x4259780] Opening '/hls/test/123/index.m3u8.tmp' for writing
[hls @ 0x4259780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 2 times
[hls @ 0x4259780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 12 times
[hls @ 0x4259780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 8 times
[hls @ 0x4259780] Opening '/hls/test/123/8.ts' for writing
[hls @ 0x4259780] Opening '/hls/test/123/index.m3u8.tmp' for writing
[hls @ 0x4259780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 3 times
[hls @ 0x4259780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 12 times
[hls @ 0x4259780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 7 times
[hls @ 0x4259780] Opening '/hls/test/123/9.ts' for writing
[hls @ 0x4259780] Opening '/hls/test/123/index.m3u8.tmp' for writing
[hls @ 0x4259780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 4 times
[hls @ 0x4259780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 12 times
[hls @ 0x4259780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 7 times
[hls @ 0x4259780] Opening '/hls/test/123/10.ts' for writing
[hls @ 0x4259780] Opening '/hls/test/123/index.m3u8.tmp' for writing
[hls @ 0x4259780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 4 times
[hls @ 0x4259780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 11 times
[hls @ 0x4259780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 7 times
[hls @ 0x4259780] Opening '/hls/test/123/11.ts' for writing
[hls @ 0x4259780] Opening '/hls/test/123/index.m3u8.tmp' for writing
[hls @ 0x4259780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 4 times
[hls @ 0x4259780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 12 times
[hls @ 0x4259780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 6 times
[hls @ 0x4259780] Opening '/hls/test/123/12.ts' for writing
[hls @ 0x4259780] Opening '/hls/test/123/index.m3u8.tmp' for writing
[hls @ 0x4259780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 4 times
[hls @ 0x4259780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 12 times
[hls @ 0x4259780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 6 times
[hls @ 0x4259780] Opening '/hls/test/123/13.ts' for writing
[hls @ 0x4259780] Opening '/hls/test/123/index.m3u8.tmp' for writing
[hls @ 0x4259780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 5 times
[hls @ 0x4259780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 11 times
[hls @ 0x4259780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 6 times
[hls @ 0x4259780] Opening '/hls/test/123/14.ts' for writing
[hls @ 0x4259780] Opening '/hls/test/123/index.m3u8.tmp' for writing
[hls @ 0x4259780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 5 times
[hls @ 0x4259780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 12 times
[hls @ 0x4259780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 5 times
[hls @ 0x4259780] Opening '/hls/test/123/15.ts' for writing
[hls @ 0x4259780] Opening '/hls/test/123/index.m3u8.tmp' for writing
[hls @ 0x4259780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 5 times
[hls @ 0x4259780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 12 times
[hls @ 0x4259780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 5 times
[hls @ 0x4259780] Opening '/hls/test/123/16.ts' for writing
[hls @ 0x4259780] Opening '/hls/test/123/index.m3u8.tmp' for writing
[hls @ 0x4259780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 6 times
[hls @ 0x4259780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 11 times
[hls @ 0x4259780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 5 times
[hls @ 0x4259780] Opening '/hls/test/123/17.ts' for writing
[hls @ 0x4259780] Opening '/hls/test/123/index.m3u8.tmp' for writing
[hls @ 0x4259780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 6 times
[hls @ 0x4259780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 12 times
[hls @ 0x4259780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 4 times
[hls @ 0x4259780] Opening '/hls/test/123/18.ts' for writing
[hls @ 0x4259780] Opening '/hls/test/123/index.m3u8.tmp' for writing
[hls @ 0x4259780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 6 times
[hls @ 0x4259780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 12 times
[hls @ 0x4259780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 4 times
[hls @ 0x4259780] Opening '/hls/test/123/19.ts' for writing
[hls @ 0x4259780] Opening '/hls/test/123/index.m3u8.tmp' for writing
[hls @ 0x4259780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 7 times
[hls @ 0x4259780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 11 times
[hls @ 0x4259780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 4 times
[hls @ 0x4259780] Opening '/hls/test/123/20.ts' for writing
[hls @ 0x4259780] Opening '/hls/test/123/index.m3u8.tmp' for writing
[hls @ 0x4259780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 7 times
[hls @ 0x4259780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 6 times
[hls @ 0x4259780] Opening '/hls/test/123/21.ts' for writing
[hls @ 0x4259780] Opening '/hls/test/123/index.m3u8.tmp' for writing
frame= 542 fps= 25 q=-1.0 Lsize=N/A time=00:00:21.60 bitrate=N/A speed= 1x
video:8244kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
Exiting normally, received signal 2.
comment:3 by , 4 years ago
Let me check,
Do you want use segment-%02d.ts or segment-%03d.ts ?
segment-%02d.ts will like this:
segment-00.ts segment-01.ts segment-02.ts ... segment-99.ts
Is this you want?
follow-up: 5 comment:4 by , 4 years ago
it does not work as it should
anyway %d variable works only as integer pattern
so that I do not set (%d, %00d, %01d, %02d) will always be
segment-0.ts
segment-1.ts
segment-2.ts
...
segment-[max_integer_value].ts
i want
segment-0.ts
segment-1.ts
segment-2.ts
...
segment-9.ts
segment-0.ts
comment:5 by , 4 years ago
I cannot sure what you want , if you want set the segment wrap, or set the %02d, i suggest you use hls_list_size to set the limit count of the list,
i don't recommend you use hls_wrap, because hls_wrap is not friendly to CDN Cache.
i have do two example bellow, first is use %02d, the second is hls_wrap(will be deprecated).
which one is you want to do?
liuqideMacBook-Pro:dash liuqi$ ./ffmpeg -f lavfi -i testsrc2=s=176x144 -g 25 -r:v 25 -f hls -hls_time 1 -hls_segment_filename output_test/output-%02d.ts -t 10 output_test/output.m3u8 ffmpeg version N-96891-g60b1f85b67 Copyright (c) 2000-2020 the FFmpeg developers built with Apple LLVM version 10.0.0 (clang-1000.11.45.5) configuration: --enable-fontconfig --enable-gpl --enable-libass --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libspeex --enable-libx264 --enable-libx265 --enable-libfdk-aac --enable-version3 --enable-nonfree --enable-videotoolbox --enable-libxml2 --samples=fate-suite/ --enable-libopencv --enable-libopus --enable-opengl --enable-libzmq --disable-optimizations --disable-stripping libavutil 56. 42.100 / 56. 42.100 libavcodec 58. 73.102 / 58. 73.102 libavformat 58. 39.101 / 58. 39.101 libavdevice 58. 9.103 / 58. 9.103 libavfilter 7. 77.100 / 7. 77.100 libswscale 5. 6.100 / 5. 6.100 libswresample 3. 6.100 / 3. 6.100 libpostproc 55. 6.100 / 55. 6.100 Input #0, lavfi, from 'testsrc2=s=176x144': Duration: N/A, start: 0.000000, bitrate: N/A Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p, 176x144 [SAR 1:1 DAR 11:9], 25 tbr, 25 tbn, 25 tbc Stream mapping: Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (libx264)) Press [q] to stop, [?] for help [libx264 @ 0x7f9cf2803800] using SAR=1/1 [libx264 @ 0x7f9cf2803800] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX [libx264 @ 0x7f9cf2803800] profile High, level 1.1 [libx264 @ 0x7f9cf2803800] 264 - core 148 r2694 3b70645 - H.264/MPEG-4 AVC codec - Copyleft 2003-2016 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=4 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=25 keyint_min=2 scenecut=40 intra_refresh=0 rc_lookahead=25 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00 Output #0, hls, to 'output_test/output.m3u8': Metadata: encoder : Lavf58.39.101 Stream #0:0: Video: h264 (libx264), yuv420p, 176x144 [SAR 1:1 DAR 11:9], q=-1--1, 25 fps, 90k tbn, 25 tbc Metadata: encoder : Lavc58.73.102 libx264 Side data: cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: N/A [hls @ 0x7f9cf3014600] Opening 'output_test/output-00.ts' for writing [hls @ 0x7f9cf3014600] Opening 'output_test/output.m3u8.tmp' for writing [hls @ 0x7f9cf3014600] Opening 'output_test/output-01.ts' for writing [hls @ 0x7f9cf3014600] Opening 'output_test/output.m3u8.tmp' for writing [hls @ 0x7f9cf3014600] Opening 'output_test/output-02.ts' for writing [hls @ 0x7f9cf3014600] Opening 'output_test/output.m3u8.tmp' for writing [hls @ 0x7f9cf3014600] Opening 'output_test/output-03.ts' for writing [hls @ 0x7f9cf3014600] Opening 'output_test/output.m3u8.tmp' for writing [hls @ 0x7f9cf3014600] Opening 'output_test/output-04.ts' for writing [hls @ 0x7f9cf3014600] Opening 'output_test/output.m3u8.tmp' for writing [hls @ 0x7f9cf3014600] Opening 'output_test/output-05.ts' for writing [hls @ 0x7f9cf3014600] Opening 'output_test/output.m3u8.tmp' for writing [hls @ 0x7f9cf3014600] Opening 'output_test/output-06.ts' for writing [hls @ 0x7f9cf3014600] Opening 'output_test/output.m3u8.tmp' for writing [hls @ 0x7f9cf3014600] Opening 'output_test/output-07.ts' for writing [hls @ 0x7f9cf3014600] Opening 'output_test/output.m3u8.tmp' for writing [hls @ 0x7f9cf3014600] Opening 'output_test/output-08.ts' for writing [hls @ 0x7f9cf3014600] Opening 'output_test/output.m3u8.tmp' for writing [hls @ 0x7f9cf3014600] Opening 'output_test/output-09.ts' for writing [hls @ 0x7f9cf3014600] Opening 'output_test/output.m3u8.tmp' for writing frame= 250 fps=0.0 q=-1.0 Lsize=N/A time=00:00:09.92 bitrate=N/A speed=29.9x video:218kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown [libx264 @ 0x7f9cf2803800] frame I:10 Avg QP:20.46 size: 3722 [libx264 @ 0x7f9cf2803800] frame P:73 Avg QP:27.43 size: 1172 [libx264 @ 0x7f9cf2803800] frame B:167 Avg QP:32.05 size: 595 [libx264 @ 0x7f9cf2803800] consecutive B-frames: 8.4% 3.2% 13.2% 75.2% [libx264 @ 0x7f9cf2803800] mb I I16..4: 32.8% 13.8% 53.3% [libx264 @ 0x7f9cf2803800] mb P I16..4: 3.2% 2.7% 2.7% P16..4: 19.0% 15.4% 12.8% 0.0% 0.0% skip:44.4% [libx264 @ 0x7f9cf2803800] mb B I16..4: 0.3% 0.2% 0.1% B16..8: 27.3% 12.9% 4.3% direct: 3.8% skip:51.2% L0:48.8% L1:44.7% BI: 6.4% [libx264 @ 0x7f9cf2803800] 8x8 transform intra:21.4% inter:25.8% [libx264 @ 0x7f9cf2803800] coded y,uvDC,uvAC intra: 29.0% 60.6% 50.9% inter: 9.8% 25.2% 20.8% [libx264 @ 0x7f9cf2803800] i16 v,h,dc,p: 75% 17% 8% 0% [libx264 @ 0x7f9cf2803800] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 17% 12% 68% 0% 0% 0% 1% 0% 1% [libx264 @ 0x7f9cf2803800] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 50% 23% 19% 1% 1% 1% 2% 2% 2% [libx264 @ 0x7f9cf2803800] i8c dc,h,v,p: 38% 21% 38% 2% [libx264 @ 0x7f9cf2803800] Weighted P-Frames: Y:0.0% UV:0.0% [libx264 @ 0x7f9cf2803800] ref P L0: 62.6% 8.3% 17.8% 11.3% [libx264 @ 0x7f9cf2803800] ref B L0: 80.6% 16.3% 3.1% [libx264 @ 0x7f9cf2803800] ref B L1: 90.9% 9.1% [libx264 @ 0x7f9cf2803800] kb/s:177.78 liuqideMacBook-Pro:dash liuqi$ tree output_test/ output_test/ ├── output-00.ts ├── output-01.ts ├── output-02.ts ├── output-03.ts ├── output-04.ts ├── output-05.ts ├── output-06.ts ├── output-07.ts ├── output-08.ts ├── output-09.ts └── output.m3u8 0 directories, 11 files liuqideMacBook-Pro:dash liuqi$ rm -rf output_test/* liuqideMacBook-Pro:dash liuqi$ ./ffmpeg -f lavfi -i testsrc2=s=176x144 -g 25 -r:v 25 -f hls -hls_time 1 -hls_wrap 5 -hls_segment_filename output_test/output-%02d.ts -t 10 output_test/output.m3u8 ffmpeg version N-96891-g60b1f85b67 Copyright (c) 2000-2020 the FFmpeg developers built with Apple LLVM version 10.0.0 (clang-1000.11.45.5) configuration: --enable-fontconfig --enable-gpl --enable-libass --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libspeex --enable-libx264 --enable-libx265 --enable-libfdk-aac --enable-version3 --enable-nonfree --enable-videotoolbox --enable-libxml2 --samples=fate-suite/ --enable-libopencv --enable-libopus --enable-opengl --enable-libzmq --disable-optimizations --disable-stripping libavutil 56. 42.100 / 56. 42.100 libavcodec 58. 73.102 / 58. 73.102 libavformat 58. 39.101 / 58. 39.101 libavdevice 58. 9.103 / 58. 9.103 libavfilter 7. 77.100 / 7. 77.100 libswscale 5. 6.100 / 5. 6.100 libswresample 3. 6.100 / 3. 6.100 libpostproc 55. 6.100 / 55. 6.100 Input #0, lavfi, from 'testsrc2=s=176x144': Duration: N/A, start: 0.000000, bitrate: N/A Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p, 176x144 [SAR 1:1 DAR 11:9], 25 tbr, 25 tbn, 25 tbc Stream mapping: Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (libx264)) Press [q] to stop, [?] for help [libx264 @ 0x7f8fba00ec00] using SAR=1/1 [libx264 @ 0x7f8fba00ec00] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX [libx264 @ 0x7f8fba00ec00] profile High, level 1.1 [libx264 @ 0x7f8fba00ec00] 264 - core 148 r2694 3b70645 - H.264/MPEG-4 AVC codec - Copyleft 2003-2016 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=4 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=25 keyint_min=2 scenecut=40 intra_refresh=0 rc_lookahead=25 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00 Output #0, hls, to 'output_test/output.m3u8': Metadata: encoder : Lavf58.39.101 Stream #0:0: Video: h264 (libx264), yuv420p, 176x144 [SAR 1:1 DAR 11:9], q=-1--1, 25 fps, 90k tbn, 25 tbc Metadata: encoder : Lavc58.73.102 libx264 Side data: cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: N/A [hls @ 0x7f8fba809c00] Opening 'output_test/output-00.ts' for writing [hls @ 0x7f8fba809c00] Opening 'output_test/output.m3u8.tmp' for writing [hls @ 0x7f8fba809c00] Opening 'output_test/output-01.ts' for writing [hls @ 0x7f8fba809c00] Opening 'output_test/output.m3u8.tmp' for writing [hls @ 0x7f8fba809c00] Opening 'output_test/output-02.ts' for writing [hls @ 0x7f8fba809c00] Opening 'output_test/output.m3u8.tmp' for writing [hls @ 0x7f8fba809c00] Opening 'output_test/output-03.ts' for writing [hls @ 0x7f8fba809c00] Opening 'output_test/output.m3u8.tmp' for writing [hls @ 0x7f8fba809c00] Opening 'output_test/output-04.ts' for writing [hls @ 0x7f8fba809c00] Opening 'output_test/output.m3u8.tmp' for writing [hls @ 0x7f8fba809c00] Opening 'output_test/output-00.ts' for writing [hls muxer @ 0x7f8fba00ca00] Duplicated segment filename detected: output-00.ts [hls @ 0x7f8fba809c00] Opening 'output_test/output.m3u8.tmp' for writing [hls @ 0x7f8fba809c00] Opening 'output_test/output-01.ts' for writing [hls muxer @ 0x7f8fba00ca00] Duplicated segment filename detected: output-01.ts [hls @ 0x7f8fba809c00] Opening 'output_test/output.m3u8.tmp' for writing [hls @ 0x7f8fba809c00] Opening 'output_test/output-02.ts' for writing [hls muxer @ 0x7f8fba00ca00] Duplicated segment filename detected: output-02.ts [hls @ 0x7f8fba809c00] Opening 'output_test/output.m3u8.tmp' for writing [hls @ 0x7f8fba809c00] Opening 'output_test/output-03.ts' for writing [hls muxer @ 0x7f8fba00ca00] Duplicated segment filename detected: output-03.ts [hls @ 0x7f8fba809c00] Opening 'output_test/output.m3u8.tmp' for writing [hls @ 0x7f8fba809c00] Opening 'output_test/output-04.ts' for writing [hls muxer @ 0x7f8fba00ca00] Duplicated segment filename detected: output-04.ts [hls @ 0x7f8fba809c00] Opening 'output_test/output.m3u8.tmp' for writing frame= 250 fps=0.0 q=-1.0 Lsize=N/A time=00:00:09.92 bitrate=N/A speed=27.6x video:218kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown [libx264 @ 0x7f8fba00ec00] frame I:10 Avg QP:20.46 size: 3722 [libx264 @ 0x7f8fba00ec00] frame P:73 Avg QP:27.43 size: 1172 [libx264 @ 0x7f8fba00ec00] frame B:167 Avg QP:32.05 size: 595 [libx264 @ 0x7f8fba00ec00] consecutive B-frames: 8.4% 3.2% 13.2% 75.2% [libx264 @ 0x7f8fba00ec00] mb I I16..4: 32.8% 13.8% 53.3% [libx264 @ 0x7f8fba00ec00] mb P I16..4: 3.2% 2.7% 2.7% P16..4: 19.0% 15.4% 12.8% 0.0% 0.0% skip:44.4% [libx264 @ 0x7f8fba00ec00] mb B I16..4: 0.3% 0.2% 0.1% B16..8: 27.3% 12.9% 4.3% direct: 3.8% skip:51.2% L0:48.8% L1:44.7% BI: 6.4% [libx264 @ 0x7f8fba00ec00] 8x8 transform intra:21.4% inter:25.8% [libx264 @ 0x7f8fba00ec00] coded y,uvDC,uvAC intra: 29.0% 60.6% 50.9% inter: 9.8% 25.2% 20.8% [libx264 @ 0x7f8fba00ec00] i16 v,h,dc,p: 75% 17% 8% 0% [libx264 @ 0x7f8fba00ec00] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 17% 12% 68% 0% 0% 0% 1% 0% 1% [libx264 @ 0x7f8fba00ec00] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 50% 23% 19% 1% 1% 1% 2% 2% 2% [libx264 @ 0x7f8fba00ec00] i8c dc,h,v,p: 38% 21% 38% 2% [libx264 @ 0x7f8fba00ec00] Weighted P-Frames: Y:0.0% UV:0.0% [libx264 @ 0x7f8fba00ec00] ref P L0: 62.6% 8.3% 17.8% 11.3% [libx264 @ 0x7f8fba00ec00] ref B L0: 80.6% 16.3% 3.1% [libx264 @ 0x7f8fba00ec00] ref B L1: 90.9% 9.1% [libx264 @ 0x7f8fba00ec00] kb/s:177.78 liuqideMacBook-Pro:dash liuqi$ tree output_test/ output_test/ ├── output-00.ts ├── output-01.ts ├── output-02.ts ├── output-03.ts ├── output-04.ts └── output.m3u8 0 directories, 6 files liuqideMacBook-Pro:dash liuqi$ ./ffmpeg -h muxer=hls|grep hls_wrap ffmpeg version N-96891-g60b1f85b67 Copyright (c) 2000-2020 the FFmpeg developers built with Apple LLVM version 10.0.0 (clang-1000.11.45.5) configuration: --enable-fontconfig --enable-gpl --enable-libass --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libspeex --enable-libx264 --enable-libx265 --enable-libfdk-aac --enable-version3 --enable-nonfree --enable-videotoolbox --enable-libxml2 --samples=fate-suite/ --enable-libopencv --enable-libopus --enable-opengl --enable-libzmq --disable-optimizations --disable-stripping libavutil 56. 42.100 / 56. 42.100 libavcodec 58. 73.102 / 58. 73.102 libavformat 58. 39.101 / 58. 39.101 libavdevice 58. 9.103 / 58. 9.103 libavfilter 7. 77.100 / 7. 77.100 libswscale 5. 6.100 / 5. 6.100 libswresample 3. 6.100 / 3. 6.100 libpostproc 55. 6.100 / 55. 6.100 -----------note---------- -hls_wrap <int> E......... set number after which the index wraps (will be deprecated) (from 0 to INT_MAX) (default 0)
comment:6 by , 4 years ago
i want to say that in my centos 7 %d doesnt work properly!
/usr/local/bin/ffmpeg -re -i /hls/test.ts -y -sn -dn -hls_time 1 -hls_flags +split_by_time -hls_segment_filename /hls/test/123/%01d.ts -f hls -c copy /hls/test/123/index.m3u8
ffmpeg version N-98130-g38737b3 Copyright (c) 2000-2020 the FFmpeg developers
built with gcc 4.8.5 (GCC) 20150623 (Red Hat 4.8.5-39)
configuration: --libdir=/usr/lib64
libavutil 56. 54.100 / 56. 54.100
libavcodec 58. 92.100 / 58. 92.100
libavformat 58. 46.101 / 58. 46.101
libavdevice 58. 11.100 / 58. 11.100
libavfilter 7. 86.100 / 7. 86.100
libswscale 5. 8.100 / 5. 8.100
libswresample 3. 8.100 / 3. 8.100
Input #0, mpegts, from '/hls/test.ts':
Duration: 00:00:23.76, start: 1.400000, bitrate: 3270 kb/s
Program 1
Metadata:
service_name : profile1
service_provider: FFmpeg
Stream #0:0[0x100]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuvj420p(pc, bt709, progressive), 1920x1080, 25 fps, 25 tbr, 90k tbn, 180k tbc
Stream #0:1[0x101]: Data: bin_data ([6][0][0][0] / 0x0006)
Output #0, hls, to '/hls/test/123/index.m3u8':
Metadata:
encoder : Lavf58.46.101
Stream #0:0: Video: h264 (High) ([27][0][0][0] / 0x001B), yuvj420p(pc, bt709, progressive), 1920x1080, q=2-31, 25 fps, 25 tbr, 90k tbn, 90k tbc
Stream mapping:
Press [q] to stop, ? for help
[hls @ 0x398d780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 12 times
[hls @ 0x398d780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 11 times
[hls @ 0x398d780] Opening '/hls/test/123/0.ts' for writing
[hls @ 0x398d780] Opening '/hls/test/123/index.m3u8.tmp' for writing
[hls @ 0x398d780] pkt->duration = 0, maybe the hls segment duration will not precise
[hls @ 0x398d780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 12 times
[hls @ 0x398d780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 10 times
[hls @ 0x398d780] Opening '/hls/test/123/1.ts' for writing
[hls @ 0x398d780] Opening '/hls/test/123/index.m3u8.tmp' for writing
[hls @ 0x398d780] pkt->duration = 0, maybe the hls segment duration will not precise
[hls @ 0x398d780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 12 times
[hls @ 0x398d780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 10 times
[hls @ 0x398d780] Opening '/hls/test/123/2.ts' for writing
[hls @ 0x398d780] Opening '/hls/test/123/index.m3u8.tmp' for writing
[hls @ 0x398d780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 1 times
[hls @ 0x398d780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 11 times
[hls @ 0x398d780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 10 times
[hls @ 0x398d780] Opening '/hls/test/123/3.ts' for writing
[hls @ 0x398d780] Opening '/hls/test/123/index.m3u8.tmp' for writing
[hls @ 0x398d780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 1 times
[hls @ 0x398d780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 12 times
[hls @ 0x398d780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 9 times
[hls @ 0x398d780] Opening '/hls/test/123/4.ts' for writing
[hls @ 0x398d780] Opening '/hls/test/123/index.m3u8.tmp' for writing
[hls @ 0x398d780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 2 times
[hls @ 0x398d780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 11 times
[hls @ 0x398d780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 9 times
[hls @ 0x398d780] Opening '/hls/test/123/5.ts' for writing
[hls @ 0x398d780] Opening '/hls/test/123/index.m3u8.tmp' for writing
[hls @ 0x398d780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 2 times
[hls @ 0x398d780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 12 times
[hls @ 0x398d780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 8 times
[hls @ 0x398d780] Opening '/hls/test/123/6.ts' for writing
[hls @ 0x398d780] Opening '/hls/test/123/index.m3u8.tmp' for writing
[hls @ 0x398d780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 2 times
[hls @ 0x398d780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 12 times
[hls @ 0x398d780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 8 times
[hls @ 0x398d780] Opening '/hls/test/123/7.ts' for writing
[hls @ 0x398d780] Opening '/hls/test/123/index.m3u8.tmp' for writing
[hls @ 0x398d780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 3 times
[hls @ 0x398d780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 12 times
[hls @ 0x398d780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 7 times
[hls @ 0x398d780] Opening '/hls/test/123/8.ts' for writing
[hls @ 0x398d780] Opening '/hls/test/123/index.m3u8.tmp' for writing
[hls @ 0x398d780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 3 times
[hls @ 0x398d780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 12 times
[hls @ 0x398d780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 7 times
[hls @ 0x398d780] Opening '/hls/test/123/9.ts' for writing
[hls @ 0x398d780] Opening '/hls/test/123/index.m3u8.tmp' for writing
[hls @ 0x398d780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 5 times
[hls @ 0x398d780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 11 times
[hls @ 0x398d780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 7 times
[hls @ 0x398d780] Opening '/hls/test/123/10.ts' for writing
[hls @ 0x398d780] Opening '/hls/test/123/index.m3u8.tmp' for writing
[hls @ 0x398d780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 4 times
[hls @ 0x398d780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 12 times
[hls @ 0x398d780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 6 times
[hls @ 0x398d780] Opening '/hls/test/123/11.ts' for writing
[hls @ 0x398d780] Opening '/hls/test/123/index.m3u8.tmp' for writing
[hls @ 0x398d780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 4 times
[hls @ 0x398d780] pkt->duration = 0, maybe the hls segment duration will not precise
Last message repeated 5 times
[hls @ 0x398d780] Opening '/hls/test/123/12.ts' for writing
[hls @ 0x398d780] Opening '/hls/test/123/index.m3u8.tmp' for writing
frame= 313 fps= 25 q=-1.0 Lsize=N/A time=00:00:12.44 bitrate=N/A speed= 1x
video:4786kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
Exiting normally, received signal 2.
in this case (%01d) segments have to be no great then 9, and if hls_wrap option will be deprecated, than i can't to do playlyst with repeated numbering chunks....its needed to exclude monitoring the deletion of previously created files, since they will be constantly overwritten by new ones ... after restarting ffmpeg does not delete old files (its would be better if they will deleting by special flag).
comment:7 by , 4 years ago
liuqideMacBook-Pro:dash liuqi$ printf %01d\\n 100 100 liuqideMacBook-Pro:dash liuqi$ liuqideMacBook-Pro:dash liuqi$ vim test.c Press ENTER or type command to continue liuqideMacBook-Pro:dash liuqi$ gcc test.c -o out liuqideMacBook-Pro:dash liuqi$ ./out 30 liuqideMacBook-Pro:dash liuqi$ cat test.c #include <stdio.h> int main(int argc, char *argv[]) { printf("%0001d\n", 30); return 0; } liuqideMacBook-Pro:dash liuqi$
Sorry, i cannot understand what you want to do, but the document about the %0nd discribe is bellow:
man printf
Zero or more of the following flags: # A `#' character specifying that the value should be printed in an ``alternate form''. For b, c, d, s and u formats, this option has no effect. For the o formats the precision of the number is increased to force the first character of the output string to a zero. For the x (X) format, a non-zero result has the string 0x (0X) prepended to it. For a, A, e, E, f, F, g and G formats, the result will always contain a decimal point, even if no digits follow the point (normally, a decimal point only appears in the results of those formats if a digit follows the decimal point). For g and G formats, trailing zeros are not removed from the result as they would otherwise be; - A minus sign `-' which specifies left adjustment of the output in the indicated field; + A `+' character specifying that there should always be a sign placed before the number when using signed formats. ` ' A space specifying that a blank should be left before a positive number for a signed format. A `+' overrides a space if both are used; 0 A zero `0' character indicating that zero-padding should be used rather than blank-padding. A `-' overrides a `0' if both are used;
but i don't think only repeat the last segment is a good idea,
because:
ffmpeg make the segment list, seg0.ts, seg1.ts, seg2.ts ... when rollback or repeat the last segment, for example seg9.ts, how many seconds should the CDN cache the segments?
this i why deprecated the hls_wrap and use the hls_list_sise to controll the length of the hls list. because the CDN can cache the files enough long time.
follow-up: 9 comment:8 by , 4 years ago
i dont want to repeat the last segment, i want to repeat the sequence from 0 to 9 as well as -hls_wrap 9
comment:9 by , 4 years ago
Replying to krs_vital:
i dont want to repeat the last segment, i want to repeat the sequence from 0 to 9 as well as -hls_wrap 9
Ok, the hls_wrap will be deprecated, and the reason i have told you at the above comment.
of course, you can make patch on your local if you don' use CDN. there will have risk if use hls_wrap when the CDN Cache the old files.
duration: 0.5s name: seg0.ts
duration: 1.5s name: seg1.ts
duration: 1.5s name: seg2.ts
duration: 0.5s name: seg0.ts
duration: 0.8s name: seg1.ts
new user request the newer seg0.ts [new request]
old user request the older seg0.ts [network is not very good, maybe terrible, so just request the older seg0.ts]
if both of them request the same name from the same CDN Cache server, it will make problem.
follow-up: 11 comment:10 by , 4 years ago
i want to implement lhls and i dont need to save older files and i dont use CDN.
but -hls_wrap is the last chance to do my job...and if it will be deprecated i'll have (and Not only me) many problems with simple things....it would be batter to save hls_wrap option for users who dont use CDN.
comment:11 by , 4 years ago
Resolution: | → wontfix |
---|---|
Status: | new → closed |
Replying to krs_vital:
i want to implement lhls and i dont need to save older files and i dont use CDN.
but -hls_wrap is the last chance to do my job...and if it will be deprecated i have (and Not only me) many problems with simple things....it would be batter to save hls_wrap option for users who dont use CDN.
hls_wrap is a wrong way, you can try to use hls_list_size and hls_delete_threshold instead of it.
follow-up: 13 comment:12 by , 4 years ago
you dont understand me!
the first time its needed to delete useless segments after ffmpeg restart
ffmpeg dont erase folder after restart, so i went to use repeating file names with options %01d (but its doesnt work as i need), the next way is -hls_wrap option which have to exclude monitoring useless segments, they will rewrinting by filename anyway
options hls_list_size and hls_delete_threshold are useless in this case!
comment:13 by , 4 years ago
Replying to krs_vital:
you dont understand me!
the first time its needed to delete useless segments after ffmpeg restart
ffmpeg dont erase folder after restart, so i went to use repeating file names with options %01d (but its doesnt work as i need), the next way is -hls_wrap option which have to exclude monitoring useless segments, they will rewrinting by filename anyway
options hls_list_size and hls_delete_threshold are useless in this case!
there have a start_number and hls_flags delete_segments
The reason of remove hls_wrap option is same as user don’t use CDN. I said CDN is because let you easy understand it.
comment:14 by , 4 years ago
let me explain
if ffmpeg works for a long time sengents number will too long
seg1.ts
...
seg5555.ts
after restart folder dont erase. therefor segments from seg5550.ts to seg5555.ts will not be deleted, then segments start from seg0.ts, the next restart will, for example, at the seg3333.ts, therefor the segments seg3328.ts ... seg3333.ts will not be erased and so on...
if parallel streams are too much, then the memory may fill up with unnecessary segments and then run out
so, looping segments names (for example from seg0 to seg9) solves all the problems with freeing up memory...and i dont to write advanced scripts to control it.
Please simplify your command line (use the testsrc2 filter as input instead of network input) and provide the command line you tested together with the complete, uncut console output to make this a valid ticket.