[FFmpeg-devel] [PATCH] avformat/hlsenc: creation of hls variant streams with master playlist in a single hlsenc instance

Dixit, Vishwanath vdixit at akamai.com
Sat Oct 21 11:13:15 EEST 2017


Please find the attached patches which add support to create multiple HLS variant streams and master playlist.

Key advantages:

  1.  A single HLS encoder instance can handle multiple variant streams now. Otherwise, a separate HLS encoder instance was needed for each variant stream. So, now a single set of HLS parameters can be provided in the command line for creating multiple variant streams.
  2.  Variant streams can be created as muxed AV media segments or separate AV media segments. Having separate AV media segments helps to re-use a single audio for multiple video only variant streams.
  3.  Creating variant streams in a single hlsenc instance simplifies the master playlist creation, as one hlsenc plugin handle will have details of all the variant streams.

Same logic of creating variant streams in DASH encoder plugin has been implemented here. It appears that there are lot of changes in the first patch. However, most of the changes are due to movement of HLS context structure parameters to new variant stream structure. Because of this, in many places the variable names ‘s’ and ‘hls’ have been replace by ‘vs’. Just an additional loop in write_header and write_trailer function handles creation of multiple variant streams.

Future updates:
Currently master playlist creation patch creates a basic master playlist. I will be submitting one more patch over this which will handle mapping of different rendition streams using #EXT-X-MEDIA and audio group id tags.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-libavformat-hlsenc-creation-of-hls-variant-streams-i.patch
Type: application/octet-stream
Size: 69890 bytes
Desc: 0001-libavformat-hlsenc-creation-of-hls-variant-streams-i.patch
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20171021/7fa5091a/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-libavformat-hlsenc-creation-of-hls-master-playlist-f.patch
Type: application/octet-stream
Size: 12307 bytes
Desc: 0002-libavformat-hlsenc-creation-of-hls-master-playlist-f.patch
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20171021/7fa5091a/attachment-0001.obj>

More information about the ffmpeg-devel mailing list