This commit is contained in:
JMARyA 2023-10-05 19:40:05 +02:00
parent 828bb9cf84
commit 4488e05a86
Signed by: jmarya
GPG key ID: 901B2ADDF27C2263
12 changed files with 57 additions and 18 deletions

View file

@ -1,7 +1,18 @@
# convert <OLD_EXT> <NEW_EXT>
# convert all files with old_ext to new_ext using ffmpeg
function convert() {
for i in *.$1; do ffmpeg -i "$i" "${i%.*}.$2"; done
}
# remux all mkvs in current dir to mp4
function mkvToMp4() {
for i in *.mkv; do ffmpeg -i "$i" -map 0 -c copy "${i%.*}.mp4"; done
}
# gif2avif <GIF>
# convert gif to avif image
function gif2avif() {
ffmpeg -i "$1" -pix_fmt yuv444p10 -strict -1 "${1%.*}.y4m";
avifenc "${1%.*}.y4m" "${1%.*}.avif";
rm -v "${1%.*}.y4m";
}