

mpverbose(log, Broken FFmpeg RTSP API > not setting timeout.n). Is it possible to tell ffmpeg to "crash" (or simply stop it's process) when no input is coming on the -i address (on the VPS's side)? I am using a bash script that restarts the process automatically, so that's taken care of.Īccording to ffmpeg's official documentation the timeout flag takes MICROSECONDS as a value and listen_timeout takes SECONDS. Until now, weve made FFmpeg use the default network timeout - which is apparently. The problem comes when the connection between the re-streamer and the VPS drops: I have to ssh into the VPS and restart the ffmpeg instance manually. i rtsp://:4445/live.sdp \Įverything works fine so far: I can read the HLS stream in browser and it is pretty stable and fast. Rtsp://:4445/live.sdpĪnd this is the command I'm using on the VPS: ffmpeg \ This is the ffmpeg command I'm using on that computer (the re-streamer, may I say): ffmpeg \ The computer takes the RTSP data FROM the IP camera and retranslates it TO the VPS.

The RTSP video comes from a computer somewhere else (in another town in this case), to which I have an IP camera connected. Import .StreamType import .ffmpeg.FFmpeg import .ffmpeg.There is an ffmpeg instance running as a server on a VPS, that converts RTSP video to HLS and serves it to the web (using Apache). I quickly find a command line that works: This will also allow me to hide the access identifiers to the camera by using my server as a proxy.Ī great tool that is well known for doing video conversion is FFMPeg, so I'm starting to look into how I can use it to convert RSTP. This is where I encounter the main problem! How to use this protocol in an HTML page that does not support it? My solution is to use a server that allows to transcode the video in a more known format (MP4) and an ultra standard protocol (Http). By searching a little on the Web (Yes the documentation is difficult to access.), I discover that the communication protocol used by the NVR is RTSP (Real-Time Streaming Protocol). The camera is connected to an NVR (Numeric Video recorder) which has an API that allows to retrieve the configuration information and the video stream. However, you can stream RTSP using additional software that’s embedded onto your website. Because of this, there is no easy, straightforward way to stream RTSP in a web browser, as RTSP is designed more for streaming video on private networks such as security systems within a business. Through VLC it's just File -> Stream -> enter your RTSP link -> add rtsp output at 127.0.0.1 and you can connect to that one. If you want to do it programatically you can use VLC and the output string.

I recently started working on a surveillance camera system and I want to be able to display the collected videos on web pages.Īt first glance, it seemed very easy, but I quickly realized that I would have to rack my brains! You cannot directly stream RTSP over HTTP. I used VLC to restream rather than FFMPEG, the built in support for acting as a 'server' was better for my needs.
