12 stdenv.mkDerivation rec {
13 pname = "obs-gstreamer";
16 src = fetchFromGitHub {
20 hash = "sha256-23LyxN1Vgol9uA7rDdfZXcmfhG4l0RfMYGbofbhObBE=";
24 substituteInPlace meson.build \
25 --replace-fail "'git', 'rev-parse', '--short', 'HEAD'" "'echo', '${version}'"
33 buildInputs = with gst_all_1; [
39 # - We need "getLib" instead of default derivation, otherwise it brings gstreamer-bin;
40 # - without gst-plugins-base it won't even show proper errors in logs;
41 # - Without gst-plugins-bad it won't find element "h264parse";
42 # - gst-plugins-ugly adds "x264" to "Encoder type";
43 # Tip: "could not link appsrc to videoconvert1" can mean a lot of things, enable GST_DEBUG=2 for help.
44 passthru.obsWrapperArguments =
47 package: "--prefix GST_PLUGIN_SYSTEM_PATH_1_0 : ${lib.getLib package}/lib/gstreamer-1.0";
50 builtins.map gstreamerHook [
57 # Fix output directory
59 mkdir $out/lib/obs-plugins
60 mv $out/lib/obs-gstreamer.so $out/lib/obs-plugins/
64 description = "OBS Studio source, encoder and video filter plugin to use GStreamer elements/pipelines in OBS Studio";
65 homepage = "https://github.com/fzwoch/obs-gstreamer";
66 maintainers = with maintainers; [
70 license = licenses.gpl2Plus;
71 platforms = platforms.linux;