[FFmpeg-trac] #6043(undetermined:open): hls muxer states "failed to delete old segment" but not
FFmpeg
trac at avcodec.org
Sat Dec 24 17:50:59 EET 2016
#6043: hls muxer states "failed to delete old segment" but not
-------------------------------------+-------------------------------------
Reporter: doubleb | Owner: stevenliu
Type: defect | Status: open
Priority: normal | Component:
Version: unspecified | undetermined
Keywords: | Resolution:
Blocking: | Blocked By:
Analyzed by developer: 0 | Reproduced by developer: 0
-------------------------------------+-------------------------------------
Comment (by stevenliu):
Perhaps this is not hlsenc problem, i add debug message into hlsenc, and
test it use your reproduce way, the m3u8 list like this:
localhost:hlsenc StevenLiu$ ./ffmpeg -re -loglevel info -y -f lavfi -i
color=c=red:size=640x480:r=25 -f lavfi -f lavfi -i
color=c=pink:size=1920x1080:r=25 -f lavfi -i anullsrc=r=44100:cl=stereo
-f lavfi -i anullsrc=r=44100:cl=stereo -filter_complex "[1]setpts=PTS-
STARTPTS[1o]; [0:v]setpts=PTS-STARTPTS [0vo]; [1o][0vo] overlay=x=10:y=10
, split=3 [v1][v2][vimg] ; [v1] scale=size=960x540, setdar=dar=16/9,
nullsink ; [v2] scale=size=640x360, setdar=dar=16/9 , nullsink ; [vimg]
fps=1/5, scale=size=320x180, nullsink ; [3]asetpts=PTS-STARTPTS [0ao];
[2]asetpts=PTS-STARTPTS [2o]; [0ao][2o] amix [aout1] " -map "[aout1]"
-acodec aac -cutoff 20000 -ac 2 -ar 44100 -ab 192k -f hls -hls_time 3
-hls_list_size 20 -hls_flags delete_segments -use_localtime 1
-hls_segment_filename 'segment%Y%m%d%H%M%S.ts' stream.m3u8
ffmpeg version N-82785-g6b95da9 Copyright (c) 2000-2016 the FFmpeg
developers
built with Apple LLVM version 8.0.0 (clang-800.0.42.1)
configuration: --enable-libass --enable-opengl --enable-libx264
--enable-libmp3lame --enable-gpl --enable-nonfree --prefix=/usr/local
--enable-libopencv --enable-libtesseract --enable-libspeex --enable-
libfreetype --enable-libfontconfig --enable-libfdk-aac
libavutil 55. 41.101 / 55. 41.101
libavcodec 57. 66.109 / 57. 66.109
libavformat 57. 58.101 / 57. 58.101
libavdevice 57. 2.100 / 57. 2.100
libavfilter 6. 68.100 / 6. 68.100
libswscale 4. 3.101 / 4. 3.101
libswresample 2. 4.100 / 2. 4.100
libpostproc 54. 2.100 / 54. 2.100
Input #0, lavfi, from 'color=c=red:size=640x480:r=25':
Duration: N/A, start: 0.000000, bitrate: N/A
Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p, 640x480
[SAR 1:1 DAR 4:3], 25 tbr, 25 tbn, 25 tbc
Input #1, lavfi, from 'color=c=pink:size=1920x1080:r=25':
Duration: N/A, start: 0.000000, bitrate: N/A
Stream #1:0: Video: rawvideo (I420 / 0x30323449), yuv420p, 1920x1080
[SAR 1:1 DAR 16:9], 25 tbr, 25 tbn, 25 tbc
Input #2, lavfi, from 'anullsrc=r=44100:cl=stereo':
Duration: N/A, start: 0.000000, bitrate: 705 kb/s
Stream #2:0: Audio: pcm_u8, 44100 Hz, stereo, u8, 705 kb/s
Input #3, lavfi, from 'anullsrc=r=44100:cl=stereo':
Duration: N/A, start: 0.000000, bitrate: 705 kb/s
Stream #3:0: Audio: pcm_u8, 44100 Hz, stereo, u8, 705 kb/s
[mpegts @ 0x7fb65806f200] frame size not set
Output #0, hls, to 'stream.m3u8':
Metadata:
encoder : Lavf57.58.101
Stream #0:0: Audio: aac (LC), 44100 Hz, stereo, fltp, 192 kb/s
(default)
Metadata:
encoder : Lavc57.66.109 aac
Stream mapping:
Stream #0:0 (rawvideo) -> setpts
Stream #1:0 (rawvideo) -> setpts
Stream #2:0 (pcm_u8) -> asetpts
Stream #3:0 (pcm_u8) -> asetpts
amix -> Stream #0:0 (aac)
Press [q] to stop, [?] for help
[hls @ 0x7fb658804c00] dddddd en->filename = [segment20161224231914.ts]
[hls @ 0x7fb658804c00] dddddd en->filename = [segment20161224231921.ts]
[hls @ 0x7fb658804c00] dddddd en->filename = [segment20161224231926.ts]
[hls @ 0x7fb658804c00] dddddd en->filename = [segment20161224231926.ts]
[hls @ 0x7fb658804c00] dddddd en->filename = [segment20161224231931.ts]
[hls @ 0x7fb658804c00] dddddd en->filename = [segment20161224231936.ts]
[hls @ 0x7fb658804c00] dddddd en->filename = [segment20161224231936.ts]
[hls @ 0x7fb658804c00] dddddd en->filename = [segment20161224231941.ts]
[hls @ 0x7fb658804c00] dddddd en->filename = [segment20161224231941.ts]
[hls @ 0x7fb658804c00] dddddd en->filename = [segment20161224231946.ts]
[hls @ 0x7fb658804c00] dddddd en->filename = [segment20161224231951.ts]
[hls @ 0x7fb658804c00] dddddd en->filename = [segment20161224231951.ts]
[hls @ 0x7fb658804c00] dddddd en->filename = [segment20161224231956.ts]
[hls @ 0x7fb658804c00] dddddd en->filename = [segment20161224231956.ts]
size=N/A time=00:00:40.03 bitrate=N/A speed=0.913x
video:0kB audio:10kB subtitle:0kB other streams:0kB global headers:0kB
muxing overhead: unknown
[aac @ 0x7fb658806200] Qavg: 65536.000
localhost:hlsenc StevenLiu$
localhost:hlsenc StevenLiu$ cat stream.m3u8
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-TARGETDURATION:4
#EXT-X-MEDIA-SEQUENCE:0
#EXTINF:3.018600,
segment20161224231914.ts
#EXTINF:2.995367,
segment20161224231921.ts
#EXTINF:2.995378,
segment20161224231926.ts
#EXTINF:2.995378,
segment20161224231926.ts
#EXTINF:2.995367,
segment20161224231931.ts
#EXTINF:3.018600,
segment20161224231936.ts
#EXTINF:2.995378,
segment20161224231936.ts
#EXTINF:2.995367,
segment20161224231941.ts
#EXTINF:2.995378,
segment20161224231941.ts
#EXTINF:2.995378,
segment20161224231946.ts
#EXTINF:3.018589,
segment20161224231951.ts
#EXTINF:2.995378,
segment20161224231951.ts
#EXTINF:2.995367,
segment20161224231956.ts
#EXTINF:1.021678,
segment20161224231956.ts
#EXT-X-ENDLIST
When the list have two segment one name, ffmpeg will double unlink the
file.
./ffmpeg -re -loglevel info -y -f lavfi -re -i
color=c=red:size=640x480:r=25 -f lavfi -f lavfi -re -i
color=c=pink:size=1920x1080:r=25 -f lavfi -re -i
anullsrc=r=44100:cl=stereo -f lavfi -re -i anullsrc=r=44100:cl=stereo
-filter_complex "[1]setpts=PTS-STARTPTS[1o]; [0:v]setpts=PTS-STARTPTS
[0vo]; [1o][0vo] overlay=x=10:y=10 , split=3 [v1][v2][vimg] ; [v1]
scale=size=960x540, setdar=dar=16/9, nullsink ; [v2] scale=size=640x360,
setdar=dar=16/9 , nullsink ; [vimg] scale=size=320x180[vout] ; [3]asetpts
=PTS-STARTPTS [0ao]; [2]asetpts=PTS-STARTPTS [2o]; [0ao][2o] amix [aout1]
" -map "[vout]" -map "[aout1]" -c:v libx264 -g 12 -acodec aac -cutoff
20000 -ac 2 -ar 44100 -ab 192k -f hls -hls_time 3 -hls_list_size 2
-hls_flags delete_segments -use_localtime 1 -hls_segment_filename
'segment%Y%m%d%H%M%S.ts' stream.m3u8
this is ok.
of course, ffmpeg is split segment by video keyframe ,your command line
just only audio, maybe ffmpeg need support split by audio only stream.
--
Ticket URL: <https://trac.ffmpeg.org/ticket/6043#comment:5>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list