[FFmpeg-devel] [PATCH 12/18] avformat/hls: parse ID3 timestamps for elementary audio streams

Michael Niedermayer michaelni at gmx.at
Tue Dec 31 06:33:13 CET 2013


On Tue, Dec 31, 2013 at 07:28:26AM +0200, Anssi Hannula wrote:
> 31.12.2013 06:58, Michael Niedermayer kirjoitti:
> > On Tue, Dec 31, 2013 at 04:46:37AM +0200, Anssi Hannula wrote:
> >> 31.12.2013 03:32, Michael Niedermayer kirjoitti:
> >>> On Tue, Dec 31, 2013 at 03:04:33AM +0200, Anssi Hannula wrote:
> >>>> 30.12.2013 16:12, Michael Niedermayer kirjoitti:
> >>>>> On Mon, Dec 30, 2013 at 01:14:26PM +0200, Anssi Hannula wrote:
> >>>>>> HLS provides MPEG TS timestamps via ID3 tags in the beginning of each
> >>>>>> segment of elementary audio streams.
> >>>>>>
> >>>>>> Signed-off-by: Anssi Hannula <anssi.hannula at iki.fi>
> >>>>>> ---
> >>>>>>
> >>>>>> This is a bit hacky, but I could not see any better way.
> >>>>>
> >>>>> this seems to break some hls streams
> >>>>> for example:
> >>>>> http://qthttp.apple.com.edgesuite.net/c123pibhargjknawdconwecown/0064/prog_index.m3u8
> >>>>>
> >>>>> didnt investigate why
> >>>>
> >>>> The ID3 tag in the beginning of each segment seems to contain an
> >>>> attached picture (APIC) in addition to the timestamp, so the ID3 tag is
> >>>> too large for the id3 hack to fully intercept (since the hack currently
> >>>> depends on the ID3 tag fitting in the caller-provided buffer), so the
> >>>> caller gets 0 bytes.
> >>>>
> > 
> >>>> The APIC is currently parsed to a static mjpeg stream by
> >>>> ff_id3v2_parse_apic() in avformat_open_input(). I guess it could
> >>>> theoretically change mid-stream as well, though it might not currently
> >>>> happen in practice (no idea, though [1](13) suggests it does not).
> > 
> > dunno about the picture but from reading "Adding Timed Metadata" on:
> > https://developer.apple.com/library/ios/documentation/networkinginternet/conceptual/streamingmediaguide/UsingHTTPLiveStreaming/UsingHTTPLiveStreaming.html
> > 
> > it sounds like these things can change
> 
> I'm just not sure that the ID3 tag in the beginning of an audio
> elementary stream segment is considered such "timed metadata", segments
> are usually around 10sec in length, which is a bit coarse...
> 
> The "If you are writing your own segmenter, you can read about the
> stream format for timed metadata information in Timed Metadata for HTTP
> Live Streaming." link goes to a page that describes MPEG-2 TS timed ID3
> metadata, nothing about audio elementary stream ID3 metadata.

yes, this confuses me too, but it was the best match to that id3
stuff that i found ...


> 
> [...]
> -- 
> Anssi Hannula
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> 

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

In a rich man's house there is no place to spit but his face.
-- Diogenes of Sinope
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20131231/82136649/attachment.asc>


More information about the ffmpeg-devel mailing list