top of page
FFmpeg Course

Batch modify thousands of videos quickly and easily.
Save hundreds of hours and thousands of dollars!
Watch the video and then enroll in our course on Udemy

We've made FFmpeg really easy to understand by providing scripts and step-by-step videos that you can follow to begin processing videos immediately!
These are FFmpeg scripts that you can copy and paste. Each script is explained in detail in our FFmpeg course
FFmpeg Get File Information From a Video
ffmpeg -i videoIn.mp4
FFmpeg Convert Video to Another Format
ffmpeg -i videoIn.mp4 -c videoOut.ts
ffmpeg -i videoIn.mp4 -c copy videoOut.ts
FFmpeg mkv to mp4
ffmpeg -i videoIn.mkv -c videoOut.mp4
FFmpeg Crop Video
ffmpeg -i videoIn.mp4 -vf crop=w:h:x:y videoOut.mp4
ffmpeg -i videoIn.mp4 -vf crop=800:600:560:240 videoOut.mp4
FFmpeg Scale Video
ffmpeg -i videoIn.mp4 -vf scale=320:240 videoOut.mp4
ffmpeg -i videoIn.mp4 -vf scale=-1:240 videoOut.mp4
ffmpeg -i imageIn.jpg -vf scale=320:240 imageOut.png
FFmpeg Change CODECs for better Compression
ffmpeg -i myVideo.mov -c:v h264 -c:a aac videoOut.mp4
FFmpeg Change Bitrate
ffmpeg -i videoIn.mov -c:a copy -c:v h264 -b:v 5M videoOut.mp4
FFmpeg Change Frame Rate
ffmpeg -i myVideo.mov -r 12 videoOut.mov
FFmpeg Transpose Video
ffmpeg -i videoIn.mp4 -vf transpose=1 videoOut.mp4
FFmpeg Trim Video Without Re-Encoding
ffmpeg -ss 00:00:03 -i videoIn.mp4 -to 00:00:07 -c copy videoOut.mp4
FFmpeg Add Subtitles
ffmpeg -i videoIn.mp4 -i subtitle.srt -sub_charenc CP1252 -c:v copy -c:a copy -c:s mov_text videoOut.mp4
ffmpeg -i videoIn.mp4 -i subtitle_eng.srt -i subtitle_fre.srt -map 0:v -map 0:a -map 1 -map 2 -c:v copy -c:a copy -c:s mov_text -metadata:s:s:0 language=eng -metadata:s:s:1 language=fre videoOut.mp4
FFmpeg Add Image Overlay or Watermark
ffmpeg -i videoIn.mp4 -i myOverlay.png -filter_complex "[0:v][1:v]overlay=0:25:enable='between(t,2,7)'" -pix_fmt yuv420p -c:a copy videoOut.mp4
FFmpeg Concatenate Videos
ffmpeg -i 1.mp4 -c copy 1.ts
ffmpeg -i 2.mp4 -c copy 2.ts
ffmpeg -i "concat:1.ts|2.ts" -c copy videoOut.mp4
ffmpeg -i 1.mp4 -c copy -bsf:v h264_mp4toannexb -f mpegts 1.ts
ffmpeg -i 2.mp4 -c copy -bsf:v h264_mp4toannexb -f mpegts 2.ts
ffmpeg -i "concat:1.ts|2.ts" -c copy -bsf:a aac_adtstoasc videoOut.mp4
FFmpeg Add Border
ffmpeg -i videoIn.mp4 -filter_complex "[0]pad = w=0+iw: h=1556+ih : x=0 : y=778 : color=#FF0000" videoOut.mp4
FFmpeg Convert Portrait to Landscape
ffmpeg -i videoIn.mov -vf "split[original][copy];[copy]scale=ih*16/9:-1,crop=h=iw*9/16,gblur=sigma=20[blurred];[blurred][original]overlay=(main_w-overlay_w)/2:(main_h-overlay_h)/2" -c:a copy videoOut.mp4
FFmpeg Batch Processing
Get-ChildItem -Filter *.mp4 | ForEach -Process {ffmpeg -i $_ -c copy ($_.BaseName + '.ts')}
Get-ChildItem -Filter *.mp4 | ForEach -Process
{ ffmpeg -i $_ -vf crop=800:800:400:0 ($_.BaseName + '_NEW.mp4') }
Get-ChildItem -Filter *.ts | ForEach -Process {ffmpeg -i "concat:D:\videos\Intro.ts|$_|D:\videos\Outro.ts" -c copy ($_.BaseName + '_NEW.ts')}
FFmpeg Hints
ffmpeg -codecs
ffmpeg -h muxer=matroska
ffmpeg -h muxer=mp4
Need help with these scripts?
Enroll in our course on Udemy
We've made FFmpeg really easy to understand with scripts and step-by-step videos that you can follow to begin processing videos immediately!

More about me and my courses and free resources — Georghiou.com
bottom of page