Presented here are two solutions for Windows users to help FFmpeg find its x264 presets folder. Accompanying each solution is a batch file to automate the solution in its entirety.
Use only one of these solutions.
The first solution is easiest, but you will have to repeat it across every drive you wish to use FFmpeg on. If you do not wish to do that, use the second solution. It is a bit more complicated, but the batch file makes the process painless.
Again, do not use both solutions. I strongly favour Solution 2.
SOLUTION 1
FFmpeg looks for x264 presets in C:\usr\local\share\ffmpeg
, a directory which needs to be created in Windows:
- Create a folder
C:\usr\local\share\ffmpeg
- Copy all of your preset files from
~ffmpeg\presets
into the new folder.
Or run the following as a batch file:
::BEGIN SOLUTION 1 BATCH FILE
md C:\usr\local\share\ffmpeg
copy "C:\Program Files (x86)\ffmpeg\presets" C:\usr\local\share\ffmpeg
::END SOLUTION 1 BATCH FILE
Before you run this batch file be sure to change C:\Program Files (x86)\ffmpeg\presets
to the current location of your ~\ffmpeg\presets
folder.
SOLUTION 2
FFmpeg looks for x264 presets in %HOME%\.ffmpeg
, an environment which needs to be created in Windows:
First, create two folders:
- Create the folder
HOME
(in this example, I will locate it at C:\Users\your_user_name\HOME
};
- Within the folder
HOME
create another new folder named .ffmpeg
(note the period at the beginning of the filename);
- Copy all of the preset files from the folder
~\ffmpeg\presets
into the new folder C:\Users\your_user_name\HOME\.ffmpeg
- Remember to change
your_user_name
to your actual username
Then establish the folder HOME
as an environment variable %HOME%
:
- Open an explorer window;
- Navigate to
Control Panel\System and Security\System
;
- Select
Advanced system settings
(left side of window);
- Select
Environment Variables
(button near bottom);
- Select
New...
(under System Variables to make presets available to all users);
- In
Variable name:
enter HOME
- In
Variable value:
enter C:\Users\your_user_name\HOME
- Remember to change
your_user_name
to your actual username
Or run the following as a batch file:
::BEGIN SOLUTION 2 BATCH FILE
md %userprofile%\HOME
md %userprofile%\HOME\.ffmpeg
copy "C:\Program Files (x86)\ffmpeg\presets" %userprofile%\HOME\.ffmpeg
setx HOME %userprofile%\HOME\ /m
::END SOLUTION 2 BATCH FILE
Before you run this batch file be sure to change C:\Program Files (x86)\ffmpeg\presets
to the current location of your ~\ffmpeg\presets
folder.