C
C
cursed2011-11-07 17:18:56
Video
cursed, 2011-11-07 17:18:56

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

4 answer(s)
H
hayk, 2011-11-07
@hayk

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 .

A
Alexey Ashurok, 2011-11-07
@AotD

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>

A
Alexey, 2011-11-07
@alexxxst

Everything has already been written above. Don't forget to prepare your flv files with flvtool2 or flvmeta so that everything works as expected :)

D
Denis Ineshin, 2011-11-07
@IonDen

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 question

Ask a Question

731 491 924 answers to any question