Streaming Camera to Mission Planner from Raspberry PI using libcamera and GStreamer upon Raspberry PI Bootup

Hi, as the topic suggests, I would like to stream the camera from Raspberry PI to Mission Planner using libcamera and GStreamer upon bootup of Raspberry PI. When I manually input this command in the terminal:

libcamera-vid -t 0 -n --inline -o - | gst-launch-1.0 fdsrc fd=0 ! h264parse ! rtph264pay config-interval=10 pt=96 ! udpsink host=COMPUTER_IP_ADDRESS port=PORT_NUMBER

It works and the HUD of the Mission Planner is able to display the camera. However, I would like to do this automatically when the PI is boot up. For the startup script, I am adding the command to the /etc/xdg/lxsession/LXDE-pi/autostart as such.

However, upon bootup, this happens.

It just keeps printing gibberish on the terminal without being able to stream to the Mission Planner. I appreciate any help I can get. Thanks.

See some info here:

1 Like

The real question is…why are you using an X session and desktop environment on a companion computer?

Suggest making a shell script containing your stream command and then invoking it with a systemd service.

Hi, thanks for the response. I am new in this area so I just looked up online somewhere and followed the guide. Plus, I consulted ChatGPT too. Anyway, I will try what you have suggested. Thank you!

what link to put in mission planner ???