Switch between cameras

Hello, i wanted to know if there is an option to switch between camera feeds. Lets say i have a stream on port 5000 and on port 6000, is there any way to switch between them in flight?

is that an analog video or digital?
If analog, an additional circuit may solve this problem. There are video switch modules around works with PPM. Also 4066 IC works perfectly for this job.

They are 2 UDP video streams, coming from digital cameras.

One comes from a sony 7520 trough an onboard video server (on the gimbal), the second (navigation camera) is a raspicam attached to the raspberry companion.

They stream on UDP (trough an IPMESH) on ports 5000 and 6000.

Now i use the hud for the gimbal and an outside gstreamer window for the navigation, but since the navigation is not used very much it would be great if the video shown on the hud could jump between 2 or more ports.

I don’t know how difficult it could be but a button that reset the listening port and toggles between 2 or 3 different settings would really be a great addon to MP.

It would be great to have a button that switches the UDP shim between 2 or 3 different ports to be able to toggle and see, for example, normal image and thermal.
Also would be nice to have a pip to sho the streams from 2 different udp ports.

All in all, it would be great to have any kind of option to show 2 different streams, either pip or toggle between them.

I wonder if it would be possible.

yep your idea sounds good, i just need to find the best way to reroute the video streams on demand.

Just in case you need it, here is the gstreamer line i use to start PIP from 2 different cameras feeding UDP trough ports 5000 and 5500 using gstreamer’s videomixer function.

C:\gstreamer\1.0\x86_64\bin\gst-launch-1.0.exe videomixer name=mixer ! d3dvideosink sync=false udpsrc port=5000 ! application/x-rtp, payload=96 ! rtph264depay ! avdec_h264 ! mixer. udpsrc port=5500 ! application/x-rtp, payload=96 ! rtph264depay ! avdec_h264 ! timeoverlay text=“Stream time:” ! mixer.

This line starts 5000 camera in large window and PIP 5500 camera in a smaller box. Main camera is set at 1920x1080 and smaller at 640x480. On the small camera there is a time stream overlay enabled too. We use this setup to have a 30X optical zoom gimballed camera on main windows and a small non gimballized camera, we use for navigation, on the smaller window.

I wonder if there is a way to have MP use my line to start gstreamer without altering the code.

1 Like