[FFmpeg-devel] [PATCH] Add mkdir support for HLS localtime-generated segment files

Michael Niedermayer michael at niedermayer.cc
Tue Feb 16 00:59:27 CET 2016


On Mon, Feb 15, 2016 at 10:35:57PM +0100, Johan Ström wrote:
> Thanks for your attention!
> 
> Updated patch attached. It has been rebased against current master
> (avio_open2->ffio_open_whitelist changes) with no issues.
> 
> On 14/02/16 01:29, Michael Niedermayer wrote:
> >On Wed, Feb 03, 2016 at 10:44:28PM +0100, Johan Ström wrote:
> >>Hi,
> >>
> >>this patch adds -use_localtime_mkdir option to the HLS encoder.
> >>Use with -use_localtime, and set -hls_segment_filename to a path
> >>which contains a subdirectory i.e.
> >>/some/path/%Y%m%d/%Y%m%dT%H%M%S-%s.ts
> >>This will mkdir the %Y%m%d-part of the path if it does not already exist.
> >>
> >>In addition, each filename in the playlist output will be prefixed
> >>with this subdirectory (if playlist and segment shares the same base
> >>path).
> ...
> >missing update to the docs
> Actually, there was no docs for the -use_localtime property at all.
> I've added for both use_localtime and use_localtime_mkdir now.

what happens if the path is not a local file but for example
http://...

if that otherwise works but fails with the new option then it should
be documented and maybe tested for. It may seem logic for us but a
user might be confused why the option doesnt work for that


> >>diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c
> >>index bc28e3c..073618d 100644
> >>--- a/libavformat/hlsenc.c
> >>+++ b/libavformat/hlsenc.c
> ....
> >>+        if (!tmp)
> >>+            return AVERROR(ENOMEM);
> >en leaks here
> Fixed!
> >

> >also can you add a fate test for this feature ?
> Sorry, I have no idea how those works or how to write one. As far as
> I can see there are none for HLS today which I could extend on..

yes, it would be great to have hls fate tests
without such tests someone might break hls without him noticing ...
but thats orthogonal to the patch

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Breaking DRM is a little like attempting to break through a door even
though the window is wide open and the only thing in the house is a bunch
of things you dont want and which you would get tomorrow for free anyway
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20160216/8a5a8cc2/attachment.sig>


More information about the ffmpeg-devel mailing list