mirror of
https://github.com/JanJastrow/.dotfiles.git
synced 2024-11-21 10:09:56 +01:00
Add 560p AV1
This commit is contained in:
parent
97ed016a6b
commit
f7b2ac8036
17
zsh/ffmpeg
17
zsh/ffmpeg
@ -95,6 +95,23 @@ ff-av1-scale720p() {
|
||||
done
|
||||
}
|
||||
|
||||
# Recompress input MP4 to 560p AV1 MP4 (copy audio)
|
||||
ff-av1-scale560p() {
|
||||
for input in *.mp4; do
|
||||
if [[ -f "$input" ]]; then
|
||||
tempfile="temp_${input%.mp4}"
|
||||
ffmpeg -hide_banner -loglevel info -i "$input" -vf format=yuv420p10le,scale=960:-2 -c:v libsvtav1 -preset 6 -crf 23 -g 30 -svtav1-params tune=0 -c:a copy -c:s copy "$tempfile.mp4"
|
||||
if [[ $? -eq 0 ]]; then
|
||||
mv "$input" "_$input"
|
||||
mv "$tempfile.mp4" "$input"
|
||||
echo "Conversion successful: $input"
|
||||
else
|
||||
echo "Conversion failed for: $input"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
#
|
||||
# Video helper
|
||||
#
|
||||
|
Loading…
Reference in New Issue
Block a user