04/18/2020 at 16:56 •
The commands I posted in the description of the project work perfectly fine; however, when attempting to stream the video from the camera for a real-time application (e.g. controlling a small vehicle via FPV) I found that piping the output of rapivid into gstreamer added a bit of latency. A much better option is to use the rpicamsrc. This can be obtained from the git page of the project: https://github.com/thaytan/gst-rpicamsrc
A winning formula that does UDP streaming is the following:
On the Raspberry Pi side:
gst-launch-1.0 rpicamsrc preview=false ! 'video/x-h264, width=800, height=600, framerate=30/1' ! h264parse ! rtph264pay config-interval=1 pt=96 ! gdppay ! udpsink host=YOUR_PC_IP port=5000
On the PC side
gst-launch-1.0 udpsrc port=5000 ! gdpdepay ! rtph264depay ! h264parse ! avdec_h264 ! autovideosink sync=false
Start the script on the PC side before running the command on the Raspberry Pi.
I still have to figure out a robust way to handle issues with the connection and restart the video once the link betwen the two works.