12 stdenv.mkDerivation rec {
16 src = fetchFromGitHub {
20 hash = "sha256-ykiLsHL3hoe0ibxMxp4zrqeSeQfgnJfNg7Yb5i9HDJQ=";
23 nativeBuildInputs = [ pkg-config meson ninja ];
24 buildInputs = with gst_all_1; [ gstreamer gst-plugins-base obs-studio pciutils ];
26 # - We need "getLib" instead of default derivation, otherwise it brings gstreamer-bin;
27 # - without gst-plugins-base it won't even show proper errors in logs;
28 # - Without gst-plugins-bad it won't find element "vapostproc";
29 # - gst-vaapi adds "VA-API" to "Encoder type";
30 # Tip: "could not link appsrc to videoconvert1" can mean a lot of things, enable GST_DEBUG=2 for help.
31 passthru.obsWrapperArguments =
33 gstreamerHook = package: "--prefix GST_PLUGIN_SYSTEM_PATH_1_0 : ${lib.getLib package}/lib/gstreamer-1.0";
35 with gst_all_1; builtins.map gstreamerHook [
42 # Fix output directory
44 mkdir $out/lib/obs-plugins
45 mv $out/lib/obs-vaapi.so $out/lib/obs-plugins/
49 description = "OBS Studio VAAPI support via GStreamer";
50 homepage = "https://github.com/fzwoch/obs-vaapi";
51 changelog = "https://github.com/fzwoch/obs-vaapi/releases/tag/${version}";
52 maintainers = with maintainers; [ ahuzik pedrohlc ];
53 license = licenses.gpl2Plus;
54 platforms = [ "x86_64-linux" "i686-linux" ];