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?
Asked
Active
Viewed 1,226 times
-1

John Rotenstein
- 241,921
- 22
- 380
- 470

user1984795
- 167
- 1
- 9
-
How do you know the stream is good? – greeble31 Nov 13 '18 at 20:43
-
The stream plays well in the browser and also in the Exoplayer demo app when running on a phone device. Running it through apple's mediastreamvalidator does give me some errors like "Error: Measured peak bitrate compared to master playlist declared value exceeds error tolerance --> Detail: Measured: 276.46 kb/s, Master playlist: 198.00 kb/s, Error: 39.63%". But another hls stream with similar error runs fine. Is there any other way that I can verify the stream? – user1984795 Nov 14 '18 at 03:05
-
Your gradle/build tools version is not really relevant. Upgrading the player may help. Adjusting the stream may help. It's possible there are issues with both, but fixing either one will solve the problem. Another potential source of error is, you seem to be using a multi-bitrate playlist. So, we don't know if the .ts files that worked on your browser/phone are the same ones the TV app is trying to use. I suggest posting as much of your stream as you can, and maybe doing some Wireshark analysis on which files are getting served to which app. – greeble31 Nov 14 '18 at 04:02
-
Also you might want to add the appropriate exoplayer tag to your question. – greeble31 Nov 14 '18 at 04:03
1 Answers
0
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.

andrea-f
- 1,045
- 9
- 23