feat(destkop): add script for video optimisation.
This commit is contained in:
parent
5e2fd57a6e
commit
46a3c3a4bc
2 changed files with 10 additions and 0 deletions
6
modules/cross-platform/home-manager/scripts/bin/optimise-vid
Executable file
6
modules/cross-platform/home-manager/scripts/bin/optimise-vid
Executable file
|
@ -0,0 +1,6 @@
|
|||
#!/usr/bin/env sh
|
||||
|
||||
File="$1"
|
||||
FileOptimized="${File%.*}-optimized.mp4"
|
||||
|
||||
ffmpeg -y -hwaccel cuda -hwaccel_output_format cuda -c:v h264_cuvid -i "$File" -c:v h264_nvenc -preset:v p7 -tune:v hq -rc:v vbr -cq:v 29 -b:v 0 -profile:v high "$FileOptimized"
|
|
@ -23,5 +23,9 @@ with pkgs;
|
|||
# Add dependencies to the runtime for my iso2chd script
|
||||
wrapProgram $out/bin/iso2chd \
|
||||
--prefix PATH : ${lib.makeBinPath [mame-tools]}
|
||||
|
||||
# Add dependencies for optimise-vid script
|
||||
wrapProgram $out/bin/optimise-vid \
|
||||
--prefix PATH : ${lib.makeBinPath [ffmpeg cudatoolkit]}
|
||||
'';
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue