Factsheet
Bobby Bingham (libavfilter)
Bobby Bingham (libavfilter)
Novice here, what are the things you can do using ffmpeg?
Do people actually like FFMPEG?
How do I set up and use FFmpeg in Windows? - Video Production Stack Exchange
Can someone explain the benefits (and/or drawbacks) of using ffmpeg?
Videos
Examples of uses of ffmpeg ranging from simple to advanced ones.
Hey everyone -- I'm a newbie here so sorry if this question causes any controversy LOL
I just started building a project a few weeks ago and its the first time that I've ever interacted with video from an engineering perspective. Honestly, its been way more frustrating than I imagined. Video is really clunky and heavy compared to other mediums (understandably so), but this makes my life a lot harder.
Anyway, I've been using FFMPEG as its a nice, open-source library for dealing with video. While its useful, I'm not that blown away by it. However, it seems like its the best option that exists on the internet right now.
What are everyone's thoughts on FFMPEG? Do you all actually like it? Or do you just tolerate it for your work/projects?
FFmpeg is indeed a powerful video encoder/decoder tool¹. It operates in the command line, as opposed to using a GUI. Command line is that black window you find by typing [windows+r], then cmd in the popup field and hitting enter. This is also called "command prompt". Once setup, you enter FFmpeg commands in one of these windows to use it.
Here are the basic steps to "install" and use it:
Installation
- Download the latest FFmpeg build, courtesy of gyan.dev.
- Create a folder on your computer to unpack the zip file. This folder will be your "installation" folder. I chose
C:\Program Files\ffmpeg\. This is a good idea because you will treat this like a regular program. Unpack the zip file into this folder. - The folder should now contain a number of other folders, including one titled
binwhereffmpeg.exeis saved. We're not done yet. Double clicking that file does nothing. Remember, this is a command line program. It runs incmd. - Before you can use
ffmpeg.exeincmdyou have to tell your computer where it can find it. You need to add a new system path. First, right click This PC (Windows 10) or Computer (Windows 7) then clickProperties > Advanced System Settings > Advanced tab > Environment Variables. - In the Environment Variables window, click the "Path" row under the "Variable" column, then click Edit

- The "Edit environment variable" window looks different for Windows 10 and 7. In Windows 10 click New then paste the path to the folder that you created earlier where
ffmpeg.exeis saved. For this example, that isC:\Program Files\ffmpeg\bin\
In Windows 7 all the variables are listed in a single string, separated by a semicolon. Simply go the the end of the string, type a semicolon (;), then paste in the path.
- Click Ok on all the windows we just opened up. Just to be sure, reboot your computer before trying any commands.
FFmpeg is now "installed". The Command Prompt will now recognize FFmpeg commands and will attempt to run them. (If you are still having issues with Command Prompt not recognizing FFmpeg try running CMD as an admin. Alternatively, you can use windows powershell instead of cmd. If it still does not work double check to make sure each step was followed to completion.)
Alternative installation methods
I've not tried these myself, but they probably work, and they're easy to do. However, you can accidentally mess up important things if you're not careful.
First, if you open cmd with administrator privileges, you can run setx /m PATH "C:\ffmpeg\bin;%PATH%", and change C:\ffmpeg\bin to your path to FFmpeg. This uses cmd to do all the gui steps listed above. Easy peasy.
Second, user K7AAY reports that you can simply drop the FFmpeg executables in C:\Windows\System32 and run them from there without having to define the path variable because that path is already defined.
Updating FFmpeg
To update FFmpeg, just revisit the download page in step 1 above and download the zip file. Unpack the files and copy them over the old files in the folder you created in step 2.
Using FFmpeg
Using FFmpeg requires that you open a command prompt window, then type FFmpeg specific commands. Here is a typical FFmpeg command:
ffmpeg -i video.mp4 -vn -ar 44100 -ac 1 -b:a 32k -f mp3 audio.mp3
This command has four parts:
ffmpeg- This command tells cmd that we want to run FFmpeg commands. cmd will first look forffmpeg.exein one of the folders from step 6 in the Installation section. If it is found, it will attempt to run the command.-i video.mp4- This is an input file. We are going to be doing work on this file.-vn -ar 44100 -ac 1 -b:a 32k -f mp3- These are the "arguments". These characters are like mini commands that specify exactly what we want to do. In this case, it is saying create an mp3 file from the input source.
-vn- Leave out the video stream-ar 44100- Specifies audio resolution in hertz.-ac 1- Audio channels, only 1. This is effectively "make mono".-b:a 32k- Audio bitrate, set to 32 kbps.-f mp3- Force to MP3 conversion. Without this command, FFmpeg attempts to interpret what you want based on the extension you use in the output file name.
audio.mp3- This is the output file.
As you can probably guess, this short command makes an MP3 audio file from an MP4 file.
To run this command, assuming you have an MP4 file to try this on, follow these steps:
- Hit the Windows key + r.
- Type
cmdthen enter. - Change the path to where the file is that you want to work on. Type
cd [path]. It should look something likecd C:\Users\name\Desktop\. - Now type the FFmpeg command with the name of your input file. The command will run with some feedback. When it's done, cmd will be available for more commands.
This is the basic way to use FFmpeg. The commands can get far more complicated, but that's only because the program has so much power. Using the FFmpeg documentation, you can learn all the commands and create some very powerful scripts. After that, you can save these scripts into a .bat file so that you just have to double click a file instead of type out the whole command each time. For example, this answer contains a script that will create MP3's from all the MP4's in a folder. Then we would be combining the power of FFmpeg with the power of cmd, and that's a nice place to be when you have to do professional quality video/audio encoding on mountains of files.
- As a point if technical accuracy, FFmpeg is itself not an encoder or decoder. FFmpeg is a multimedia framework which can process almost all common and many uncommon media formats. It has thousands of to capture, decode, encode, modify, combine, and stream media, and it can make use of dozens of external libraries to do even more. Gyan.dev provides a succinct description.
The other answer gives a very good answer that covers the default way of installing it, I'd like to propose two ohter methods that are good for noobs and pros alike:
Option 1
Chocolatey is a package manager, it's a bit like the Microsoft Store, except that it's actually useful, it's all free, and it runs on the commandline. With chocolatey, installing ffmpeg—and setting up the correct $PATH etc.—is as simple as
choco install ffmpeg
It's way quicker and far safer than searching for the right website, finding the download, unzipping it, reading the installation documentation, googling how to set it up, downloading some dependancy etc. etc.
To install Chocolatey you run a command on the commandline, obvs. The website shows you how, but it is a simple cut-n-paste affair. https://chocolatey.org/
You can then check out over 6000 free packages available with choco list <search term here>. There are even non-CLI programs so it's not just for the hardcore. It makes setting up a new install of windows super easy: I have a list of software that I always install and just get chocolatey to do it for me: choco install firefox ffmpeg conemu edgedeflector ditto rainmeter imagemagick… and so on.
As an added bonus upgrading your software is as easy as choco upgrade all
Option 2
Winget is another package manager, that is built-in to recent versions of Windows. The recipe for installing ffmpeg with winget is similar: open a terminal (can be Powershell, wsl, or even cmd if you like banging rocks together) and type
winget install ffmpeg
This will download and install the build of ffmpeg that is hosted by gyan (at the time of writing). It will also work if you don't have admin privileges, which chocolatey prefers.