<p>The other answer gives a very good answer that covers the default way of installing it, I'd like to propose <strong>two</strong> ohter methods that are good for noobs and pros alike:</p>
<h2><strong>Option 1</strong></h2>
<p><strong><a href="https://chocolatey.org/" rel="nofollow noreferrer">Chocolatey</a></strong> 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 <code>$PATH</code> etc.—is as simple as</p>
<pre><code>choco install ffmpeg
</code></pre>
<p>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.</p>
<p>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. <a href="https://chocolatey.org/" rel="nofollow noreferrer">https://chocolatey.org/</a></p>
<p>You can then check out over 6000 free packages available with <code>choco list &lt;search term here&gt;</code>. 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: <code>choco install firefox ffmpeg conemu edgedeflector ditto rainmeter imagemagick…</code> and so on.</p>
<p>As an added bonus upgrading your software is as easy as <code>choco upgrade all</code></p>
<h2><strong>Option 2</strong></h2>
<p><strong>Winget</strong> is <a href="https://learn.microsoft.com/en-us/windows/package-manager/winget/" rel="nofollow noreferrer">another package manager</a>, 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</p>
<pre><code>winget install ffmpeg
</code></pre>
<p>This will download and install the build of ffmpeg that is hosted by gyan (at the time of writing). <em>It will also work if you don't have admin privileges</em>, which chocolatey prefers.</p>

CC BY-SA 4.0
2019-10-16T10:58:02.660Z
Thanks. Unfortunately not all that straight forward. E.g. I'm using Windows 10, Version 10.0.18362 Build 18362 (the most recent as of date) and have admin rights. Pasting the commands for chocolatey installation
> Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))

 I get
'Set-ExecutionPolicy' is not recognized as an internal or external command,
operable program or batch file.
user1323995
CC BY-SA 4.0
2019-10-17T00:48:52.570Z
Are you running that in a powershell session or a cmd session?
stib
CC BY-SA 4.0
2019-10-17T07:08:29.273Z
Cmd! So it only works with powershell? Missed that part. Thanks.
user1323995
CC BY-SA 4.0
2023-11-01T15:34:52.097Z
I prefer this answer because it doesn't promote the bad habit of downloading an executable from some random guy you've never heard of (no offense to gyan.dev but I have no idea who that is). I already know and trust Chocolatey and trust that their ffmpeg package is the legit thing, and not something that's going to ransomware me
James Allen
CC BY-SA 4.0
2023-11-02T06:14:28.290Z
That is a good point and I've added it to the answer. Of course it does shift the trust from the random website owner to the chocolatey package manager, but given that a lot more people have eyes on chocolatey, it's definitely safer.
stib
CC BY-SA 4.0
2024-02-20T18:56:05.827Z
@JamesAllen I guess that makes sense if you aren't on git or other dev forums/sites like this one, where Gyan has a pretty reputable name.
user3643
CC BY-SA 4.0
2019-08-21T01:22:43.813Z
2023-11-02T06:10:46.600Z
2023-11-02T06:10:46.600Z
stib
<p>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 <code>cmd</code> in the popup field and hitting enter. This is also called &quot;command prompt&quot;. Once setup, you enter FFmpeg commands in one of these windows to use it.</p>
<p>Here are the basic steps to &quot;install&quot; and use it:</p>
<h1>Installation</h1>
<ol>
<li><a href="https://www.gyan.dev/ffmpeg/builds/" rel="noreferrer">Download the latest FFmpeg build</a>, courtesy of gyan.dev.</li>
<li>Create a folder on your computer to unpack the zip file. This folder will be your &quot;installation&quot; folder. I chose <code>C:\Program Files\ffmpeg\</code>. This is a good idea because you will treat this like a regular program. Unpack the zip file into this folder.</li>
<li>The folder should now contain a number of other folders, including one titled <code>bin</code> where <code>ffmpeg.exe</code> is saved. We're not done yet. Double clicking that file does nothing. Remember, this is a command line program. It runs in <code>cmd</code>.</li>
<li>Before you can use <code>ffmpeg.exe</code> in <code>cmd</code> you 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 click <code>Properties &gt; Advanced System Settings &gt; Advanced tab &gt; Environment Variables</code>.</li>
<li>In the Environment Variables window, click the &quot;Path&quot; row under the &quot;Variable&quot; column, then click Edit
<a href="https://i.sstatic.net/Ig6nr.jpg" rel="noreferrer"><img src="https://i.sstatic.net/Ig6nr.jpg" alt="Steps to add a System path to Windows" /></a></li>
<li>The &quot;Edit environment variable&quot; 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 <code>ffmpeg.exe</code> is saved. For this example, that is <code>C:\Program Files\ffmpeg\bin\</code>
<a href="https://i.sstatic.net/D1FO8.jpg" rel="noreferrer"><img src="https://i.sstatic.net/D1FO8.jpg" alt="Add new system path Windows 7" /></a>
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 (<code>;</code>), then paste in the path.
<a href="https://i.sstatic.net/Ox5J8.jpg" rel="noreferrer"><img src="https://i.sstatic.net/Ox5J8.jpg" alt="Add new system path Windows 7" /></a></li>
<li>Click Ok on all the windows we just opened up. Just to be sure, reboot your computer before trying any commands.</li>
</ol>
<p><strong>FFmpeg is now &quot;installed&quot;.</strong> 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 <code>windows powershell</code> instead of cmd. If it still does not work double check to make sure each step was followed to completion.)</p>
<h2>Alternative installation methods</h2>
<p>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.</p>
<p>First, if you open cmd with administrator privileges, you can run <code>setx /m PATH &quot;C:\ffmpeg\bin;%PATH%&quot;</code>, and change <code>C:\ffmpeg\bin</code> to your path to FFmpeg. This uses cmd to do all the gui steps listed above. Easy peasy.</p>
<p>Second, user <a href="https://video.stackexchange.com/users/30421/k7aay">K7AAY</a> reports that you can simply drop the FFmpeg executables in <code>C:\Windows\System32</code> and run them from there without having to define the path variable because that path is already defined.</p>
<h1>Updating FFmpeg</h1>
<p>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.</p>
<h1>Using FFmpeg</h1>
<p>Using FFmpeg requires that you open a command prompt window, then type FFmpeg specific commands. Here is a typical FFmpeg command:</p>
<pre><code> ffmpeg -i video.mp4 -vn -ar 44100 -ac 1 -b:a 32k -f mp3 audio.mp3
</code></pre>
<p>This command has four parts:</p>
<ol>
<li><code>ffmpeg</code> - This command tells cmd that we want to run FFmpeg commands. cmd will first look for <code>ffmpeg.exe</code> in one of the folders from step 6 in the Installation section. If it is found, it will attempt to run the command.</li>
<li><code>-i video.mp4</code> - This is an input file. We are going to be doing work on this file.</li>
<li><code>-vn -ar 44100 -ac 1 -b:a 32k -f mp3</code> - These are the &quot;arguments&quot;. 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.</li>
</ol>
<ul>
<li><code>-vn</code> - Leave out the video stream</li>
<li><code>-ar 44100</code> - Specifies audio resolution in hertz.</li>
<li><code>-ac 1</code> - Audio channels, only 1. This is effectively &quot;make mono&quot;.</li>
<li><code>-b:a 32k</code> - Audio bitrate, set to 32 kbps.</li>
<li><code>-f mp3</code> - 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.</li>
</ul>
<ol start="4">
<li><code>audio.mp3</code>- This is the output file.</li>
</ol>
<p>As you can probably guess, this short command makes an MP3 audio file from an MP4 file.</p>
<p>To run this command, assuming you have an MP4 file to try this on, follow these steps:</p>
<ol>
<li>Hit the Windows key + r.</li>
<li>Type <code>cmd</code> then enter.</li>
<li>Change the path to where the file is that you want to work on. Type <code>cd [path]</code>. It should look something like <code>cd C:\Users\name\Desktop\</code>.</li>
<li>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.</li>
</ol>
<p>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 <a href="https://ffmpeg.org/ffmpeg.html" rel="noreferrer">the FFmpeg documentation</a>, 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, <a href="https://video.stackexchange.com/a/20494/3643">this answer contains a script that will create MP3's from all the MP4's in a folder</a>. 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.</p>
<hr />
<ol>
<li>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. <a href="https://www.gyan.dev/ffmpeg/builds/#about-these-builds" rel="noreferrer">Gyan.dev provides a succinct description</a>.</li>
</ol>

CC BY-SA 3.0
2018-02-04T16:17:07.703Z
Thanks a lot for this. I was stuck on the first step, the "path environment var"! You have explained it better than anyone else and I now have a proper response from the cmd query "ffmpeg -version". I think I'm on my way.
Elgar Vaivars
CC BY-SA 4.0
2019-08-21T04:09:08.607Z
The developers use the terms "framework" and "solution" to describe it on their website.
stib
CC BY-SA 4.0
2019-08-21T05:55:09.930Z
ffmpeg is a framework and most of the encoders and almost all of the decoders are built-in (in libavcodec). It also supports various third-party encoders through wrappers. Those third-party encoders usually have standalone tools. But the built-in modules have to be used through the library API. They aren't standalone.
Gyan
CC BY-SA 4.0
2020-08-18T09:39:42.783Z
The answer provided by user24601 is excellent. However, if you copy the extracted ffmpeg.exe, ffplay.exe, and ffprobe.exe into C:\Windows\System32, you can skip steps 4, 5, and 6, which amend the PATH. Those three files are small, and I have run with that method for over a year with no problem.
K7AAY
CC BY-SA 4.0
2021-04-29T20:38:04.030Z
And ffmpeg, for the most part, can be used without those encoders, etc.
TylerH
CC BY-SA 4.0
2021-12-26T21:45:45.047Z
For Windows, in case PATH not works - try to reboot your IDE (VS in my case). Looks like it caching time to time by windows/IDE, so in my case it helps to resolve "file not found" issue. Many thanks to author for this manual!
Nigrimmist
CC BY-SA 4.0
2017-01-23T21:07:43.387Z
2022-03-10T20:06:48.177Z
2022-03-10T20:06:48.177Z
user3643
<p>I understand that FFmpeg is a powerful tool for video file conversions. I see online in many places people suggesting it for solutions or getting help in how to use it. The problem is, I don't even know how to set it up or use it at all.</p>
<p>Those posts I'm talking about usually take the form “Use FFmpeg [complicated and unreadable line of code].”</p>
<p>I'm not really a programmer, but I can do a few things, so I think I can figure it out, if I just had a bit of direction.</p>
<p>How do I set up and use FFmpeg in Windows?</p>

CC BY-SA 3.0
2017-09-17T20:54:46.513Z
Related: [What are the benefits of a CLI encoder (e.g. FFmpeg) over GUI Software?](https://video.stackexchange.com/q/22355/3643)
user3643
<ffmpeg><windows><setup>
How do I set up and use FFmpeg in Windows?
user3643
# How do I set up and use FFmpeg in Windows?

(Asked by: username_0 on 2017-01-23)

I understand that FFmpeg is a powerful tool for video file conversions. I see online in many places people suggesting it for solutions or getting help in how to use it. The problem is, I don't even know how to set it up or use it at all.

Those posts I'm talking about usually take the form “Use FFmpeg [complicated and unreadable line of code].”

I'm not really a programmer, but I can do a few things, so I think I can figure it out, if I just had a bit of direction.

How do I set up and use FFmpeg in Windows?

**Tags:** ffmpeg, windows, setup

> **Comments:**
> **username_0**: Related: [What are the benefits of a CLI encoder (e.g. FFmpeg) over GUI Software?](https://video.stackexchange.com/q/22355/3643)  

---

## 2 answers

### Answer by username_0 on 2017-01-23. Score: 59 | Accepted answer

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 bin where ffmpeg.exe is saved. We're not done yet. Double clicking that file does nothing. Remember, this is a command line program. It runs in cmd.
Before you can use ffmpeg.exe in cmd you 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 click Properties > 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.exe is saved. For this example, that is C:\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 username_6 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 for ffmpeg.exe in 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 cmd then enter.
Change the path to where the file is that you want to work on. Type cd [path]. It should look something like cd 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. username_5.dev provides a succinct description.

> **Comments:**
> **username_4**: Thanks a lot for this. I was stuck on the first step, the "path environment var"! You have explained it better than anyone else and I now have a proper response from the cmd query "ffmpeg -version". I think I'm on my way.  
> **username_1**: The developers use the terms "framework" and "solution" to describe it on their website.  
> **username_5**: ffmpeg is a framework and most of the encoders and almost all of the decoders are built-in (in libavcodec). It also supports various third-party encoders through wrappers. Those third-party encoders usually have standalone tools. But the built-in modules have to be used through the library API. They aren't standalone.  
> **username_6**: The answer provided by user24601 is excellent. However, if you copy the extracted ffmpeg.exe, ffplay.exe, and ffprobe.exe into C:\Windows\System32, you can skip steps 4, 5, and 6, which amend the PATH. Those three files are small, and I have run with that method for over a year with no problem.  
> **username_7**: And ffmpeg, for the most part, can be used without those encoders, etc.  
> **username_8**: For Windows, in case PATH not works - try to reboot your IDE (VS in my case). Looks like it caching time to time by windows/IDE, so in my case it helps to resolve "file not found" issue. Many thanks to author for this manual!  

---

### Answer by username_1 on 2019-08-21. Score: 9

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 . 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.

> **Comments:**
> **username_2**: Thanks. Unfortunately not all that straight forward. E.g. I'm using Windows 10, Version 10.0.18362 Build 18362 (the most recent as of date) and have admin rights. Pasting the commands for chocolatey installation > Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))   I get 'Set-ExecutionPolicy' is not recognized as an internal or external command, operable program or batch file.  
> **username_1**: Are you running that in a powershell session or a cmd session?  
> **username_2**: Cmd! So it only works with powershell? Missed that part. Thanks.  
> **username_3**: I prefer this answer because it doesn't promote the bad habit of downloading an executable from some random guy you've never heard of (no offense to gyan.dev but I have no idea who that is). I already know and trust Chocolatey and trust that their ffmpeg package is the legit thing, and not something that's going to ransomware me  
> **username_1**: That is a good point and I've added it to the answer. Of course it does shift the trust from the random website owner to the chocolatey package manager, but given that a lot more people have eyes on chocolatey, it's definitely safer.  
> **username_0**: @JamesAllen I guess that makes sense if you aren't on git or other dev forums/sites like this one, where username_5 has a pretty reputable name.  

---

