Ffmpeg python linux image2pipe2/12/2023 ![]() ![]() ![]() The web browser closes its connection, or the camera goes offline, theįfmpeg process does seem to reliably stop.Ī tool like ONVIF Device Manager may help figuring out the RTSP stream URL if you can't find it in the documentation for your camera (look at the bottom of the "live video" screen).Īpart from getting the paths right to suit your setup, nothing here should be too specific to Linux or a particular distribution. ![]() Have two devices viewing the stream then the CPU load is doubled. This approach is not efficient, so if you You might be able to get systemd start ffmpeg directly, but I had trouble getting the output stream to be sent to the socket, and wasn't sure how to stop the process when the socket was closed.Īs it converts between video formats it requires a bit of CPU power on the host, though that can be tuned by configuring the resolution and framerate of the original RTSP stream, as well as resizing the output stream if required.Ī 1080p stream at 10FPS on an Intel Core i5-8259U uses about 5-10% CPUĪnd consumes 256MB of RAM. Similar could be done using nginx + fastcgi, or in python - perhaps even an Octoprint plugin. This approach uses lighttpd and cgi-bin as the server. I'm using a cheap Chinese IP Camera that only has an RTSP stream to monitor my 3D printer via Octoprint/Octoapp, which requires a MJPEG stream over HTTP. ![]()
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
May 2023
Categories |