[FFmpeg-devel] [PATCH] delete the old segment file from hls list
lingjiujianke at gmail.com
Tue Aug 12 04:25:50 CEST 2014
2014-08-12 7:26 GMT+08:00 Simon Thelen <ffmpeg-dev at c-14.de>:
> On 11/08/14 at 17:39, Steven Liu wrote:
> > Hi Guys,
> > The FFmpeg hls module can make m3u8 and ts, but it dosen't delete the
> > old ts segment file.
> > If always run this module, the disk will full, so this patch can fix
> > the problem.
> > When update the segment list m3u8 file, it will delete the ts segment
> > out range from the list file.
> I'm pretty sure this is why the hls muxer has the `-hls_wrap wrap' option.
> When use the option -hls_wrap 7
> ./ffmpeg -i shaolinzuqiu.rm -vcodec libx264 -preset ultrafast -an -f hls
> -hls_wrap 7 a.m3u8
> it dose not remove the nouse file:
> [root at localhost ffmpeg]# ls *.ts;cat a.m3u8
> a0.ts a1.ts a2.ts a3.ts a4.ts a5.ts a6.ts
> the list file just have a0.ts,a1.ts,a2.ts,a3.ts,a6.ts but no a4.ts,a5.ts,
> and there have a4.ts,a5.ts on the disk.
> perhaps this patch can fix this problem.
More information about the ffmpeg-devel