nixos-configs/devices/nos/modules/subtitles/convert.nix
matt1432 8d04980e50
All checks were successful
Discord / discord commits (push) Has been skipped
feat(subs): separate mgmt of subs in scripts
2024-05-18 17:51:06 -04:00

19 lines
277 B
Nix

{pkgs, ...}:
pkgs.writeShellApplication {
name = "convertMkv";
runtimeInputs = with pkgs; [
ffmpeg-full
];
text = ''
extension="$1"
file="$2"
new_file="''${file%."$extension"}.mkv"
ffmpeg -i "$file" -c copy "$new_file" &&
rm "$file"
'';
}