[FFmpeg-devel] [PATCH] Added an Adobe HTTP Dynamic Streaming (HDS) demuxer

Ed Torbett ed.torbett at simulation-systems.co.uk
Mon Jan 27 13:23:00 CET 2014


 
> Complete patch with recent improvements
> 
> Removed the "?hdcore" Akamai url assumption
> Fixed the AMF metadata parsing to work with HDS streams from Wowza
> Updated the list of tested sample streams

Still testing this code, with one comment so far:

The following code causes the demuxer to loop back to the start on reaching the end of the last fragment:

    if(!is_live && segment_entry && fragment_entry && fragment > segment_entry->fragments_per_segment) {
        media->nb_fragments_read = 0;
        fragment = fragment_entry->first_fragment;
    }

Firstly, this segment assumes that all fragment numbers start from zero, which in the streams I am working with is not the case (so probably won't apply in other cases).  This can be fixed by changing the conditional part "fragment > segment_entry->fragments_per_segment" to "fragment > (fragment_entry->first_fragment + segment_entry->fragments_per_segment)".

I'm also not sure that looping is the correct behaviour in this case. I think it would be more appropriate to set an EOF flag here so that the stream terminates. Otherwise, wouldn't transcoding an HDS stream cause it to loop infinitely without ever completing?

Regards,
Ed





More information about the ffmpeg-devel mailing list