Z
Z
zeksa2013-01-01 18:09:46
C++ / C#
zeksa, 2013-01-01 18:09:46

Force browser to stop buffering video stream?

As part of my course work, I wrote a simple server in C ++ and OpenCV, which allows you to stream a video stream from a webcam to a browser. Video stream in .ogg format, Theora codec. The browser displays all the goodness using HTML5 - a regular page with a video tag.
Using OpenCV, the server captures frames from the camera and writes them to a file through the codec; the actual streaming to the browser comes from the file.
Due to the uneven frame size when writing them from a file to the transfer buffer via the socket, there is a moment when the browser starts buffering and cannot continue to automatically continue playing the stream.
Question: Are there any methods to force the browser to continue playing?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
R
Rowdy Ro, 2013-01-02
@zeksa

In similar systems, the so-called time machine is easier to implement - the video is issued with a delay and you put 15 second files on the server that the client reads.
Before saving, it is better to do qt-faststart so that the atomic chunk is in front and you do not have to wait for the entire file to load.

N
ntz, 2013-01-01
@ntz

The web server should slow down the return of data. What does it do when it reaches the end of an unfinished file?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question