[FFmpeg-devel] [PATCH] lavf/segment: add M3U8 list support
Clément Bœsch
ubitux at gmail.com
Wed Aug 15 23:59:24 CEST 2012
On Wed, Aug 15, 2012 at 11:50:30PM +0200, Stefano Sabatini wrote:
[...]
> > Because in that case, IIRC the spec require to get the higher value.
>
> From:
> http://tools.ietf.org/html/draft-pantos-http-live-streaming-07#section-3.3.2
>
> |The EXT-X-TARGETDURATION tag specifies the maximum media segment
> |duration. The EXTINF duration of each media segment in the Playlist
> |file MUST be less than or equal to the target duration. This tag
> |MUST appear once in the Playlist file. It applies to the entire
> |Playlist file. Its format is:
> |
> |#EXT-X-TARGETDURATION:<s>
> |
> |where s is an integer indicating the target duration in seconds.
>
> I'm putting the EXT-X-TARGETDURATION at the end of the file, which is
> not forbidden by the specification.
>
Hehe :)
> >
> > > + }
> > > + avio_printf(seg->list_pb, "#EXTINF:%f\n%s\n",
> > > + seg->end_time - seg->start_time, oc->filename);
> >
> > When I was cutting the big buck bunny sample (check in the hls.py patch
> > for the exact cmd line I was using), the end_time was always the duration
> > of the whole presentation, so I'm unsure about that. The workaround I used
> > in the script was a diff with the start_time of the previous event.
>
> This is unrelated with the current patch, would you mind send a patch
> for that?
>
I need to check why that happens first, but feel free to commit with this
unfixed if you think that's not much an issue.
> Patch updated (on top of the previously posted patches).
> --
> FFmpeg = Fiendish and Frenzy Majestic Perennial Esoteric Gem
> 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)
[...]
No more comment from me, thanks.
--
Clément B.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20120815/36786bba/attachment.asc>
More information about the ffmpeg-devel
mailing list