Is it possible to get the RTSP Streaming data into the web browser?
Below are some of my findings. Kindly correct me if I am wrong?
Only Mac OS, and Safari supports RTSP Live Streaming.
HTML 5 video does not support RTSP.
I can use the VLC plugin, but I don't want to use that.
Possibility of mixing ffmpeg and websocket?
Assume my IP camera is connected with Ethernet.
In the client machine:
Question:
I might be wrong in different places. Kindly provide input.
A browser cannot play RTSP streams directly, therefore it is necessary to convert the RTSP stream into HTML5 on the WCS server's side.
Enable the "Tunnel RTP and RTSP over HTTP" option and set the appropriate port used for the RTSP stream (PORT). After that, when using VLC as a client the streaming will be requested to be HTTP tunneled.
Here is a blog entry, or tutorial if you will, that achieves something very similar.
Their setup slightly different, but this is the summary:
use ffmpeg
to convert your input into mpeg1video:
ffmpeg -i rtsp://whatever -f mpeg1video -b 800k -r 30 http://localhost:8082/yourpassword/640/480/
Install node.js
with stream-server.js
script from jsmpeg and ws
ws WebSocket package.
To view the stream, use the stream-example.html
and jsmpg.js
from the jsmpeg. Change the WebSocket URL in stream-example.html
to localhost
and open it in your favorite browser.
Update an SO topic suggest two other working solutions, with <video> tag: with stream-m Java server or with ffserver
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With