Answer the question
In order to leave comments, you need to log in
Video Preudo Streaming
Good afternoon.
They assigned me a task here: “we want to watch a video on a website, but we don’t want to set up a streaming server so that we can go to a fragment that has not yet been downloaded, well, everything is simple there.”
It is worth noting that I have never looked inside the flush in my life.
Googling has shown that a similar effect can be achieved using Range queries. However, I didn't find anything concrete. Prompt examples, pieces of the code, other sources on this question.
Thank you.
Answer the question
In order to leave comments, you need to log in
nginx has two pseudo-streaming modules: HTTP MP4 module and HTTP FLV module . It also says how everything works.
Plus a small tutorial on pseudo-streaming on the flowplayer website .
flv module in nginx, as far as I remember, is already included by default.
Everything elementary is simple: the player with the included pseudo-streaming module sends a request with a starting point when rewinding, the server gives a new file with the necessary headers exactly from the place that was ordered.
For flowplayer'a, the configuration is simple to disgrace:
<script src="flowplayer.min.js"></script>
<div id="player" style="width:560px;height:420px;display:block;"></div>
var player = $f("player", "<?=skin_url()?>player/player.swf", {
clip: {
url: urlencode("<?=$video_url['url']?>"),
extension: "flv",
provider: 'lighttpd'
},
plugins: {
lighttpd: {url: 'pseudostreaming.swf', queryString: escape('&<?=$video_url['position_marker']?>=${start}')},
controls: {url: 'ctrls.swf'}
}
});
</script>
Everything has already been written above. Don't forget to prepare your flv files with flvtool2 or flvmeta so that everything works as expected :)
You can find out something else here: h264.code-shop.com/trac
Here is a demo: h264-demo.code-shop.com/demo/apache/testlist.html
In the player code, it looks something like this, a request is added to the video URL my_video.mp4?start=100
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question