Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to create a mavlink camera from an RTSP IP camera stream? #269

Open
joaoantoniocardoso opened this issue Aug 17, 2023 · 3 comments
Open

Comments

@joaoantoniocardoso
Copy link
Collaborator

Hello,
I don't know if this is the right place to ask my question but it's not an actual issue so I'll ask it here.
How do I create a redirect stream from a rtsp IP camera stream?
I created a gstreamer pipline to receive it and it's working fine, but how do I create a >MAVLINK stream from it? the device in the UI for redirect source is a fixed text, where do >I specify my rtsp link an create a redirect out of it?

Originally posted by @aihamshikhomicro in #213 (comment)

@joaoantoniocardoso
Copy link
Collaborator Author

Hi @aihamshikhomicro, thanks for reaching out, we indeed lack documentation, but it is doable:

How to create a Mavlink camera from an RTSP IP camera stream?

Let's say we want to receive an RTSP stream from an IP camera on QGC.

For this example, we are going to consider that the QGC is running on a computer at the user's computer (localhost), where its local network IP is 192.168.0.10, and both Mavlink server and MCM are running on a second computer, the 192.68.0.87, and the camera is also on the same local network, at 192.168.0.201.

For that, we'd need:

  1. A Mavlink UDP server to connect to QGC (QGroundControl), say, 192.168.0.10:14550
  2. A Mavlink TCP server to connect to MCM (Mavlink Camera Manager), 127.0.0.1:5777
  3. The RTSP address from your IP camera, rtsp://192.168.0.201:554/video/0
  4. A reliable network connection between all these parts.

Now, the setup should be quite straightforward:

  1. Run mavlink-camera-manager passing the Mavlink TCP server endpoint:
mavlink-camera-manager --mavlink tcpout:127.0.0.1:5777 --verbose
  1. From the MCM developer interface (192.168.0.87:6020), create a Redirect stream using the RTSP address from the camera, let's say, rtsp://192.168.0.201:554/video/0. Make sure to leave Disable Mavlink unchecked:

image

  1. Finally, open QGC, it should be able to receive the IP stream.

If anything different happens, check on the console, and upload the logs here on this issue.

In case your network or setup is different, let us know how it is so I can adapt the guide if you need it,

Hope it helps, thanks

@hamishwillee
Copy link

FWIW sounds like a good topic to add to a docs library.

@patrickelectric
Copy link
Member

I would suggest to just upgrade the interface to be more user friendly 😆

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants