.bash_aliases
· 470 B · Bash
原始文件
# Compress a video with CUDA acceleration (GPU from NVIDIA is required)
function reducevideo {
ffmpeg -hwaccel cuda -i "$1" -c:v libx265 -vtag hvc1 -c:a copy "$2"
}
alias reducevideo="reducevideo"
# Compress an image by reducing size and quality and remove all metadata. Inspired from Telegram.
function reduceimage {
convert -resize 2000x2000 -quality 70 "$1" "$1".r && exiftool -all= "$1".r && exiftool -delete_original "$1".r
}
alias reduceimage="reduceimage"
1 | # Compress a video with CUDA acceleration (GPU from NVIDIA is required) |
2 | function reducevideo { |
3 | ffmpeg -hwaccel cuda -i "$1" -c:v libx265 -vtag hvc1 -c:a copy "$2" |
4 | } |
5 | |
6 | alias reducevideo="reducevideo" |
7 | |
8 | |
9 | # Compress an image by reducing size and quality and remove all metadata. Inspired from Telegram. |
10 | function reduceimage { |
11 | convert -resize 2000x2000 -quality 70 "$1" "$1".r && exiftool -all= "$1".r && exiftool -delete_original "$1".r |
12 | } |
13 | |
14 | alias reduceimage="reduceimage" |