Android VideoView BandWidth detection
Asked Answered
G

0

6

On Android device I am playing one video URL which is HLS video stream. I am providing path for M3U8 file to android VideoView.

This M3U8 File has different versions of Video divided by bandwidth/bit rate (Variable bitrate video streams).

It is task of VideoView to detect the current bandwidth of the device to server connectivity and request the appropriate video stream, so that video plays smoothly.

But VideoView is not doing that, for example:
If my device has bandwidth of around 30 KBPS then VideoView is sending request for 90 KBPS video stream and because of that my video is not playing properly and also if my bandwidth is more and 1 MBPS then also it is requesting some random stream.

Can we improve VideoView's bandwidth detection and provide him with correct bandwidth values so that he can request for the proper video stream according to current bandwidth, does VideoView provides this type of API's or can we some how hack it.

Girard answered 6/3, 2013 at 11:3 Comment(7)
Are you asking about how to test the current network spee?Margarite
I am asking how to improve bandwidth detection of VideoView.Girard
"It is task of VideoView to detect the current bandwidth of the device to server connectivity and request the appropriate video stream, so that video plays smoothly." -- please point to where it is documented that VideoView has this capability.Woolly
Where can i point it? If it is supporting HLS (M3U8) then it should do that.Girard
@A_user how did you implemented this? Can i have the tutorial for the same?Theotheobald
@Noundla We need to write an proxy in-between videoview and the HLS server so all request go from our proxy, using this technic we download the TS segment from the HLS server and send them to videoview and in this process we calculate the available network speed bytes downloaded & time taken to download.Girard
@A_user if possible, can you please post your solution as answer here. Because there is no proper solution available for any questions. Plz do that for us.Theotheobald

© 2022 - 2024 — McMap. All rights reserved.