why does the Hls stream freeze in the default mediaplayer in Amazon fire tv app?

1.3k Views Asked by At

I am trying to play a hls stream in the existing Fire TV app builder(1.0.7), the stream doesn't play well. The video freezes every 7 seconds and then the audio repeats itself. What is the best way to approach this issue? I thought I can update the media player and see if that fixes the issue, and wanted to use the latest version of Amazon port of exoplayer (https://github.com/amzn/exoplayer-amazon-port). I have already upgraded the existing code forked from Amazon fire app builder(1.0.7) to use gradle plugin 3.1.3 and build tools 27.0.3. Is upgrading the player the right approach?

1

There are 1 best solutions below

0
On

The 7 seconds could be the segment length and a blind period in between, for instance if the video is DRM encrypted, the license checking. Also note that there could be two different DRM providers for instance ClearKey for low bitrates and WV for higher, meaning two different servers and backends, so the discrepancy could be there.

Regarding better checking the stream, you could remove each track one by one from the .m3u8 file and try if it plays. For example:

#EXTM3U
#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="audio_high",NAME="english stereo",LANGUAGE="en",AUTOSELECT=YES,URI="105560_audio_1_stereo_128000.m3u8"
#EXT-X-STREAM-INF:BANDWIDTH=18128000,CODECS="avc1.42c00d,mp4a.40.2",RESOLUTION=3840x1920,AUDIO="audio_high"
105560_video_1920_9000000.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=10128000,CODECS="avc1.42c00d,mp4a.40.2",RESOLUTION=2160x1080,AUDIO="audio_high"
105560_video_1080_5000000.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=6128000,CODECS="avc1.42c00d,mp4a.40.2",RESOLUTION=1440x720,AUDIO="audio_high"
105560_video_720_3000000.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=3128000,CODECS="avc1.42c00d,mp4a.40.2",RESOLUTION=1080x540,AUDIO="audio_high"
105560_video_540_1500000.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=2128000,CODECS="avc1.42c00d,mp4a.40.2",RESOLUTION=720x360,AUDIO="audio_high"
105560_video_360_1000000.m3u8

Remove the first one and try playback again. Do this for each of the tracks to better troubleshoot the error. Also if you are testing via Android Studio and Exoplayer, you could look at adb logcat to see where playback is failing or errors are.