[FFmpeg-trac] #6043(undetermined:new): hls muxer failed to delete old segment

FFmpeg trac at avcodec.org
Sat Dec 24 05:10:48 EET 2016

#6043: hls muxer failed to delete old segment
             Reporter:  doubleb      |                     Type:  defect
               Status:  new          |                 Priority:  normal
            Component:               |                  Version:
  undetermined                       |  unspecified
             Keywords:               |               Blocked By:
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
 Summary of the bug:
 ffmpeg hls mixer gives misleading erros using use_localtime option and
 some complex filter graphs.

 [hls muxer @ 0x2693700] failed to delete old segment
 segment20161224035418.ts: No such file or directory


 This error message is misleading because ffmpeg did deleted segment file,
 but as you can see from debug log output, ffmpeg tries to delete these
 segment files twice and of cource second attempt will fail.
 This misbehaving relates to use_localtime because without this option old
 segment files deletion is normal.
 I have tested and this phenomane is not always occurs, it requires a
 certain filter graph. If you alter the graph expression in my example
 command line the error messages will disapper. Maybe is this a memory
 handling error?
 This error could be reproduced with newest and and old version
 N-78237-g70742e5 also.

 How to reproduce:
 ./ffmpeg_g -loglevel info -report -v 9 -loglevel 99   -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
 [vout1] ; [v2] scale=size=640x360,  setdar=dar=16/9 [vout2] ; [vimg]
 fps=1/5, scale=size=320x180 [voutimg] ; [3]asetpts=PTS-STARTPTS [0ao];
 [2]asetpts=PTS-STARTPTS [2o]; [0ao][2o] amix, asplit=2 [aout1][aout2] "
 -map "[vout1]"  -vcodec rawvideo -f null dummy  -map "[aout1]"  -acodec
 aac -cutoff 20000 -ac 2 -ar 44100 -ab 192k  -f hls -hls_time 3
 -hls_list_size 5 -hls_flags delete_segments -use_localtime 1
 -hls_segment_filename '/dev/shm/segment%Y%m%d%H%M%S.ts'
 /dev/shm/stream.m3u8 -map "[vout2]" -map "[aout2]" -vcodec rawvideo
 -acodec pcm_s16le -f null dummy  -map "[voutimg]"  -f null dummy

 ffmpeg version:
 ffmpeg version N-82911-gea93052 Copyright (c) 2000-2016 the FFmpeg
   built with gcc 4.4.7 (GCC) 20120313 (Red Hat 4.4.7-17)
   configuration: --enable-gpl --enable-libfreetype --enable-libzmq
 --enable-nonfree --disable-shared
   libavutil      55. 43.100 / 55. 43.100
   libavcodec     57. 70.100 / 57. 70.100
   libavformat    57. 61.100 / 57. 61.100
   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


 Full output of report is attached.

Ticket URL: <https://trac.ffmpeg.org/ticket/6043>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker

More information about the FFmpeg-trac mailing list