Guide - The Glory that is FFMPEG

FFMPEG is a powerful open-source, command-line tool for editing video and audio files. Use it to quickly convert file formats, combine audio with a video, change the resolution of a file, cut parts of a video out, shorten and lengthen a video, etc. -- all with fairly simple commands. Get away from that proprietary GUI that forces advertisements on you and join the open-source, command-line world. 1. Install FFMPEG & Set Environment Path
  • For Windows go here: https://ffmpeg.org/download.html#build-windows
  • click on "Windows builds from gyan.dev"
  • scroll down to "git" and click on "https://www.gyan.dev/ffmpeg/builds/ffmpeg-git-full.7z"
  • unzip the download
  • rename the folder to ffmpeg
  • now you can either set the environment variable PATH for the folder or simply place it into your root directory in order to access it via the command-line
  • search "environ" in Windows search bar and click "Edit the system environment variables"
  • click "Environment Variables" at the bottom
  • double click "Path" or highlight it and click "Edit"
  • click "New" and paste in the directory of the ffmpeg download
  • click ok and make sure you click "Apply" on the "System Properties" window before exiting
  • OR
  • place the folder into your root directory -- for example "c:\" and it should work just the same
  • open a command terminal and type "ffmpeg" to confirm that it works
2. Sample Commands
  • simply convert avi to mp4
  • ffmpeg -i video.avi video.mp4
  • to cut a clip by time ( -ss = start time & -t = total time)
  • this will start at 0 seconds and end at 4 seconds
  • ffmpeg -i video.avi -ss 00:00:00 -t 00:00:04 video.avi
  • another example of cutting a video
  • this will start at 2 seconds and end at 6 seconds because -t is how many seconds the video should be after starting at -ss
  • ffmpeg -i video.avi -ss 00:00:02 -t 00:00:04 video.avi
  • resizing a video to 720x720
  • ffmpeg -i video.avi -s 720x720 video.avi
  • if you get this error "Too many packets buffered for output stream 0:1"
  • add this flag "-max_muxing_queue_size 1024"
  • ffmpeg -i video.avi -max_muxing_queue_size 1024 video.mp4
  • use ffmpeg to convert webms into .mov files for your twitter-using IOS buddies
  • ffmpeg -i video.webm -s 420x420 video.mov