javahttp-live-streamingant-media-server-sdk

HLS playback problems


Using Enterprise Edition 1.9.1 official AMI on AWS.

Scenario:

Ant Media Server application is configured to use ABR with 360, 480, 720 resolutions.

The player-side code polls the HLS stream URL waiting for the stream to start.

Expected behavior:

  1. When the stream is not live, respond with 404 error
  2. When the stream goes live, respond with the m3u8 containing all defined resolutions

Actual behavior:

  1. When the stream is not live, the HTTP status returned for the m3u8 is 200 but the contents of the response is a 404 not found page.
  2. When the live stream starts, the m3u8 received contains only one resolution (I think, it's random - can be any of the pre-defined):
#EXTM3U
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=0,RESOLUTION=1280x720,CODECS="avc1.42e00a,mp4a.40.2"
5e820545bd53c64aca9c57c1_720p.m3u8
  1. If I request the m3u8 in a few seconds after the incomplete one, I receive the complete m3u8 with all defined resolutions:
#EXTM3U
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=680704,RESOLUTION=640x360,CODECS="avc1.42e00a,mp4a.40.2"
5e820545bd53c64aca9c57c1_360p.m3u8
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=1072360,RESOLUTION=854x480,CODECS="avc1.42e00a,mp4a.40.2"
5e820545bd53c64aca9c57c1_480p.m3u8
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=1409432,RESOLUTION=1280x720,CODECS="avc1.42e00a,mp4a.40.2"
5e820545bd53c64aca9c57c1.m3u8
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=2263000,RESOLUTION=1280x720,CODECS="avc1.42e00a,mp4a.40.2"
5e820545bd53c64aca9c57c1_720p.m3u8

Workaround:

Currently I am resolving this by parsing the contents of the response:

Am I doing something wrong or is this a bug?


Solution

  • This appeared to be a bug that has been fixed in v2.0. After the upgrade everything works as documented.