Get video in Videolan

Hello,

I am trying to get the video stream showing in QGroundControl and a 3rd party software like videolan at the same time.

I have found how to stream to a different address on this forum so I now have my gstreamer options set like this:
! multiudpsink clients=192.168.2.1:5600,192.168.2.1:5601

I am trying to view the stream in Videoland and am putting this address:
udp://192.168.2.1:5601

It doesn’t work.

Am I missing something?

Try to change the port from 5601 to 2000:

! multiudpsink clients=192.168.2.1:5600,192.168.2.1:2000

After this, open this file with VLC or the program that you are using.

Hello Patrick,

Thank you for this. It works for VLC but the latency is horrible. Almost 2 seconds VS QGC on the same screen.

Also I have no way to pass this script on our in-house application.

I need to pass a URL EX:
udp://192.168.2.1:2000/Video01

Could we do this using RTSP?

For instance, if I want to connect to my IP camera I write:
rtsp://admin:admin@192.168.2.88/av0_0

(It doesn’t work in QGC though.)

Check the VLC buffer to solve this problem:

  • Tools → Preferences → Show Settings → All → Input Codecs → Advanced → Network Caching (ms)
    • Change the value to 200.

Save the settings and restart the program.

Can you say what are you using in your in-house code, like libvlc, opencv, qmultimedia, … ?
You can modify the gstreamer settings in /camera to use RTSP.

QGC have some hardcoded elements, check here if you need to modify or understand what QGC expects to receive.

We have a new version of companion, that is in Work in Progress, where you can use something like http://192.168.2.2:2770/vlc.sdp to access the stream.

A VLC example:

Can this help you?

Can you say what are you using in your in-house code, like libvlc, opencv, qmultimedia, … ?

I use tvideograbber with its UDP/RTSP/RTMP/HTTP/ONVIF DirectShow Source Filter

Unsure if GStreamer can be compatible with DirectShow…

You can modify the gstreamer settings in /camera to use RTSP.

Would you mind giving me the settings c/w what address I should put in QGC?

I tried replacing the udpsink line with with: tcpserversink host=192.168.2.1 port=5600

and updated the QGC to rtsp://192.168.2.1:5600

We have a new version of companion, that is in Work in Progress, where you can use something like http://192.168.2.2:2770/vlc.sdp to access the stream.

Not sure if TVideograbber will like it since the sdp is a script and not the address of the live stream.

It appears that you will need something more than gstreamer to create the rtsp server.
Take a look in this implementation.

I tested the fix on videolan and the stream latency is as good as the BR2 camera. This was unexpected. I am very happy with the results as I can now use my IP camera for flying the ROV.

Hello Patrick,

I am getting this to work on my application now but could you confirm that the frame rate of the stream is 25FPS?

Thank you

Never mind.

I found the answer to my own question when I thought about looking here: http://192.168.2.2:2770/camera

Hi Etienne,
What kind of ip camera are you using and how did you connect it?
BR
Jan Robert

I connect it with my own software.

Have a look at my builds for more details.

Hello Patrick,
I was trying to do the same. I followed the instructions and changed the config from:

! h264parse
! rtph264pay config-interval=10 pt=96
! udpsink host=192.168.2.1 port=5600

to:

! h264parse
! rtph264pay config-interval=10 pt=96
! multiudpsink clients=192.168.2.1:5600,192.168.2.1:2000

After I open de vlc.sdp file you gave. However I can only see the video stream through VLC when QGC is not open. If QGC is open then the video stream opens for a second while in QGC it stops for a second. After the VLC stream stops and QGC continues normally.
It is as if VLC had tried to take the “stream power” from QGC for a second before this last one regained it.

Any solutions? The objective is to have multidisplay video.
Thank you.
Alexis

You need to set up a multicast video pipeline. We do not have support for this right now, but it is possible to add.
You can instead use different client ips/ports for each stream, like @patrickelectric points out below.

Hi Alexis,

The .sdp file now uses 5600 as default, you can change it to 2000 to run in parallel with QGC.

That is what I thought. I tried that but it does not work. The file only streams video when 5600 is written and QGC is closed.
My file looks like this:

c=IN IP4 127.0.0.1
m=video 2000 RTP/AVP 96
a=rtpmap:96 H264/90000

I also tried to change the parameter RTP/AVP to UDP (since the config seems to be multiUDPsink) following this webpage: SDP file - SpinetiX Support Wiki. Now it does not work with either of the ports.
I am running VLC on Linux.

Every-time I loaded the configuration to 192.168.2.2:2770/camera I saved it and rebooted the camera and the ROV, just in case.

Hi Alexis,

Just to check, this is my configuration in /camera.

! h264parse
! queue
! rtph264pay config-interval=10 pt=96
! multiudpsink clients=192.168.2.1:5600,192.168.2.1:2000

And this is my sdp file using port 2000.

c=IN IP4 127.0.0.1
m=video 2000 RTP/AVP 96
a=rtpmap:96 H264/90000

And as result, I can use QGC and VLC at the same time (video).

VLC (with port 2000) is not working when you open QGC (with port 5600) ?

Sorry for the late reply.
It is the same text/code I have in my configuration and .sdp file, but just in case I copied and pasted it again.
Here is the result: twoVideos - YouTube
No video on the .sdp file with port 2000. I guess the problem is somewhere else but I cannot figure it out.

Hi Alexis,

Thank you for the video, maybe your operating system has a process that is blocking/using this port, can you try with another number, E.g 5228 or any other port that you can test ?
This same issue happens when you’re using udpsink and port 2000 ?

OK
I guess there is some problem with my configuration not being taken into account. I have written udpsink 2000 and It still only works with the port 5600.
After writing my configuration I click on save options, restart camera and reboot. It is saved because if I shut-down the companion computer and then reconnect it the configuration is still there, I can retrieve it from 192.168.2.2:2770/camera. However it seems that it is not being interpreted.

Should I reinstall the image?

Hi Alexis,

Can you update if you are not already in the last version ?
If you already are in the last version or have done any modification in the companion computer, please, try to reinstall the image.