Page 1 of 3
x264 encoder, Resolve 17 Studio for Windows, macOS, Linux

Posted:
Wed Nov 11, 2020 10:40 am
by Sergey Mirontsev
As you know, Blackmagic has added an open plugin SDK toolkit for encoder developers (in DaVinci Resolve 17 Studio).
They also added an implementation for x264 (C:\ProgramData\Blackmagic Design\DaVinci Resolve\Support\Developer\CodecPlugin\Examples\x264_encoder_plugin)
So, I am compiling this plugin for Windows and Mac platforms. You can test it if you like.
You need to unzip the downloaded archive to C:\ProgramData\Blackmagic Design\DaVinci Resolve\Support\IOPlugins on Windows or to /Library/Application Support/Blackmagic Design/DaVinci Resolve/IOPlugins on macOS. You probably need to create IOPlugins folder.
Then restart Resolve.

- x264_encoder_plugin.dvcp.bundle.png (99.4 KiB) Viewed 52059 times

- Screenshot 2020-11-11 134155.png (15 KiB) Viewed 51843 times
Win:
https://yadi.sk/d/GfyncFMQ8qnuzQMac:
https://yadi.sk/d/pGmERKeOXV4NuALinux:
https://www.dropbox.com/s/kih4x6rc5imvq ... X.zip?dl=0(Linux version from here:
https://liftgammagain.com/forum/index.p ... ins.15195/)
Re: x264 encoder for DaVinci Resolve 17 for Windows

Posted:
Wed Nov 11, 2020 2:02 pm
by bstaley
Thank you! Any chance of a version for Linux?
Re: x264 encoder for DaVinci Resolve 17 for Windows

Posted:
Wed Nov 11, 2020 2:05 pm
by Jim Simon
Ooooh, can't wait to try this. Thanks Sergey.
Re: x264 encoder for DaVinci Resolve 17 for Windows

Posted:
Wed Nov 11, 2020 3:09 pm
by G0bble
x.264 is the one I choose if using Handbrake - I like its quality/output. Considering DVR can already export h.264 what particular advantages do the more knowledgeable folks here anticipate from this?
Thanks
Re: x264 encoder for DaVinci Resolve 17 for Windows

Posted:
Wed Nov 11, 2020 4:17 pm
by Sergey Mirontsev
bstaley wrote:Thank you! Any chance of a version for Linux?
Not from me, sorry. I have not a Linux developer's environment, only Windows.
Re: x264 encoder for DaVinci Resolve 17 for Windows

Posted:
Wed Nov 11, 2020 4:28 pm
by jhoepffner
Hello,
Thank you, thats super-smart. As you are a Windows developer, do you think it would be possible to implement HAP and LCNotch codec export?
It would be very useful for people, like me, working in event and big projection.
All the best,
Jacques
Re: x264 encoder for DaVinci Resolve 17 for Windows

Posted:
Wed Nov 11, 2020 4:47 pm
by Jim Simon
G0bble wrote:what particular advantages do the more knowledgeable folks here anticipate from this?
I would say 'hope' rather than 'anticipate'.
For me, access to more encoding parameters which leads to better quality at smaller file sizes.
Re: x264 encoder for DaVinci Resolve 17 for Windows

Posted:
Wed Nov 11, 2020 4:52 pm
by Sergey Mirontsev
jhoepffner wrote:Hello,
Thank you, thats super-smart. As you are a Windows developer, do you think it would be possible to implement HAP and LCNotch codec export?
It would be very useful for people, like me, working in an event and big projection.
All the best,
Jacques
I am not a Windows developer. Just my skills are made able for me to do a few things.

Skilled Windows developer can many things. But it is the wrong way to solve task.
HAP is already implemented in libavcodec (part of ffmpeg), so, we need to implement ffmpeg support, not HAP.
LCNotch plugins are available for Adobe products, so, maybe a better solution is a letter to Notch developers for asking for a new plugin, for DaVinci Resolve.
Re: x264 encoder for DaVinci Resolve 17 Studio for Windows

Posted:
Wed Nov 11, 2020 9:14 pm
by antoine
Awesome thanks Sergey for the info !
Re: x264 encoder for DaVinci Resolve 17 Studio for Windows

Posted:
Wed Nov 11, 2020 11:50 pm
by Mario Kalogjera
Thank you Sergei.
What I noticed so far:
- Bitrate is in KBps...I think mbps would be better.
- I tried to render but render queue reported: FAILED, rendering never really starts but it actually reports it's rendering, could not snap it out of it even by pressing "stop", GUI becomes non-responsive, one can only press X and quit Resolve.
Re: x264 encoder for DaVinci Resolve 17 Studio for Windows

Posted:
Thu Nov 12, 2020 7:30 pm
by Jim Simon
Sergey Mirontsev wrote:unzip it to C:\ProgramData\Blackmagic Design\DaVinci Resolve\Support\IOPlugins
That location does not exist. There is a "plugins" folder (no IO, small p). Same thing?
Re: x264 encoder for DaVinci Resolve 17 Studio for Windows

Posted:
Thu Nov 12, 2020 7:32 pm
by Sergey Mirontsev
Jim Simon wrote:Sergey Mirontsev wrote:unzip it to C:\ProgramData\Blackmagic Design\DaVinci Resolve\Support\IOPlugins
That location does not exist. There is a "plugins" folder (no IO, small p). Same thing?
Nope. You must create IOPlugins.
Re: x264 encoder for DaVinci Resolve 17 Studio for Windows

Posted:
Fri Nov 13, 2020 3:04 am
by mm0nst3r
Could you compile x.265 plugin also?
Re: x264 encoder for DaVinci Resolve 17 Studio for Windows

Posted:
Fri Nov 13, 2020 5:00 am
by Peter Fleming
I created a IOPlugins folder in the correct location (C:\ProgramData\Blackmagic Design\DaVinci Resolve\Support\IOPlugins) and copied the 2 files into it, but no x264 options appear in the output render settings panel. What am I doing wrong?
Thanks
Re: x264 encoder for DaVinci Resolve 17 Studio for Windows

Posted:
Fri Nov 13, 2020 7:28 am
by Sergey Mirontsev
Peter Fleming wrote:I created a IOPlugins folder in the correct location (C:\ProgramData\Blackmagic Design\DaVinci Resolve\Support\IOPlugins) and copied the 2 files into it, but no x264 options appear in the output render settings panel. What am I doing wrong?
Thanks
You must copy not files, but folder, as shown on the screenshot in the first message.
Re: x264 encoder for DaVinci Resolve 17 Studio for Windows

Posted:
Fri Nov 13, 2020 10:13 am
by Peter Fleming
Thank you, I did not see that you had to include the the folder "x264_encoder_plugin.dvcp.bundle" to get it to work.
Anyway that works really well, mind you I haven't tried the different data rates as yet.
Any possibility of having a VP9 output, as it is a common web format now.?
Thanks again
Re: x264 encoder for DaVinci Resolve 17 Studio for Windows

Posted:
Fri Nov 13, 2020 10:27 am
by Sergey Mirontsev
Peter Fleming wrote:Thank you, I did not see that you had to include the the folder "x264_encoder_plugin.dvcp.bundle" to get it to work.
Anyway that works really well, mind you I haven't tried the different data rates as yet.
Any possibility of having a VP9 output, as it is a common web format now.?
Thanks again
I am sure x264_encoder_plugin.dvcp.bundle is inside zip.
About VP9: I am not the author of the plugin so, it is possible but not by me. Sorry.
Re: x264 encoder for DaVinci Resolve 17 Studio for Windows

Posted:
Fri Nov 13, 2020 4:25 pm
by Jim Simon
Got it working. Thanks, Sergey.
Re: x264 encoder for Resolve 17 Studio for Windows and macOS

Posted:
Sat Nov 14, 2020 12:51 am
by roger.magnusson
Maybe it should be noted that this sample plugin has a hardcoded bit depth, set to 8-bit. Simply changing the relevant variable to 10 breaks it, so there's obviously a bit more to it that I haven't found yet. As far as I know x264 should no longer require a different binary for 10-bit.
I also note that the source code has a reference to an FFmpeg include folder that isn't used, so perhaps there's more they can release eventually.
Re: x264 encoder for Resolve 17 Studio for Windows and macOS

Posted:
Sat Nov 14, 2020 7:51 am
by Sergey Mirontsev
roger.magnusson wrote:Maybe it should be noted that this sample plugin has a hardcoded bit depth, set to 8-bit. Simply changing the relevant variable to 10 breaks it, so there's obviously a bit more to it that I haven't found yet. As far as I know x264 should no longer require a different binary for 10-bit.
I also note that the source code has a reference to an FFmpeg include folder that isn't used, so perhaps there's more they can release eventually.
I found three variables: i_bithdepth for x264 on line 521 and two more on line 406.
- Code: Select all
val = 8;
codecInfo.SetProperty(pIOPropBitDepth, propTypeUInt32, &val, 1);
codecInfo.SetProperty(pIOPropBitsPerSample, propTypeUInt32, &val, 1);
Maybe it is a current limitation of SDK?
Re: x264 encoder for Resolve 17 Studio for Windows and macOS

Posted:
Sat Nov 14, 2020 10:07 am
by Kizzume
I sincerely hope this can eventually go smoothly. A lack of good bitrates for AAC exporting/rendering is the only thing keeping me from using Resolve. Granted, if this worked on the free version I could try it out myself, but it says "Studio" in the title, so I assume it's only for that.
Re: x264 encoder for Resolve 17 Studio for Windows and macOS

Posted:
Sat Nov 14, 2020 10:08 am
by Kizzume
I just wanted to add: Thank you so much for compiling this.
Re: x264 encoder for Resolve 17 Studio for Windows and macOS

Posted:
Sat Nov 14, 2020 10:44 am
by Hendrik Proosa
Haven’t tried myself yet but x264 library should be compiled with HAVE_BITDEPTH10 setting I think, otherwise the dll does not support 10bit encoding.
Re: x264 encoder for Resolve 17 Studio for Windows and macOS

Posted:
Sat Nov 14, 2020 11:13 am
by roger.magnusson
That's no longer necessary (
source). Running
x264.exe --help on the one I compiled shows "Output bit depth: 8/10".
Re: x264 encoder for Resolve 17 Studio for Windows and macOS

Posted:
Sat Nov 14, 2020 11:29 am
by Hendrik Proosa
roger.magnusson wrote:That's no longer necessary (
source). Running
x264.exe --help on the one I compiled shows "Output bit depth: 8/10".
If the dll is copied from ffmpeg. If it is built yourself, it might be disabled by default. The makefile for x264 has lots of conditionals based on this variable. Not sure which way Sergey did it.
EDIT: I can’t read, you compiled yourself and it shows 10bit there... must try myself what the problem might be then.
Re: x264 encoder for Resolve 17 Studio for Windows and macOS

Posted:
Sat Nov 14, 2020 12:24 pm
by NeoTrantor
Just wanted to share the linux package but I get
You are not allowed to post URLs!

Is there any way I can share that file without breaking the forum rules?
Re: x264 encoder for Resolve 17 Studio for Windows and macOS

Posted:
Sat Nov 14, 2020 12:31 pm
by Sergey Mirontsev
Hendrik Proosa wrote:roger.magnusson wrote:That's no longer necessary (
source). Running
x264.exe --help on the one I compiled shows "Output bit depth: 8/10".
If the dll is copied from ffmpeg. If it is built yourself, it might be disabled by default. The makefile for x264 has lots of conditionals based on this variable. Not sure which way Sergey did it.
EDIT: I can’t read, you compiled yourself and it shows 10bit there... must try myself what the problem might be then.

- Screenshot 2020-11-14 153120.png (53.89 KiB) Viewed 50902 times
Re: x264 encoder for Resolve 17 Studio for Windows and macOS

Posted:
Sun Nov 15, 2020 8:22 am
by Dan Olson
Installed on Mac, handled all the permissions, plugin shows up on the Delivery page, but export only outputs audio.
Re: x264 encoder for Resolve 17 Studio for Windows and macOS

Posted:
Sun Nov 15, 2020 6:51 pm
by Juan Salvo
Re: x264 encoder for Resolve 17 Studio for Windows and macOS

Posted:
Mon Nov 16, 2020 8:29 am
by Sergey Mirontsev
Dan Olson wrote:Installed on Mac, handled all the permissions, plugin shows up on the Delivery page, but export only outputs audio.
Not good. Tested on various Macs. This is not a typical error. The video is usually present.
Re: x264 encoder for DaVinci Resolve 17 Studio for Windows

Posted:
Mon Nov 16, 2020 5:20 pm
by FuzzeeDee
Mario Kalogjera wrote:Thank you Sergei.
What I noticed so far:
- Bitrate is in KBps...I think mbps would be better.
- I tried to render but render queue reported: FAILED, rendering never really starts but it actually reports it's rendering, could not snap it out of it even by pressing "stop", GUI becomes non-responsive, one can only press X and quit Resolve.
I had the same issue. If you move your play head off of the beginning of the timeline before starting render it should render fine, albeit a little slower than DVR 16.
Re: x264 encoder, Resolve 17 Studio for Windows, macOS, Linu

Posted:
Mon Nov 16, 2020 5:47 pm
by Jim Simon
So far all my tests using the plug-in have worked. But I did notice one oddity.
It was my understanding that in CQ mode, the Encoder Presets Ultrafast to Placebo would only affect file size, not quality. (Hence the Constant Quality.)
Ultrafast should create larger files with less compression, and Placebo the smallest files with the most compression.
But I found the opposite to be true. The Placebo file was larger.
Huh?
Studio 17b1 for Windows.
Re: x264 encoder for DaVinci Resolve 17 Studio for Windows

Posted:
Mon Nov 16, 2020 11:49 pm
by Mario Kalogjera
FuzzeeDee wrote:Mario Kalogjera wrote:Thank you Sergei.
What I noticed so far:
- Bitrate is in KBps...I think mbps would be better.
- I tried to render but render queue reported: FAILED, rendering never really starts but it actually reports it's rendering, could not snap it out of it even by pressing "stop", GUI becomes non-responsive, one can only press X and quit Resolve.
I had the same issue. If you move your play head off of the beginning of the timeline before starting render it should render fine, albeit a little slower than DVR 16.
Will try. Noticed that this happens for me when I set output to interlaced. And you're god damn right it's slower - it's high quality...I'd be worried if it were otherwise

Wonder if we can get the x265 in the future...
Re: x264 encoder for DaVinci Resolve 17 for Windows

Posted:
Tue Nov 17, 2020 6:40 am
by G0bble
Jim Simon wrote:G0bble wrote:what particular advantages do the more knowledgeable folks here anticipate from this?
I would say 'hope' rather than 'anticipate'.
For me, access to more encoding parameters which leads to better quality at smaller file sizes.
Yesterday I tried the YT H.264 export template built-in to DVR and the results are horrible. Banding everywhere like the video is 6-bit not 8-bit. The Pro codec exports are the way to go. I had tested these early on in v15 and immediately switched to DNxHR output then, preferring Handbrake for x.264 exports. More than a year later, the results are the same in 16.2.7.
I can see where the x.264 plugin can be useful. While I dont want to mess with it right now - once it is working fully in DVR - will there be a UI to select parameters or save a custom Preset like in HB?
Re: x264 encoder, Resolve 17 Studio for Windows, macOS, Linu

Posted:
Tue Nov 17, 2020 6:34 pm
by Jim Simon
Yes to both, Rahul.
That said, we don't get
full access to x264 parameters.

Re: x264 encoder, Resolve 17 Studio for Windows, macOS, Linu

Posted:
Tue Nov 17, 2020 7:00 pm
by Gary Hango
Jim Simon wrote:That said, we don't get
full access to x264 parameters.

I think it’s just a matter of adding the parameters into the IOPlugin wrapper code to access them in the x264.dll and recompiling. You don’t need to recompile the x264.dll again.
I think I’ll try compiling the plugin as-is then modify the code to add more parameters. I don’t have the Studio version so others would need to test it.
Re: x264 encoder for DaVinci Resolve 17 for Windows

Posted:
Wed Nov 18, 2020 11:55 am
by Andrew Kolakowski
jhoepffner wrote:Hello,
Thank you, thats super-smart. As you are a Windows developer, do you think it would be possible to implement HAP and LCNotch codec export?
It would be very useful for people, like me, working in event and big projection.
All the best,
Jacques
This needs to be done as ffmpeg plugin. Then you have access to all of them. Writing for each own is rather not very optimal, although simplifies GUI needs.
Re: x264 encoder, Resolve 17 Studio for Windows, macOS, Linu

Posted:
Wed Nov 18, 2020 11:57 am
by Andrew Kolakowski
Jim Simon wrote:Yes to both, Rahul.
That said, we don't get
full access to x264 parameters.

If playing with GUI is time consuming you just add 1 GUI text parameter which is passing command to x264. Many tools have it done this way- only key parameters are in GUI and rest can be added as x264 reference command way.
Exactly the same can be done with ffmpeg. You just get video+audio data form Resolve which is key point- rest can be sorted as single window which is ffmpeg command (so all after -i), eg.
-pix_fmt yuv420p -c:v libx264 -c:a aac
output can be also specified in plugin GUI for simplicity. This way you expose all x264/ffmpeg possibilities. Once ffmpeg is done no need for x264/5 separate plugins as it's all there and uses about same commands.
Re: x264 encoder, Resolve 17 Studio for Windows, macOS, Linu

Posted:
Wed Nov 18, 2020 4:31 pm
by Jim Simon
Sorry Andrew, my Latin isn't up to snuff.
Re: x264 encoder, Resolve 17 Studio for Windows, macOS, Linu

Posted:
Wed Nov 18, 2020 5:43 pm
by Andrew Kolakowski
x264 has too many parameters to expose all of them in GUI (unless someone is bored ).
So without making big effort there is very simple way of still giving you the access to all parameters, by introducing 1 text box in GUI.
Then you type there eg.:
--bluray-compat --vbv-maxrate 40000 --vbv-bufsize 30000 --level 4.1 --keyint 24 --open-gop --slices 4 --colorprim "bt709" --transfer "bt709" --colormatrix "bt709" --sar 1:1
and you have Blu-ray complaint h264 export. You can then access any parameters x264 offers if you need to.
Re: x264 encoder, Resolve 17 Studio for Windows, macOS, Linu

Posted:
Wed Nov 18, 2020 5:43 pm
by Gary Hango
The best option would be to provide as many settings as feasibly possible in the GUI and provide a mechanism to load a text file that will override GUI settings when needed.
Re: x264 encoder, Resolve 17 Studio for Windows, macOS, Linu

Posted:
Wed Nov 18, 2020 5:45 pm
by Jim Simon
Andrew Kolakowski wrote:x264 has too many parameters to expose all of them in GUI
I get a good many of them in MeGUI. I guess was hoping for that same access right in Resolve.
Re: x264 encoder, Resolve 17 Studio for Windows, macOS, Linu

Posted:
Wed Nov 18, 2020 8:23 pm
by Andrew Kolakowski
Gary Hango wrote:The best option would be to provide as many settings as feasibly possible in the GUI and provide a mechanism to load a text file that will override GUI settings when needed.
No need for text file- simple text area is easier.
Re: x264 encoder, Resolve 17 Studio for Windows, macOS, Linu

Posted:
Wed Nov 18, 2020 8:36 pm
by Arun Ezilmanivannan
going to test it now, thanks for the plugin.
Re: x264 encoder for DaVinci Resolve 17 Studio for Windows

Posted:
Wed Nov 18, 2020 10:40 pm
by Andrew Kolakowski
Sergey Mirontsev wrote:Peter Fleming wrote:I created a IOPlugins folder in the correct location (C:\ProgramData\Blackmagic Design\DaVinci Resolve\Support\IOPlugins) and copied the 2 files into it, but no x264 options appear in the output render settings panel. What am I doing wrong?
Thanks
You must copy not files, but folder, as shown on the screenshot in the first message.
For me not showing in GUI at all.
Bundle is there. I gave it full 777 permissions. OSX Mojave.
Re: x264 encoder for Resolve 17 Studio for Windows and macOS

Posted:
Thu Nov 19, 2020 2:09 am
by Dan Olson
Sergey Mirontsev wrote:Dan Olson wrote:Installed on Mac, handled all the permissions, plugin shows up on the Delivery page, but export only outputs audio.
Not good. Tested on various Macs. This is not a typical error. The video is usually present.
I took a shot in the dark and manually gave the plugin full access via chmod and now it works, so either it was a problem with that, or maybe it was just the footage I was testing with, or it was some other arcane setting that I bumped in the night.
Re: x264 encoder for DaVinci Resolve 17 Studio for Windows

Posted:
Thu Nov 19, 2020 2:12 am
by Dan Olson
Andrew Kolakowski wrote:For me not showing in GUI at all.
Bundle is there. I gave it full 777 permissions. OSX Mojave.
Have the Security and Privacy preferences open when you launch Resolve. Under General, below where it says "Allow apps downloaded from" it should display a note like "this file was blocked from running" with a "run anyway" option. That's what I had to do before I could get it to actually load in the UI.
Re: x264 encoder, Resolve 17 Studio for Windows, macOS, Linu

Posted:
Thu Nov 19, 2020 10:35 am
by Andrew Kolakowski
No such a warning. Have to find way how to trigger it.
Re: x264 encoder, Resolve 17 Studio for Windows, macOS, Linu

Posted:
Thu Nov 19, 2020 10:52 am
by Johan Fleetwood
Adding ffmpeg ProRes this way would be nice...

Re: x264 encoder for DaVinci Resolve 17 Studio for Windows

Posted:
Thu Nov 19, 2020 6:08 pm
by Andrew Kolakowski
Dan Olson wrote:Andrew Kolakowski wrote:For me not showing in GUI at all.
Bundle is there. I gave it full 777 permissions. OSX Mojave.
Have the Security and Privacy preferences open when you launch Resolve. Under General, below where it says "Allow apps downloaded from" it should display a note like "this file was blocked from running" with a "run anyway" option. That's what I had to do before I could get it to actually load in the UI.
Even sudo spctl --master-disable
doesn't change anything. There must be some other reason.