nixos-configs/configurations/nos/modules/subtitles/convert.nix
matt1432 d624d33b01
All checks were successful
Discord / discord commits (push) Has been skipped
feat(nos): reenable subtitle management
2025-01-28 00:08:00 -05:00

20 lines
292 B
Nix

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