[FFmpeg-devel] [PATCH] lavf/segment: add M3U8 list support

Stefano Sabatini stefasab at gmail.com
Thu Aug 16 00:45:55 CEST 2012


On date Wednesday 2012-08-15 23:59:24 +0200, Clément Bœsch encoded:
> On Wed, Aug 15, 2012 at 11:50:30PM +0200, Stefano Sabatini wrote:
[...]
> > From 22288f46370d8df720525e0013a7379e031b92f1 Mon Sep 17 00:00:00 2001
> > From: Stefano Sabatini <stefasab at gmail.com>
> > Date: Wed, 15 Aug 2012 11:06:34 +0200
> > Subject: [PATCH] lavf/segment: add M3U8 list support
> > 
> > Address trac ticket #1642.
> > ---
> >  doc/muxers.texi       |    4 ++++
> >  libavformat/segment.c |   21 +++++++++++++++++++++
> >  2 files changed, 25 insertions(+), 0 deletions(-)
> > 
> > diff --git a/doc/muxers.texi b/doc/muxers.texi
> > index aee90b5..c30d1cd 100644
> > --- a/doc/muxers.texi
> > +++ b/doc/muxers.texi
> > @@ -469,6 +469,10 @@ muxer according to the provided pattern, and should not contain the
> >  
> >  @var{segment_start_time} and @var{segment_end_time} specify
> >  the segment start and end time expressed in seconds.
> > +
> > + at item m3u8
> > +Generate an extended M3U8 file, version 4, compliant with
> > + at url{http://tools.ietf.org/id/draft-pantos-http-live-streaming-07.txt}.
> >  @end table
> >  
> >  Default value is "flat".
> > diff --git a/libavformat/segment.c b/libavformat/segment.c
> > index 78b304a..29c053b 100644
> > --- a/libavformat/segment.c
> > +++ b/libavformat/segment.c
> > @@ -20,6 +20,8 @@
> >  
> >  /**
> >   * @file generic segmenter
> > + * M3U8 specification can be find here:
> > + * @url{http://tools.ietf.org/id/draft-pantos-http-live-streaming-07.txt}
> 
> Any reason not to follow the latest draft? (8)

I was not aware of it (followed the link on the Wikipedia page),
updated.

I'm also writing "," after duration in EXTINF, since "seems" more
compliant with:

|#EXTINF:<duration>,<title>
|
|   "duration" is an integer or floating-point number in decimal
|   positional notation that specifies the duration of the media segment
|   in seconds.  Durations that are reported as integers SHOULD be
|   rounded to the nearest integer.  Durations MUST be integers if the
|   protocol version of the Playlist file is less than 3.  The remainder
|   of the line following the comma is an optional human-readable
|   informative title of the media segment.

[...]
> No more comment from me, thanks.

Thanks, will push the patch in a day or so.
-- 
FFmpeg = Friendly and Fundamentalist Magic Patchable Ecletic Guide


More information about the ffmpeg-devel mailing list