From a1230b70ae065b4d7df2bc5793a22f4d56c9284d Mon Sep 17 00:00:00 2001 From: mitchmindtree Date: Thu, 4 Mar 2021 16:35:02 +0100 Subject: [PATCH 1/5] maintainers: add mitchmindtree In preparation for the following commits adding ardour-related video tooling and new `videoSupport` option. --- maintainers/maintainer-list.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index bf1dd6b62388..b5bf4aaa7c59 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -6255,6 +6255,12 @@ githubId = 1776903; name = "Andrew Abbott"; }; + mitchmindtree = { + email = "mail@mitchellnordine.com"; + github = "mitchmindtree"; + githubId = 4587373; + name = "Mitchell Nordine"; + }; mjanczyk = { email = "m@dragonvr.pl"; github = "mjanczyk"; From 450a1571e4956ec5eab52010508be7259296823c Mon Sep 17 00:00:00 2001 From: mitchmindtree Date: Thu, 4 Mar 2021 16:45:19 +0100 Subject: [PATCH 2/5] harvid: init at 0.8.3 harvid decodes still images from movie files and serves them via HTTP. Please refer to the meta attribute for more information. This commit is part of a PR aimed at enabling video support in ardour. --- pkgs/tools/video/harvid/default.nix | 42 +++++++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 44 insertions(+) create mode 100644 pkgs/tools/video/harvid/default.nix diff --git a/pkgs/tools/video/harvid/default.nix b/pkgs/tools/video/harvid/default.nix new file mode 100644 index 000000000000..812457f35cbd --- /dev/null +++ b/pkgs/tools/video/harvid/default.nix @@ -0,0 +1,42 @@ +{ lib, stdenv, fetchFromGitHub, ffmpeg, libjpeg, libpng, pkg-config }: + +stdenv.mkDerivation rec { + pname = "harvid"; + version = "0.8.3"; + + src = fetchFromGitHub { + owner = "x42"; + repo = "harvid"; + rev = "v${version}"; + sha256 = "0l1plfsfh2ixhlzg3hqqvjj42z7g422718a9kgbh7b4p882n71x7"; + }; + + nativeBuildInputs = [ pkg-config ]; + + buildInputs = [ ffmpeg libjpeg libpng ]; + + makeFlags = [ "DESTDIR=$(out)" "libdir=\"/lib\"" ]; + + postInstall = '' + mkdir -p $out/bin + mv $out/usr/local/bin/* $out/bin + mv $out/usr/local/share $out/ + rm -r $out/usr + ''; + + meta = with lib; { + description = + "Decodes still images from movie files and serves them via HTTP"; + longDescription = '' + harvid's intended use-case is to efficiently provide frame-accurate data + and act as second level cache for rendering the video-timeline in Ardour, + but it is not limited to that: it has applications for any task that + requires a high-performance frame-accurate online image extraction + processor. + ''; + homepage = "http://x42.github.io/harvid"; + license = licenses.gpl2Plus; + platforms = platforms.linux; + maintainers = with maintainers; [ mitchmindtree ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index bf3b59d3f9e6..bc858e260f0d 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1366,6 +1366,8 @@ in hakrawler = callPackage ../tools/security/hakrawler { }; + harvid = callPackage ../tools/video/harvid { }; + hime = callPackage ../tools/inputmethods/hime {}; hinit = haskell.lib.justStaticExecutables haskellPackages.hinit; From a346a9faa4877ef5de8d040a2b18a27ea113cec4 Mon Sep 17 00:00:00 2001 From: mitchmindtree Date: Thu, 4 Mar 2021 17:10:42 +0100 Subject: [PATCH 3/5] xjadeo: init at 0.8.10 xjadeo is the X Jack Video Monitor. Please refer to the meta attribute for more information on xjadeo. This commit is part of a PR aimed at enabling video support in ardour. --- pkgs/tools/video/xjadeo/default.nix | 48 +++++++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 50 insertions(+) create mode 100644 pkgs/tools/video/xjadeo/default.nix diff --git a/pkgs/tools/video/xjadeo/default.nix b/pkgs/tools/video/xjadeo/default.nix new file mode 100644 index 000000000000..bcd6d5601c0f --- /dev/null +++ b/pkgs/tools/video/xjadeo/default.nix @@ -0,0 +1,48 @@ +{ lib, stdenv, autoreconfHook, fetchFromGitHub, ffmpeg, freetype, libGLU +, libjack2, liblo, libX11, libXv, pkg-config, portmidi, xorg }: + +stdenv.mkDerivation rec { + pname = "xjadeo"; + version = "0.8.10"; + + src = fetchFromGitHub { + owner = "x42"; + repo = "xjadeo"; + rev = "v${version}"; + sha256 = "0dma4cjgbrpy16x63zvfr0xss4lryl0zw7nvixvhq2f6z8day1ds"; + }; + + nativeBuildInputs = [ autoreconfHook pkg-config ]; + + buildInputs = [ + ffmpeg + libjack2 + libX11 + xorg.libXext + xorg.libXpm + # The following are recommended in the README, but are seemingly + # unnecessary for a successful build. That said, the result of including + # these in the build process is possibly required at runtime in some cases, + # but I've not the time to test thoroughly for these cases. Should + # consider investigating and splitting these into options in the future. + freetype + libGLU + liblo + libXv + portmidi + ]; + + meta = with lib; { + description = "The X Jack Video Monitor"; + longDescription = '' + Xjadeo is a software video player that displays a video-clip in sync with + an external time source (MTC, LTC, JACK-transport). Xjadeo is useful in + soundtrack composition, video monitoring or any task that requires to + synchronizing movie frames with external events. + ''; + homepage = "http://xjadeo.sourceforge.net"; + license = licenses.gpl2Plus; + platforms = platforms.linux; + maintainers = with maintainers; [ mitchmindtree ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index bc858e260f0d..f275980961fb 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1412,6 +1412,8 @@ in passExtensions = recurseIntoAttrs pass.extensions; + xjadeo = callPackage ../tools/video/xjadeo { }; + asc-key-to-qr-code-gif = callPackage ../tools/security/asc-key-to-qr-code-gif { }; go-audit = callPackage ../tools/system/go-audit { }; From e14c97185ffa065593cc83ba6ede6f49642cce71 Mon Sep 17 00:00:00 2001 From: mitchmindtree Date: Thu, 4 Mar 2021 19:02:02 +0100 Subject: [PATCH 4/5] ardour: add a `videoSupport` option This adds a `bool` option that, when set to `true`, enables video timeline support for the Ardour DAW. This is commonly useful for soundtrack composition, sound design for film, etc. When enabled, `videoSupport` ensures that both `harvid` and `xjadeo` are available to the `ardour6` exe via the PATH. `harvid` decodes the video stream in real-time to produce still images (I think for thumbnail support for the timeline?). `xjadeo` acts as a video monitoring window that whose playback position is synchronised to the Ardour playhead. `videoSupport` remains disabled by default, preserving the original behaviour. Video support can be added to ardour in your system or home configuration package list with: ``` (ardour.override { videoSupport = true; }) ``` --- pkgs/applications/audio/ardour/default.nix | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/audio/ardour/default.nix b/pkgs/applications/audio/ardour/default.nix index 26e25c687e77..570074be0b15 100644 --- a/pkgs/applications/audio/ardour/default.nix +++ b/pkgs/applications/audio/ardour/default.nix @@ -16,6 +16,7 @@ , glibmm , graphviz , gtkmm2 +, harvid , itstool , libarchive , libjack2 @@ -35,6 +36,7 @@ , lilv , lrdf , lv2 +, makeWrapper , pango , perl , pkg-config @@ -49,6 +51,8 @@ , taglib , vamp-plugin-sdk , wafHook +, xjadeo +, videoSupport ? false }: stdenv.mkDerivation rec { pname = "ardour"; @@ -70,6 +74,7 @@ stdenv.mkDerivation rec { doxygen graphviz # for dot itstool + makeWrapper perl pkg-config python3 @@ -121,7 +126,7 @@ stdenv.mkDerivation rec { suil taglib vamp-plugin-sdk - ]; + ] ++ lib.optionals videoSupport [ harvid xjadeo ]; wafConfigureFlags = [ "--cxx11" @@ -158,6 +163,10 @@ stdenv.mkDerivation rec { "$out/share/icons/hicolor/''${size}x''${size}/apps/ardour6.png" done install -vDm 644 "ardour.1"* -t "$out/share/man/man1" + '' + lib.optionalString videoSupport '' + # `harvid` and `xjadeo` must be accessible in `PATH` for video to work. + wrapProgram "$out/bin/ardour6" \ + --prefix PATH : "${lib.makeBinPath [ harvid xjadeo ]}" ''; LINKFLAGS = "-lpthread"; @@ -176,6 +185,6 @@ stdenv.mkDerivation rec { homepage = "https://ardour.org/"; license = licenses.gpl2; platforms = platforms.linux; - maintainers = with maintainers; [ goibhniu magnetophon ]; + maintainers = with maintainers; [ goibhniu magnetophon mitchmindtree ]; }; } From 070334a512ec1da9d1c260721894c4f779b0400a Mon Sep 17 00:00:00 2001 From: mitchmindtree Date: Thu, 11 Mar 2021 13:11:21 +0100 Subject: [PATCH 5/5] ardour: clarify gpl2 license with gpl2Plus --- pkgs/applications/audio/ardour/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/applications/audio/ardour/default.nix b/pkgs/applications/audio/ardour/default.nix index 570074be0b15..b66432640710 100644 --- a/pkgs/applications/audio/ardour/default.nix +++ b/pkgs/applications/audio/ardour/default.nix @@ -183,7 +183,7 @@ stdenv.mkDerivation rec { https://community.ardour.org/donate ''; homepage = "https://ardour.org/"; - license = licenses.gpl2; + license = licenses.gpl2Plus; platforms = platforms.linux; maintainers = with maintainers; [ goibhniu magnetophon mitchmindtree ]; };