tifroz
Streaming Star
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-04-2016
06:06 PM
Roku video player sends too many requests
I found out that when the video player ("roVideoPlayer" in my code) starts streaming an mp4 file, it doesn't just generate one, but a dozen requests (each with a different byte range, e.g. bytes=1131256-, bytes=1717552-, bytes=3060889-, etc ..) I imagine that the video player is trying to generate snapshots at different intervals(?)
However in my case, this is something I need to avoid as the servers aren't under my direct control, and some of them will throw HTTP 429 codes (Too many requests)
Is there a way to disable this behavior, and get the player to only send the requests needed to stream the video?
However in my case, this is something I need to avoid as the servers aren't under my direct control, and some of them will throw HTTP 429 codes (Too many requests)
Is there a way to disable this behavior, and get the player to only send the requests needed to stream the video?
6 REPLIES 6
joetesta
Roku Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-05-2016
12:35 PM
Re: Roku video player sends too many requests
Yes this is the behavior of the player buffering chunks. I ran into this when trying to count the number of views by counting http requests. Unfortunately I think your only option would be to find hosting that will tolerate this behavior.
aspiring
tifroz
Streaming Star
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-06-2016
10:46 AM
Re: Roku video player sends too many requests
Thanks this is helpful!...though not what I wanted to hear obviously 😉

RokuMarkn
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-06-2016
11:50 AM
Re: Roku video player sends too many requests
MP4 is not a streaming format, and it's rather difficult (and wasteful) to read the whole file sequentially in order to play it. In any case, counting the number of http requests is not a good way to count views, since there will be unavoidable repeat requests -- for example if the users pauses for a while, the connection will probably time out and a new connection will need to be made when playback resumes.
--Mark
--Mark
tifroz
Streaming Star
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-06-2016
12:31 PM
Re: Roku video player sends too many requests
Thanks for chiming in Mark
I am not a video expert, so I won't argue the right or wrong of the behavior on an academic basis. But on a practical basis, hopefully we could agree on these 2 points
1. mp4 is a commonly used to stream videos - we as developers can't simply dismiss this reality
2. sending a dozen simultaneous requests to a server isn't particularly friendly to the server - and it's not unreasonable for the server to protest when this happens
It would be helpful if that behavior would either be configurable, or if the behavior was closer to that of html5 video players in common browser since most video streaming servers are configured & tested against these browsers.
I am not a video expert, so I won't argue the right or wrong of the behavior on an academic basis. But on a practical basis, hopefully we could agree on these 2 points
1. mp4 is a commonly used to stream videos - we as developers can't simply dismiss this reality
2. sending a dozen simultaneous requests to a server isn't particularly friendly to the server - and it's not unreasonable for the server to protest when this happens
It would be helpful if that behavior would either be configurable, or if the behavior was closer to that of html5 video players in common browser since most video streaming servers are configured & tested against these browsers.

RokuMarkn
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-06-2016
03:09 PM
Re: Roku video player sends too many requests
The requests are not sent simultaneously; they are sequential. I don't see what's unfriendly about making multiple requests; in fact, it seems quite the opposite. The choice is between making several requests to download the necessary data which is scattered around the file, or reading the data sequentially and discarding the data that is not needed. Generally server costs are related to bandwidth, not to the number of http requests, so if I were running a server, I'd prefer that the client request only the data it needs rather than downloaded unnecessary data only to discard it. I'm sure that most Roku customers would also prefer that the player download the minimum data necessary, since home internet costs are also based on total bandwidth, not on a count of http requests. If this feature were configurable, your channel's users would probably not be happy to learn that you're using more of their bandwidth than necessary because of some server peculiarity.
--Mark
--Mark
tifroz
Streaming Star
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-06-2016
03:57 PM
Re: Roku video player sends too many requests
Thanks for taking the time to explain Mark, this does make sense. I was under the impression that these requests are made in parallel because there is a large number of requests send very quickly when an mp4 starts streaming - but it could very well be sequential (just a really fast sequence).
Still makes sense to behave more like mainstream browsers for compatibility purposes IMHO - but I won't beat this very dead horse again...
Still makes sense to behave more like mainstream browsers for compatibility purposes IMHO - but I won't beat this very dead horse again...