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. 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 \ Steven Liu Mon, 00:08:14 -0800 > 2019111815:37Tom Gaudasiski That seems to change the call-stack a bit, but it still gets stuck on > something in hls.c.The computer takes the RTSP data FROM the IP camera and retranslates it TO the VPS. Re: FFmpeg-devel TCP timeout for HTTP/HTTPS connections. If so, its the speed of the disk and local network connection to the NVR that will limit your ability to play as fast as you want. 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. The RTSP video comes from a computer somewhere else (in another town in this case), to which I have an IP camera connected. I used VLC to restream rather than FFMPEG, the built in support for acting as a 'server' was better for my needs. Note I have configured the encoding of RTSP stream with very small IDR frames interval. I'm using shellcommand for calling ffmpeg -rtsptransport tcp -i '1' -an -frames:v 1 -y '2' as a workaround for now and it works just fine (less than 1 sec). FWIW, I was able to setup a local RTSP server for testing purposes using simple-rtsp-server and ffmpeg following these steps: Create a configuration file for the RTSP server called rtsp-simple-server. this will zero out the current image when a network timeout occurs. 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). Ffmpeg camera cannot take a snapshot because of a timeout without any reason. The RTSP Player module uses the Open Source FFmpeg RTSP player to play RTSP network.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |