Search code examples
amazon-web-serviceshttp-live-streamingmpeg-dashaws-media-convert

AWS MediaConvert CMAF format HLS not working


I'm using AWS Elemental MediaConvert to encode to CMAF, which as I understand will allow for a single format to stream to all devices. However I'm having issues getting HLS streaming to work with any player.

DASH is working:

https://bitmovin.com/demos/stream-test?format=dash&manifest=https%3A%2F%2Fstream-test1234.s3.amazonaws.com%2Fpreview%2F05f3e320-c5b6-11e9-97ce-35297279db3d.mpd

HLS is not:

https://bitmovin.com/demos/stream-test?format=hls&manifest=https%3A%2F%2Fstream-test1234.s3.amazonaws.com%2Fpreview%2F05f3e320-c5b6-11e9-97ce-35297279db3d.m3u8

Getting manifest errors:

1210/SOURCE_HLS_STREAM_ERROR
1202/SOURCE_MANIFEST_INVALID

I had similar problems with the shaka player that advertises CMAF support:

https://codesandbox.io/s/pedantic-haze-y6qxq (un-comment the manifestUri to test HLS)

Errors also seem to be related to the manifest:

HLS playlist has both Master and Media/Segment tags.

Contents of .m3u8 file:

#EXTM3U
#EXT-X-VERSION:6
#EXT-X-INDEPENDENT-SEGMENTS
#EXT-X-STREAM-INF:BANDWIDTH=1231785,AVERAGE-BANDWIDTH=1214202,VIDEO-RANGE=SDR,CODECS="avc1.4d401f,mp4a.40.2",RESOLUTION=1280x720,FRAME-RATE=25.000,AUDIO="program_audio_0"
05f3e320-c5b6-11e9-97ce-35297279db3d.m3u8
#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="program_audio_0",LANGUAGE="eng",NAME="Alternate Audio",AUTOSELECT=YES,DEFAULT=YES,URI="05f3e320-c5b6-11e9-97ce-35297279db3d.m3u8"

Any ideas as to whats wrong? I just used the default CMAF settings provided by MediaConvert.


Solution

  • I know this is really old, but I just had the same problem and figured it out...

    It turns out, when doing just HLS, MediaConvert requires Output Groups > Apple HLS > Output Settings > Name modifier which adds a name modifier to the file names and, most importantly, the HLS media manifest. However, when using CMAF output that same field exists at Output Groups > CMAF > H.254 (or whatever you choose) > Output Settings > Name modifier, but it is NOT required. So if you don't enter a name modifier the HLS master manifest and the HLS media manifest are given the same name. This results in the HLS master manifest overriding the HLS media manifest and then also referring to itself, since they both were given the same name.

    I've reported this bug to AWS feedback, but who knows how long that will take or if they will get to it. I encourage anyone else who has this problem to do the same.