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

AP_Camera: add Python examples for GStreamer UDP and RTSP video streams #28183

Merged
merged 1 commit into from
Sep 26, 2024

Conversation

srmainwaring
Copy link
Contributor

Python examples demonstrating how to manipulate UDP and RTSP video streams using GStreamer.

The UDP to RTSP converter addresses the problem of consuming a simulated video stream from Gazebo in more than one application using standard installations of GStreamer and opencv (no need for a custom build and install of opencv).

Related:

@srmainwaring srmainwaring added the GSoC Google Summer of Code label Sep 21, 2024
@rmackay9
Copy link
Contributor

Another possible place to put this would be in the Tools/camera_gimbals directory where I've put some download scripts https://github.com/ArduPilot/ardupilot/tree/master/Tools/cameras_gimbals

@srmainwaring
Copy link
Contributor Author

@rmackay9 - the idea was to keep the scripts in AP_Camera/examples to complement the GSoC camera tracking examples in #27903.

The other thought was to move them into a MAVProxy module/example. I've started looking through the mavproxy_SIYI module, as it has many features that would be nice to have in a general camera / gimbal screen, but also is heavily customised to the SIYI and I'm not sure if the general purpose features can be factored out easily.

Regarding the opencv / gstreamer integration: I've found that a custom build of opencv-python is possible on macOS using brew if the formula for opencv is edited and the package is installed using a --build-from-source flag. I guess the questions is whether requiring a custom build of opencv on Ubuntu and macOS is something we want users to do? This is also the case for the mavproxy_SIYI module as the video streaming support in MPImage also requires opencv with GStreamer support, so perhaps it's already assumed?

@rmackay9
Copy link
Contributor

Hi @srmainwaring,

I've also looked at the MAVProxy Siyi module and I think we will need to create a separate, more general purpose camera gimbal control screen. Hopefully we can re-use some things that the Siyi module has added to (like the MPImage class).

@rmackay9 rmackay9 merged commit 00163ce into ArduPilot:master Sep 26, 2024
95 checks passed
@srmainwaring srmainwaring deleted the prs/pr-gst-examples branch October 3, 2024 09:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
GSoC Google Summer of Code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants