packages/ffgun: drop

hacksaw is nolonger maintained, we need to adapt the shell script
This commit is contained in:
Primrose 2025-10-11 10:11:58 +08:00
parent 54667cf52a
commit 58620818e6
Signed by: primrose
GPG key ID: 4E887A4CA9714ADA

View file

@ -1,40 +0,0 @@
# adapted from https://github.com/neXromancers/hacksaw
{
writeShellApplication,
shotgun,
ffmpeg_4-full,
}:
writeShellApplication {
name = "ffgun";
runtimeInputs = [
shotgun
ffmpeg_4-full
];
text = ''
dir=/tmp
current=$(date +%F_%H-%M-%S)
echo "$dir/$current.mp4"
hacksaw -n | {
IFS=+x read -r w h x y
w=$((w + w % 2))
h=$((h + h % 2))
ffmpeg \
-v 16 \
-r 30 \
-f x11grab \
-s "''${w}x''${h}" \
-i ":0.0+$x,$y" \
-preset slow \
-c:v h264 \
-pix_fmt yuv420p \
-crf 20 \
"$dir/$current.mp4"
}
'';
meta.description = "Shotgun's integration script with ffmpeg from their github";
}