Created
July 24, 2023 19:58
-
-
Save christian-blades-cb/0355cc6f3de279ef115ff735bbbb961e to your computer and use it in GitHub Desktop.
HEVC with ffmpeg and GPU
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env nix-shell | |
#!nix-shell -i bash -p ffmpeg | |
for v in "$@"; do | |
ffmpeg -i "$v" -map 0:v -map 0:a -c:v hevc_nvenc -preset slow -crf 25 -tag:v hvc1 -q:a 100 "${v%.*}--x265.mp4" | |
exitcode=$? | |
if [ -z "$NO_DELETE" ] && [ $exitcode -eq 0 ]; then | |
rm "$v" | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment