Skip to main content
Spacebruce dot netlify dot app

Format video for twitter

Twitter is kinda picky about what videos you try to feed it. This is the script I use to convert videos quickly. They're mid quality, 720p, with the strictest settings I can think of, but that's social media for you. Name this twittervideo.bat and put it somewhere pathy (I like "C:\Bin") alongside ffmpeg. Linux? No idea!

Call by typing twittervideo file.mkv and it pops out the file file.mkv.twitter.mp4

# twittervideo.bat

ffmpeg -i %1 -vf scale=-2:720 -vcodec libx264 -pix_fmt yuv420p -strict experimental -r 30 -acodec aac -vb 1024k -minrate 1024k -maxrate 1024k -bufsize 1024k -ar 44100 -ac 2 %1.twitter.mp4