Skip to content

Instantly share code, notes, and snippets.

@shiedman
Last active March 2, 2021 06:16
Show Gist options
  • Save shiedman/5056146 to your computer and use it in GitHub Desktop.
Save shiedman/5056146 to your computer and use it in GitHub Desktop.
ffmpeg convert script
ffmpeg -y -i v1.wmv -r 30000/1001 -aspect 16:9 -b:v 1150k -bt 2300k -vcodec libx264 -pass 2 -threads 2 -ss 00:02:18 -t 30 -acodec libfaac -ac 2 -ar 44100 -ab 128k -profile:v main -tune fastdecode v.mp4
-vcodec libx264 -crf 20 -threads 2 -r 24000/1001 -acodec libmp3lame -ac 2 -ar 44100 -ab 128k -y -s 800:450 -aspect 16:9 kyou01.avi
-vcodec libx264 -crf 20 -threads 2 -r 24000/1001 -y -aspect 16:9 -s 800:450 -profile:v high -tune psnr -acodec libfaac -ac 2 -ar 48000 -ab 128k
-vcodec libx264 -crf 20 -threads 2 -r 24000/1001 -y -aspect 16:9 -s 960:540 -profile:v high -tune fastdecode -acodec libfaac -ac 2 -ar 48000 -ab 128k
-c:v libx264 -crf 21 -profile:v main -threads 2 -r 24000/1001 -c:a libmp3lame -ac 2 -ar 44100 -ab 128k -y -s 720:540 -aspect 4:3
-c:v libx264 -crf 21 -profile:v main -threads 2 -r 24000/1001 -c:a libmp3lame -ac 2 -ar 44100 -ab 128k -y -s 800:450 -aspect 16:9
-c:v libx264 -crf 21 -tune fastdecode -threads 2 -r 24000/1001 -c:a libmp3lame -ac 2 -ar 44100 -ab 128k -y -s 960:540 -aspect 16:9
-map 0:0 -map 0:1 -c:v libx264 -crf 21 -profile:v main -threads 2 -r 24000/1001 -c:a libmp3lame -ac 2 -ar 44100 -ab 128k -y -s 720:540 -aspect 4:3
ffmepg -i input.mp4 -q:a 2 out.mp3
Convert flac to mp3 using ffmpeg, retain ID3 tags
for FILE in *.flac;
do
ffmpeg -i "$FILE" -ab 320k -map_meta_data 0:0 "${FILE%.*}.mp3";
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment