Hi,
I am trying to use a gstreamer plugin called “v4l2src” to live stream webcam images as a snap
I have managed to build gstreamer in snapcraft and launch gst-launch. However, gst-launch is unable to link any of the plugins.
- I have tried copying everything to the
prime
directory and setting the environment variables using the environment in the apps
parts:
gstreamer:
plugin: autotools
source: https://gstreamer.freedesktop.org/src/gstreamer/gstreamer-1.5.2.tar.xz
configflags:
- --prefix=/usr
- --with-install-plugins-helper=/path/to/installer
prime:
- usr
build-attributes: [no-system-libraries]
gst-plugins-base:
after:
- gstreamer
plugin: autotools
source: https://gstreamer.freedesktop.org/src/gst-plugins-base/gst-plugins-base-1.5.2.tar.xz
configflags:
- --prefix=/usr
build-attributes: [no-system-libraries]
gst-plugins-good:
after:
- gstreamer
- gst-plugins-base
plugin: autotools
source: http://gstreamer.freedesktop.org/src/gst-plugins-good/gst-plugins-good-1.5.2.tar.xz
configflags:
- --prefix=/usr
prime:
- usr
build-attributes: [no-system-libraries]
apps:
gst-launch:
environment:
GST_PLUGIN_PATH: usr/lib/gstreamer-1.0
GST_PLUGIN_SYSTEM_PATH: usr/lib/gstreamer-1.0
GST_PLUGIN_SCANNER: usr/libexec/gstreamer-1.0/gst-plugin-scanner
# LD_LIBRARY_PATH: usr/lib
PATH: $SNAP/usr/local/bin:$PATH
command: usr/bin/gst-launch-1.0
However, the plugins are not seen by gst-launch.
$ gstreamer.gst-launch v4l2src device=/dev/video0 ! video/x-h264,width=1920,height=1080,framerate=24/1 ! h264parse ! rtph264pay ! udpsink host=xxx.xxx.xxx.xxx port=5000
ERROR: pipeline could not be constructed: no element "v4l2src".
I tried creating a app that echos the environment variables and have checked that the environment variables are indeed there.
I was wondering if I am misunderstanding the accessibility of the prime directory on runtime. Should the libraries be copied to the $SNAP_DATA rather than the prime directory?
How can I link the plugins to the gst-launch?
Thank you in advance