rtsp-ffmpeg icon indicating copy to clipboard operation
rtsp-ffmpeg copied to clipboard

Html5 video compatibility

Open marcoaureliovrs opened this issue 7 years ago • 3 comments

Hello, I'm trying to use your library to run video in a html5 video player

But unfortunately I'm not succeeding, would you have an example of playing videos in html5?

marcoaureliovrs avatar Mar 17 '17 12:03 marcoaureliovrs

Hi @marcogorak ,

This library only decodes video in a string of matrix pixels that represent each frame of the video. Obviously you can't target directly these frames to html5 video element because this expect a encoding video format like mp4, ogg... Also, you need another extra information like the fps. I suggest you to take a view of these links that containts libraries usefull for you:

Brodway : https://github.com/mbebenita/Broadway

Images to video Javascript: http://techslides.com/convert-images-to-video-with-javascript

Another solution is to develop a basic video player based in canvas (for more compatibility) that control the time and the fps of the frames string.

Also if you want to tell more about your problem, maybe we could make a solution in this library if more developers have the same problems.

Thank you!

Seikon avatar Mar 22 '17 11:03 Seikon

Hi, thanks for the reply.

I wanted to be able to control the pause and play of the stream outside that I would like to buffer the stream in the user's browser because at the moment of execution the frames are being sent in half and being displayed on the screen.

marcoaureliovrs avatar May 15 '17 18:05 marcoaureliovrs

I think you can start and stop the stream with Socket IO clearing the channel that you are subscribed.

In the example you can disconnect with divSocket.disconnect(); and reconnect with divSocket.connect();

Seikon avatar May 19 '17 12:05 Seikon