Convert rtsp: stream to ???

I have a cheap IP web camera, that provides a stream that looks like this:
This is openable in VLC, but not RS.
I can setup VLC under linux or Windows to convert and re-stream, but I've been unable to find a combination that works.

While posting this, I did get it figured out somewhat, thanks to this page:

Here is the command under windows that works for me:
vlc.exe -R "rtsp://" --sout "#transcode{vcodec=mjpg,vb=2500,scale=1.0,fps=10,acodec=none}:standard{access=http{mime=multipart/x-mixed-replace; boundary=7b3cc56e5f51db803f790dad720ed50a},mux=mpjpeg,dst=:8888/videostream.cgi}

Then on RS, I put in:

I just need to run one copy of VLC per camera, to re-stream so RS can understand it.

It takes a good amount of CPU-  Totally pegs a dual core VM, 10-15% of a 12 core hyperthreaded desktop.

Any chance of directly supporting the rtsp protocol, or is that too much trouble for too little effort?



  • That is too much trouble. I would need to include vlc or ffmpeg to do exactly your conversion. So it does not really gain anything except that you do not set the command. But then I would need to add configs.

    Interface shows webcam using img and that does not support rtsp not would I know how to split that into multiple streams.

    Most IP cams also support mjpg natively. Have a check here

    and see if you find your webcam. It contains a link generator for jpg/mjpg images.
  • I have a similar issue. The TP-Link Tapo C-200 cameras have some great features and the picture is also great, but rtsp only, there is even no http/web interface on them. 

    If I wanted to use the Tapo for timelapse videos, I would need to add the and url to a static image. Let us assume I would be able to get a JPG from RTSP on the same computer that is running the server. Can I point to a local file? Or do I need to have some sort of server running on localhost? I have the nginx installed and working, if that is of any help. Thanks.
  • You need always a web url. But with nginx you could add a host with some port that points to the directory where you save it and use that as url. But that means many writes and if we talk about a pi bad for sd card, so use a ramdisk as target in that case.

    Maybe you can do it with ffmpeg which can convert a lot. But can't say if it works and what cpu usage that would cause.
  • I am running the server on a HP T620 controlling 3 and in future 4 printers over USB. So this looks like a possible solution. I will definitely not do timelapse videos for every print, it is more likely to make one and then forget about it:)
  • I would like to add something here. I also own a rtsp only camera. There are multiple solutions that do not require the cpu intense transcoding steps with ffmpeg like WebRTC, HLS or Websocket-MSE. It would really be nice if you could support one of the suggested streams. The conversion from RTSP could be done elsewhere.

    octoprint recently included HLS as alternative to the standard mpeg stream.


    PS: Going back to octoprint is no option. Like repetier pro much more ;)
  • The main problem is that server reads the stream from webcam software and splits it into n streams for clients while working as a proxy. For timelapse it also needs a way to get jpg images. This must run in C/C++ inside server plus clients need to add support for different stream types. When we rework the webcam system I will check if I see a solution that might work. Requires a lot of research, so nothing I can answer here directly.
Sign In or Register to comment.