Slightly Modified x264_encoder for Davinci Resolve (based almost entirely on Black Magic's x264_encoder_plugin sample)
----------------- [WINDOWS] -----------------
To compile this under WINDOWS, you'll need the following tools installed
- Visual Studio 2022
- MSYS2
Instructions:
[Pre-Req]
Create Directory C:\VideoEditingUtils\x264_plugin_build
[Download x264]
- run "MSYS2 MSYS" - type it in the search bar in the Windows Task Bar
- pacman -Sy pacman
- pacman -Syu
- pacman -Su
- pacman -S yasm
- pacman -S nasm
- pacman -S make
- pacman -S git
- cd /C/VideoEditingUtils/x264_plugin_build
- git clone https://code.videolan.org/videolan/x264
[Compile x264]
- run the "x64 Native Tools Command Prompt for VS 2022" - type it in the seach bar in the Windows Task Bar
- Inside the command prompt, type "cd /d C:\msys64"
- Execute the command "msys2_shell.cmd -mingw64 -full-path"
- This will open up another terminal, type in the following commands (in the new terminal)
- cd /C/VideoEditingUtils/x264_plugin_build/x264
- CC=cl ./configure --prefix=../x264_pkg --enable-static --disable-cli
- make -j 8
- make install
[Download x264_encoder]
- run "MSYS2 MSYS" - type it in the search bar in the Windows Task Bar
- cd /C/VideoEditingUtils/x264_plugin_build
- git clone https://github.com/UDaManFunks/x264_encoder
[Compile x264_encoder]
- run the "x64 Native Tools Command Prompt for VS 2022" - type it in the seach bar in the Windows Task Bar
- Inside the command prompt, type "cd /d C:\VideoEditingUtils\x264_plugin_build\x264_encoder"
- nmake /f NMakefile
[Packaging / Installing]
- Create folder called "IOPlugins" under %PROGRAMDATA%\Blackmagic Design\DaVinci Resolve\Support
Note: you can open up %PROGRAMDATA% folder via explorer by typing it verbatim in a run window (Win + R)
- Create a folder named "x264_encoder.dvcp.bundle" under the IOPlugins folder
- Create a folder named "Contents" under the "x264_encoder.dvcp.bundle" folder
- Create a folder named "Win64" under the "Contents" folder
- Copy the built plugin from C:\VideoEditingUtils\x264_plugin_build\x264_encoder\bin\x264_encoder.dvcp" and place it in the "Win64" folder (which you've created via Step 1-4)
- Start Davinci Resolve Studio
You can export using X264 if you pick "QUICKTIME" or "MP4" as your FORMAT in Davnci Resolve, then selecting the "X264 %PROFILE%" codec option.
----------------- [LINUX] -----------------
To compile this under LINUX, you'll need certain development tools installed. The commands listed below were tested in UBUNTU 24.04 LTS
Instructions:
[Pre-Req]
Create a directory in your HOME directory named x264_plugin_build
mkdir ~/x264_plugin_build
[Download x264]
cd ~/x264_plugin_build
git clone https://code.videolan.org/videolan/x264
[Compile x264]
cd ~/x264_plugin_build/x264
./configure --prefix=../x264_pkg --enable-static --disable-cli --enable-pic
make -j 8
make install
[Download x264_encoder]
cd ~/x264_plugin_build
[Compile x264_encoder]
cd ~/x264_plugin_build/x264_encoder
make
[Packaging / Installing]
Create the plugin folder structure
sudo mkdir -p /opt/resolve/IOPlugins/x264_encoder.dvcp.bundle/Contents/Linux-x86-64
Move the newly built binary the to the folder you created in the previous step.
sudo mv bin/x264_encoder.dvcp /opt/resolve/IOPlugins/x264_encoder.dvcp.bundle/Contents/Linux-x86-64/
sudo chown root:root /opt/resolve/IOPlugins/x264_encoder.dvcp.bundle/Contents/Linux-x86-64/x264_encoder.dvcp
sudo chmod 755 /opt/resolve/IOPlugins/x264_encoder.dvcp.bundle/Contents/Linux-x86-64/x264_encoder.dvcp
Restart Davinci Resolve Studio