about summary refs log tree commit diff
path: root/pkgs/applications/video/mpv/scripts
diff options
context:
space:
mode:
authorLin Xianyi <iynaix@gmail.com>2024-03-07 10:33:25 +0800
committerLin Xianyi <iynaix@gmail.com>2024-03-07 10:33:48 +0800
commit8e3ed28f8972295ab0524d90f370221c573ac9bb (patch)
tree952923735033ba0010f7562ebf59b8c16a1b9095 /pkgs/applications/video/mpv/scripts
parent68f0ee54dfa3b5e4427b610cb1e304e3202a7dc5 (diff)
mpvScripts.dynamic-crop: init at 0-unstable-2023-12-22
Diffstat (limited to 'pkgs/applications/video/mpv/scripts')
-rw-r--r--pkgs/applications/video/mpv/scripts/default.nix1
-rw-r--r--pkgs/applications/video/mpv/scripts/dynamic-crop.nix26
2 files changed, 27 insertions, 0 deletions
diff --git a/pkgs/applications/video/mpv/scripts/default.nix b/pkgs/applications/video/mpv/scripts/default.nix
index 68ccc3b139d15..de4384b593658 100644
--- a/pkgs/applications/video/mpv/scripts/default.nix
+++ b/pkgs/applications/video/mpv/scripts/default.nix
@@ -67,6 +67,7 @@ let
     chapterskip = callPackage ./chapterskip.nix { };
     convert = callPackage ./convert.nix { };
     cutter = callPackage ./cutter.nix { };
+    dynamic-crop = callPackage ./dynamic-crop.nix { };
     inhibit-gnome = callPackage ./inhibit-gnome.nix { };
     mpris = callPackage ./mpris.nix { };
     mpv-cheatsheet = callPackage ./mpv-cheatsheet.nix { };
diff --git a/pkgs/applications/video/mpv/scripts/dynamic-crop.nix b/pkgs/applications/video/mpv/scripts/dynamic-crop.nix
new file mode 100644
index 0000000000000..f2cd7dc070166
--- /dev/null
+++ b/pkgs/applications/video/mpv/scripts/dynamic-crop.nix
@@ -0,0 +1,26 @@
+{ lib
+, fetchFromGitHub
+, unstableGitUpdater
+, buildLua
+}:
+buildLua {
+  pname = "dynamic-crop";
+
+  version = "0-unstable-2023-12-22";
+  src = fetchFromGitHub {
+    owner = "Ashyni";
+    repo = "mpv-scripts";
+    rev = "c79a46ba03631eb2a9b4f598aab0b723f03fc531";
+    hash = "sha256-W4Dj2tyJHeHLqAndrzllKs4iwMe3Tu8rfzEGBHuke6s=";
+  };
+  passthru.scriptName = "dynamic-crop.lua";
+
+  passthru.updateScript = unstableGitUpdater { };
+
+  meta = {
+    description = ''Script to "cropping" dynamically, hard-coded black bars detected with lavfi-cropdetect filter for Ultra Wide Screen or any screen (Smartphone/Tablet).'';
+    homepage = "https://github.com/Ashyni/mpv-scripts";
+    license = lib.licenses.mit;
+    maintainers = [ lib.maintainers.iynaix ];
+  };
+}