Created
October 1, 2021 06:16
-
-
Save Shubhayu-Das/c22ec3bd5ac2683cbb06e133555af906 to your computer and use it in GitHub Desktop.
Script to run HEVC compression using FFmpeg
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 bash | |
name="$1" | |
# If there are subtitles, keep the part related to "s" | |
ffmpeg -i "$name" -c:v copy -map 0:v:0 -vcodec libx265 -crf 28 -map 0:a:0 -c:a copy -map 0:s:1 -c:s ass "temp.mkv" | |
echo "Initial size:" | |
du -h "$name" | |
echo "Compressed size:" | |
du -h temp.mkv | |
# rm "$name" | |
mv temp.mkv "$name" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment