Installing and updating FFMPEG using PowerShell

Let’s begin with saying that I absolutely love using FFMPEG. It’s a great all in one tool for general purposes in video. Because people make various videos I sometimes need to make bulk and quick actions to maybe convert the video in question. However I personally love using the nightly builds of FFMPEG and that is something of a hassle of wanting to keep up with all the time so I do what I do and create a Powershell script to update or install FFMPEG. I tried to make the script as easy as possible to use for others that might not have the absolute knowledge in Powershell.

Inportant note. I would like to add that the installation directory of ffmpeg that will be used in this update script will remove all files in the ffmpeg folder for it to update. Just a quick note before going on. In the future this will be made better.

Let’s start with an example. Let’s say that you want to just install or update FFMPEG using the latest sources and don’t care about any other options. Then you can just use the code below. This will fetch the latest nightly from their official website and download it. After that it will extract the files and put them on the default location C:\ffmpeg\.


If you want more information about what goes on behind the scenes in the script then I made it so that you could use the -Verbose parameter. This is a standard Powershell parameter to maybe debug or see what the script does. Under here an example of running the script with default settings and verbose to show more information.

./Update-FFMPEG.ps1 -Verbose

But you could of course use various other switches that are programmed in to vary what you want the script to do. An example could be that you would rather want a different installation location and/or maybe switch to stable channel instead of the nightly builds. Again an example can be found under here. Notice that I can combine the parameters used or use them without the other. You could just as well just use the FFMPEGPath parameter if your FFMPEG installation is somewhere else.

./Update-FFMPEG.ps1 -Channel Stable -FFMPEGPath "C:\different\location\"

The last example is that you can use the script as well to add the downloaded binary to the environment variables. This was you can just use the word FFMPEG in the command line instead of specifying the full location. In the example below I will use the default parameters and just add the AddEnvironmentPath parameter switch to it.

./Update-FFMPEG.ps1 -AddEnvironmentVariable

Of course this is a script that uses the help system of Powershell if you in anyway need more information regarding the script you can always use the example under here to access the help system. With more examples that you could use and more switches that you could use.

Get-Help ./Update-FFMPEG.ps1

If you are interested you can of course download the script under here. At this moment I am not releasing it on GitHub as I would like to make a full FFMPEG powershell module that can rotate or compress or any other action you might to use FFMPEG for.

Download the script here

Leave a Comment