Skip to content

Instantly share code, notes, and snippets.

@cpmpercussion
Last active March 2, 2020 05:53
Show Gist options
  • Save cpmpercussion/8e542b1d962a4e3e78a119f7d5bd95d6 to your computer and use it in GitHub Desktop.
Save cpmpercussion/8e542b1d962a4e3e78a119f7d5bd95d6 to your computer and use it in GitHub Desktop.
#!/bin/bash
echo "$1"
videoname=${1%%.*}
#echo "$videoname"
ffmpeg -i $1 -c:v libx264 -b:v 2M -minrate 0.5M -preset fast -vf scale=1920:1080 -c:a aac -b:a 128K ${videoname}_1080.mp4
ffmpeg -i $1 -c:v libx264 -b:v 0.5M -minrate 0.5M -preset fast -vf scale=960:540 -c:a aac -b:a 128K ${videoname}_540.mp4
ffmpeg -i $1 -y -codec:a libmp3lame -ac 2 -ar 44100 -ab 64k -id3v2_version 3 -metadata title="$videoname" -metadata album_artist="Charles Martin" -metadata album="COMP2300 2020" -metadata genre="Vocal" -metadata date="2020" ${videoname}_audio.mp3
echo "done, phew."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment