Message Boards Message Boards

How to install FFmpeg on Windows 10

for installing FFmpeg on Linux see this post,
for installing on MacOS see this post

Video object and video processing functions were introduced in Wolfram Language 12.1. To read from and write to video files, video functionality uses media libraries provided by operating systems as well as a limited version of FFmpeg that is shipped with the language and can be immediately used. Details and examples showing how to import and export video files can be found in the Importing & Exporting Video tutorial. The Codec Support section in that tutorial describes the limitations of the FFmpeg shipped with the language and shows how installing the full version of FFmpeg gets you a better support for audio and video codecs.

Without FFmpeg installed, the first time a video function is called a message is displayed, suggesting to install FFmpeg for a more complete codec support. Here is the list of supported video decoders available before having FFmpeg installed. At the end of this post we will compare the list with the supported decoders after FFmpeg is installed.

In[1]:= Length /@ $VideoDecoders

During evaluation of In[1]:= General::sysffmpeg: Using a limited version of FFmpeg. Install FFmpeg to get more complete codec support.

Out[1]= <|"AVI" -> 37, "Matroska" -> 55, "MP4" -> 13, "Ogg" -> 1,  "QuickTime" -> 23, "VideoFormat" -> 83|>

In this post I will show how to install and configure FFmpeg on Windows 10.

First, download a 64-bit shared (not static) build of FFmpeg 4.0.0 or later. Links to Windows builds are available at Get a zip file with win64-gpl-shared suffix (any file with that suffix will work, but here I want to install the latest stable version):
enter image description here Once the zip file is downloaded, we need to extract its contents to a home directory. There will be four subdirectories in the extracted FFmpeg directory: bin, doc, include and lib. FFmpeg is now installed.

In the final step we need to modify Path environment variable. Open the Start Search, type in "env", and choose Edit environment variables for your account: enter image description here

Then, select Path environment variable and click Edit...: enter image description here

Finally, Click New and add a path to your FFmpeg directory including bin subdirectory: enter image description here Click OK and restart Wolfram Language. When you evaluate $VideoDecoders again, you should see the list that contains many codecs not available before:

In[1]:= Length /@ $VideoDecoders

Out[1]= <|"AVI" -> 160, "Matroska" -> 260, "MP4" -> 34, "Ogg" -> 1,  "QuickTime" -> 70, "VideoFormat" -> 327|>

Another way to confirm that the full version of FFmpeg is used by Wolfram Language:

In[2]:= FFmpegTools`$SystemFFmpegQ

Out[2]= True
POSTED BY: Piotr Wendykier
8 Replies

Hello, thanks for his answer. I have two PC's, both Win10 64 bit. I applied this procedure exactly the same way to both. One worked but the other one didn't. After I restarted Mathematica many times it still does not recognize the new path to FFmpeg. Any idea?


Yu Chao

POSTED BY: Yu-Chiu Chao

....Also, a strange thing is that, on the PC where this worked, I no longer see this path in the environment definition box, and the list returned by a "path" command at the CMD prompt dose not contain this new directory, although the added directory is still there. Whereas, on the PC where this didn't work, it is still showing up in the path environment and in the list returned by "path".

POSTED BY: Yu-Chiu Chao

When I click the link for Windows 10, I get a different web page. Not clear how to proceed with that. Will it work for Windows 11?

POSTED BY: Ernst Huijer

Which version of Wolfram Language? Automatic installation of FFmpeg was introduced in Wolfram Language 12.3 for Windows. It should work for Windows 11 as well. Here are the links to FFmpeg builds for Windows:

POSTED BY: Piotr Wendykier

Mathematica version 13. I tried to export an animation as video. I got a message about having to install ffmpeg, but it exported it anyway, in AVI or MP4.

POSTED BY: Ernst Huijer

This is what I get when I evaluate Video for the first time in 13.0 for Windows: Install FFmpeg

POSTED BY: Piotr Wendykier
Posted 3 years ago

The macOS version of this post can be found here

The Linux version of this post can be found here

POSTED BY: Sean Cheren

enter image description here -- you have earned Featured Contributor Badge enter image description here Your exceptional post has been selected for our editorial column Staff Picks and Your Profile is now distinguished by a Featured Contributor Badge and is displayed on the Featured Contributor Board. Thank you!

POSTED BY: Moderation Team
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
or Discard

Group Abstract Group Abstract