Message Boards Message Boards


How to install FFmpeg on Windows 10

Posted 5 months ago
2 Replies
10 Total Likes

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
2 Replies

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 4 months ago

The macOS version of this post can be found here

The Linux version of this post can be found here

Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
or Discard

Group Abstract Group Abstract