[FFmpeg-devel] [PATCH] delete the old segment file from hls list

Simon Thelen ffmpeg-dev at c-14.de
Tue Aug 12 14:37:56 CEST 2014


On 12/08/14 at 10:36, Steven Liu wrote:
> 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:
[..]
> > > 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.
[..]
>      hls_list_size and hls_wrap option two can fix the problem, but this
> patch can fix the problem of the default parameter, because the ts file on
> disk , one to one correspondence with the m3u8 file will better, isn't it?
IMO, the problem is that you're modifying the default behavior even
though an option already exists to let you specify the amount of segment
files to keep around. This might be suitable in your use-case, but what
if I (or someone else) wanted to keep all the segment files for archival
purposes, but not list them in the m3u8; with your patch this no longer
becomes possible.

If you were to write a new patch that made hls_wrap default to
hls_list_size instead of the default 0, it would no longer impose
artificial limits on users. At that point, the inclusion of the patch
would depend on the opinion of the hls maintainer and the other FFmpeg
maintainers with opinions on the matter.

-- 
Simon Thelen


More information about the ffmpeg-devel mailing list