Using Basler cameras with CVEDIA-RT¶
This guide shows how to setup basler cameras using their native pylon plugin within a GStreamer pipeline
Requirements¶
- GStreamer 1.16.3
- CVEDIA-RT 2023.2 or newer
- Ninja
Step 1: Install Pylon SDK¶
Download and install Pylon SDK
You can use the deb
packages Basler provides.
In this tutorial we assume you will be installing at the default /opt/pylon
path.
Step 2: Build GST-Plugin-Pylon¶
- Check out and build gst-plugin-pylon
- Install it in a isolated folder to avoid conflicting with other plugins
Building example:
export PYLON_ROOT=/opt/pylon
meson setup builddir --prefix /opt/gst-pylon -Dpython-bindings=enabled
ninja -C builddir && ninja -C builddir install
Step 3: Run CVEDIA-RT with pylon dependencies and gst-plugin-pylon¶
Using docker¶
./run.sh -g /opt/gst-pylon/lib/aarch64-linux-gnu/ -l /opt/pylon/lib/
Where:
- -l
allows you to specify arbitrary paths to additional userspace libraries
- -g
allows you to specify arbitrary paths to additional gstreamer plugins
You can confirm that GST can load the plugin by running the docker in interactive mode:
./run.sh -g /opt/gst-pylon/lib/aarch64-linux-gnu/ -l /opt/pylon/lib/ -I
then:
LD_LIBRARY_PATH=$CUSTOM_LIB_PATH gst-inspect-1.0 pylon
Native install¶
- Add
/opt/gst-pylon/lib/aarch64-linux-gnu
toGST_PLUGIN_PATH
env variable - Add
/opt/pylon/lib
toLD_LIBRARY_PATH
You can confirm GST can load the plugin by running:
gst-inspect-1.0 pylon
Using it¶
Now that you've installed the pylon plugin you can use it as source in a gstreamer pipeline within CVEDIA-RT, eg:
gstreamer:///pylonsrc ! videoconvert ! video/x-raw,format=BGR ! appsink drop=true name=cvdsink