Feature #2375
closedmod_flv_streaming traffic shaping
Description
Cherokee supports automatic traffic shaping by reading the bitrate of the video file it's sending and then limiting upload speed so we are not wasting bandwidth sending a file faster than the user can watch it.
It's also not limiting the traffic for 5 seconds of the videos so that it can start to playback fast.
http://www.cherokee-project.com/doc/modules_handlers_streaming.html
It would be great if this was implemented into mod_flv_streaming
Updated by stbuehler over 13 years ago
- Status changed from New to Wontfix
Not going to happen in 1.4 - needs too many core modifications.
Updated by icy over 13 years ago
Three main issues with the solution as implemented in Cherokee:
1) the webserver needs to read and parse parts of the video file to extract the bitrate
2) the video needs to have a constant bitrate
3) Only works with flv files
This is a feature that can be actually implemented in a much better way.
- Save the bitrate (if constant) or the max bitrate (if variable) of the video in the db when inserting it into your system.
- When directing the user to the file, pass along a parameter to specify the speed he should be throttled to.
- Optionally use something like mod_secure_download to prevent users from tinkering with that parameter.
That way, Lighty does not need to parse the video file over and over needlessly and it works with any kind of video format/container/codec.
I have implemented some more advanced traffic throttling features in Lighty 2.0 including the bursting feature to prevent slow-starts on streams.
You can read more about it here: Traffic_Shaping
The only thing missing is picking the speed parameter either from a header that the backend sends or from part of the URL.
But even without this, you can just define a bunch of speed "categories" like 100kb, 200kb, 500kb which should cover most cases well enough.
Updated by sho_sho_miga over 13 years ago
I am going to try icy's suggestion, making a bunch of rewrites for different bitrates in 50kb increments.
EDIT: Just realized this is for Lighty 2.0 only
Updated by gstrauss about 1 year ago
- Status changed from Wontfix to Obsolete
- ASK QUESTIONS IN Forums set to No
mod_flv_streaming is no longer part of the lighttpd base
For replacement, see lua mod_flv_streaming
In your custom lua script, you could access pre-cached metadata about flv files, including items like the bitrate, which you have previously determined and saved from parsing the flv file.
Also available in: Atom