Created
November 23, 2021 01:31
-
-
Save leandrocrs/749759d069098c8a3b280f04f1d9940c to your computer and use it in GitHub Desktop.
script to convert/encode a bunch of videos to mp4
This file contains hidden or 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/sh | |
ls * | parallel -j 4 -u -k ffmpeg-bar -y -i {} -threads 0 -c:v libx264 -crf 23 -c:a aac -map_metadata 0 "../output/{.}.mp4" | |
# for fullfile in ./*; do | |
# # do some stuff here with "$f" | |
# # remember to quote it or spaces may misbehave | |
# filename=$(basename -- "$fullfile") | |
# extension="${filename##*.}" | |
# filename="${filename%.*}" | |
# echo "ffmpeg -i '$fullfile' -hide_banner -loglevel error -framerate 30 -c:v libx264 -crf 23 -c:a aac -map_metadata 0 ./output/$filename.mp4 " | |
# ffmpeg-bar -i "$fullfile" -threads 0 -framerate 30 -c:v libx264 -crf 23 -c:a aac -map_metadata 0 -async 1 "./output/$filename.mp4" | |
# done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment