PX4-SITL_gazebo-classic icon indicating copy to clipboard operation
PX4-SITL_gazebo-classic copied to clipboard

Video streaming doesn't work on Mac OS with gazebo_gst_camera_plugin.cpp

Open murphym18 opened this issue 2 years ago • 2 comments

On MacOS (Arm) the simulated video stream doesn't work.

To re-create the problem:

  1. create a PX4 dev environment on Mac OS
  2. run make px4_sitl gazebo_typhoon_h480

The simulation will start but the video stream doesn't work.

After doing some digging. We found that gst_element_factory_make is returning null for all of these:

  • source
  • converter
  • encoder
  • payloader
  • sink

Here's a link to the code:

https://github.com/PX4/PX4-SITL_gazebo/blob/05348f9c22f31fe214732897411c279aa51e8dde/src/gazebo_gst_camera_plugin.cpp#L65-L94

murphym18 avatar Jan 05 '23 22:01 murphym18

@murphym18 Could you maybe check whether the gstreamer plugins like x264enc works on your system?

https://gstreamer.freedesktop.org/documentation/x264/index.html?gi-language=c

I think this is more of a matter of whether that specific gstreamer plugin is supported on the macOS version you are using

Jaeyoung-Lim avatar Jan 06 '23 03:01 Jaeyoung-Lim

@Jaeyoung-Lim I've replicated the same issue @murphym18 describes above. I've also built gstreamer pipelines on the same Arm Mac that successfully utilize the x264enc and videoconvert plugins.

Could there be an issue with referencing the gstreamer libraries during the build process kicked off by make?

JasonBrauer avatar Jan 06 '23 05:01 JasonBrauer