Hi, I’m trying to use gst-launch
with the ximagesrc
plugin on NixOS 19.09 + xfce4.
I wrote this shell.nix
:
with import <nixpkgs> {};
mkShell {
inputs = [
gst_all_1.gstreamer.dev
gst-plugins-good
];
shellHooks = ''
export LANG="en_US";
export GST_PLUGIN_SYSTEM_PATH="${gst-plugins-good}/lib/gstreamer-0.10/"
export PATH="$PATH:${gst_all_1.gstreamer.dev}/bin"
'';
}
but the plugin is blacklisted by gst:
$ nix-shell
[nix-shell]$ gst-inspect-1.0 ximagesrc
No such element or plugin 'ximagesrc'
[nix-shell]$ gst-inspect-1.0 -b | grep ximagesrc
libgstximagesrc.so
Any idea ?
Problem solved: I was using gstreamer-1.0 tools with gstreamer-0.10 plugins…
with import <nixpkgs> {};
mkShell {
shellHooks = ''
export LANG="en_US";
export GST_PLUGIN_SYSTEM_PATH="${gst_all_1.gst-plugins-base}/lib/gstreamer-1.0/:${gst_all_1.gst-plugins-good}/lib/gstreamer-1.0/"
export PATH="$PATH:${gst_all_1.gstreamer.dev}/bin"
'';
}
[nix-shell]$ gst-inspect-1.0 ximagesrc
Factory Details:
Rank none (0)
Long-name Ximage video source
Klass Source/Video
...
I struggled to make even the base plugins work on NixOS, but thanks to your post i tried using it in a dev shell and it worked. Thanks. I created a NixOS Wiki page with the result: GStreamer - NixOS Wiki.
1 Like
GST_PLUGIN_SYSTEM_PATH=
has been renamed to GST_PLUGIN_SYSTEM_PATH_1_0=
.
I think it should be in the wiki. Do you know why the GST_PLUGIN_SYSTEM_PATH_1_0
isn’t set automatically? I faced this issue while trying to install a shell script with writeShellApplication
. even though the dependencies are listed in runtimeInputs
, it only set the /bin
dirs in PATH
and I had to set /lib
in GST_PLUGIN_SYSTEM_PATH_1_0
manually.
note: I think gst_all_1.gstreamer has three outputs. .bin
.out
.dev
and the /lib
is in the .out
export GST_PLUGIN_SYSTEM_PATH_1_0="${pkgs.gst_all_1.gstreamer.out}/lib/gstreamer-1.0:${pkgs.gst_all_1.gst-plugins-base}/lib/gstreamer-1.0:${pkgs.gst_all_1.gst-plugins-good}/lib/gstreamer-1.0"
Good point. Feel free to to mention this in the new wiki: GStreamer - NixOS Wiki
1 Like