0

I have created a HLS stream from a FLAC file with an output of FLAC using the following command:

ffmpeg -i 10-brass-in-pocket.flac -map 0:a -c:a:0 flac -f hls -hls_playlist_type vod -master_pl_name master.m3u8 -hls_time 15 -hls_segment_filename %03d.ts -var_stream_map "a:0" stream_%v.m3u8

I have published it here:

https://di5wym8npn4cm.cloudfront.net/stackoverflow/master.m3u8

Page with audio controls here:

https://di5wym8npn4cm.cloudfront.net/stackoverflow/index.html

I can see from the network tab in Safari that the segments of the track are being downloaded but they do not play. Safari is able to decode FLAC, if I link to the source file it plays.

Apples mediastreamvalidator tools returns the following:

--------------------------------------------------------------------------------
MUST fix issues
--------------------------------------------------------------------------------

Error: Illegal MIME type
--> Detail:  MIME type: application/x-mpegURL
--> Source:  https://di5wym8npn4cm.cloudfront.net/stackoverflow/master.m3u8

--> Detail:  MIME type: application/x-mpegURL
--> Source:  stream_0.m3u8

Error: Measured peak bitrate compared to master playlist declared value exceeds error tolerance
--> Detail:  Measured: 1005.65 kb/s, Master playlist: 140.80 kb/s, Error: 614.24%
--> Source:  https://di5wym8npn4cm.cloudfront.net/stackoverflow/master.m3u8
--> Compare: stream_0.m3u8

Why does this stream not play and what tools are available to debug these issues?

Myles McDonnell
  • 12,943
  • 17
  • 66
  • 116

1 Answers1

3

You're using FLAC in MPEG-TS. It must be in fMP4.

HLS Authoring Specification for Apple Devices:

Audio

  1. Audio encoding requirements

2.23. The container format for xHE-AAC, Apple Lossless, and FLAC audio MUST be fMP4.

aergistal
  • 29,947
  • 5
  • 70
  • 92
  • thanks. I have created a new question after changing to fMP4 https://stackoverflow.com/questions/65629475/hls-flac-stream-using-ffmpeg – Myles McDonnell Jan 08 '21 at 13:02