Search code examples
video-streaminggoogle-tv

HTTP Live Streaming - get playing link


I want to track which link according to bandwidth is playing.

for exmaple m3u8 file contains:

#EXTM3U
#EXT-X-STREAM-INF:PROGRAM-ID=1, BANDWIDTH=1950000
http://link1.M3U8
#EXT-X-STREAM-INF:PROGRAM-ID=1, BANDWIDTH=1500000
http://link2.M3U8
#EXT-X-STREAM-INF:PROGRAM-ID=1, BANDWIDTH=1200000
http://link3.M3U8
#EXT-X-STREAM-INF:PROGRAM-ID=1, BANDWIDTH=950000
http://link4.M3U8
#EXT-X-STREAM-INF:PROGRAM-ID=1, BANDWIDTH=800000
http://link5.M3U8
#EXT-X-STREAM-INF:PROGRAM-ID=1, BANDWIDTH=700000
http://link6.M3U8

player starts with "http://link1.M3U8" and I want to show toast with this link. Than, while playing, my bandwidht changed, and player switched to "http://link4.M3U8" - and I want to show toast with this link.

Is this possible to do something like this? Thank you!


Solution

  • First off, you can't get toasts to fire w/ your current bandwidth. The standard way to do this is to encode a movie at different bit rates with a text overlay saying what the bit rate is. (I tend to use the open source Big Buck Bunny)