| 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. Inspiration 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" |
airikr / Useful bash scripts
Last active 4 months ago
These are my number one bash scripts. I can't live without them.
Revision cc2b4d635ef97f8203f705e5b3e2345c9604956b