FFMpeg console voodoo
Useful for hexing, discombobulating, uncucking and generally fuckerarounding with media you want to upload
Extract mp4 from mkv
- ffmpeg -i inputfilename.mkv -acodec copy -vcodec copy outputfilename.mp4
Re-Encode as mp4
- ffmpeg -i inputfilename.avi -c:v libx264 -crf 19 -preset slow -c:a aac -b:a 192k -ac 2 outputfilename.mp4
Re-Scale mp4
- ffmpeg -i inputfilename.mp4 -vf scale=-1:720 outputfilename.mp4
- Sometimes this will give an error that the scale is not divisible by 2
- If this happens use a number other than 720
Extract subtitles
- ffmpeg -i inputfilename.mkv -map 0:s:0 subtitles.srt
- This extracts the first subtitle file (stream 0)
- Switch to 0:s:1 for the next file
Burn subtitles
- ffmpeg -i inputfilename.mp4 -vf subtitles=subtitles.srt outputfilename.mp4
Holy shit you're an expert now
Don't settle for anything less than five peanuts per biden-ballot
Take me home broc