Created
October 14, 2023 19:03
-
-
Save amoilanen/0b1dbd4a6b98751e36c2aa726e716ace to your computer and use it in GitHub Desktop.
.bashrc fragment with utility commands to compress videos
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
#!/bin/bash | |
compress_videos() { | |
for f in "$@"; do compress_video $f; done; | |
} | |
compress_video() { | |
fullname=$1 | |
extension="${fullname##*.}" | |
name_without_extension="${fullname%.*}" | |
ffmpeg -i $fullname -vcodec libx265 -crf 28 $name_without_extension.compressed.$extension | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment