DaVinci Resolve 17.1 Studio input format SDK (for Gopro Max)

Ask software engineering and SDK questions for developers working on Mac OS X, Windows or Linux.
  • Author
  • Message
Offline

Ronan Le Meillat

  • Posts: 60
  • Joined: Wed Apr 12, 2017 4:40 am

DaVinci Resolve 17.1 Studio input format SDK (for Gopro Max)

PostSun May 02, 2021 5:52 pm

Hi,

Short: Is there any SDK available for input format on resolve 17.1?

Long:
Few weeks ago I got a Gopro Max. I did not have any idea what can I do with this tool.
But I found http://reframe360.com , no luck Stefan Sietzen stop the development and only a beta for Windows exists. But the work he made is fantastic.
So I decided to port it to MacOS with Metal hardware acceleration. I succeed. It works very well well with realtime 5.6k processing (on Macbook pro 15 i9 with Radeon).
After that another developer contact me because it adds some (very) nice features and he wants to merge my work…
So now we have (I make MacOS/Metal/OpenCL, Sylvain Windows/Linux Cuda/openCL) a working OpenFX plugin for reframing equirectangular videos.
My repository https://github.com/eltorio/reframe360XL
Sylvain's one https://github.com/LRP-sgravel/reframe360XL

Good there is something to do with the Gopro Max

But it is not enough for me. In fact Gopro Max generates .360 video files. These are standard multistream MP4 files, streams 0 and 4 are front and rear (almost) EAC projection https://en.wikipedia.org/wiki/360_video_projection not standard equirectangular.
For getting equirectangular video, you need to use the ugly GoPro player and the only option you have is to export to Apple ProRes and lose the advantage of EAC projected files, with x10 size increase.

So I want to find a solution for using directly the .360 in DaVinci Resolve.
I know that there is a sample h264 encoder based on libx264 in the DaVinci Resolve IO Encode Plugin SDK, but I do not see any decoder Plugin sample.

As a proof of concept I started to make a libavfilter FFmpeg opencl filter for producing an equirectangular or a equiangular-cubempap projected file.
This is the code on my Github repository https://github.com/eltorio/FFmpeg
This is the current patch against FFmpeg head.
Work in progress patch to FFmpeg
Code is far from being perfect. For example Gopro player automatically apply a rotation matrix for virtually keeping the horizon. Also they apply something like interpolation on the two lenses overlapping area…
It needs a lot of work for having the same quality.

Code: Select all
Build with
./configure --enable-opencl --enable-videotoolbox --disable-x86asm --enable-libx264 --enable-libx265 --enable-gpl
make

On a MacBook Pro 15 with Radeon Pro Vega 16 I test with:
For having the ouptut in standard equirectangular with embedded OpenCL equiangular-cubemap to equirectangular reprojection:
Code: Select all
./ffmpeg -hwaccel auto -hwaccel auto -init_hw_device opencl:0.2 -filter_hw_device opencl0 -v verbose  -filter_complex '[0:0]format=yuv420p,hwupload[a] , [0:4]format=yuv420p,hwupload[b], [a][b]gopromax_opencl, hwdownload,format=yuv420p' -i GS010035.360 -f sdl2 -


For having the ouptut in standard equiangular-cubemap projection:
Code: Select all
./ffmpeg -hwaccel auto -hwaccel auto -init_hw_device opencl:0.2 -filter_hw_device opencl0 -v verbose  -filter_complex '[0:0]format=yuv420p,hwupload[a] , [0:4]format=yuv420p,hwupload[b], [a][b]gopromax_opencl=eac=1, hwdownload,format=yuv420p' -i  GS010035.360   -f sdl2 -


For having the ouptut in standard equirectangular with v360 filter:
Code: Select all
./ffmpeg -hwaccel auto -hwaccel auto -init_hw_device opencl:0.2 -filter_hw_device opencl0 -v verbose  -filter_complex '[0:0]format=yuv420p,hwupload[a] , [0:4]format=yuv420p,hwupload[b], [a][b]gopromax_opencl=eac=1, hwdownload,format=yuv420p, v360=input=eac:output=e' -i  GS010035.360   -f sdl2 -


On a iMac Pro device is opencl:0.1

The performance of the libavfiler is near realtime with native GoPro Max 5376x2688 resolution.
I'd like to write something for DaVinci Resolve
Offline

Andrew Kolakowski

  • Posts: 9209
  • Joined: Tue Sep 11, 2012 10:20 am
  • Location: Poland

Re: DaVinci Resolve 17.1 Studio input format SDK (for Gopro

PostThu May 06, 2021 1:59 pm

There is no input SDK, only export one.
Offline

Bevoson

  • Posts: 14
  • Joined: Fri Jan 03, 2020 5:12 pm
  • Location: Los Angeles, CA
  • Real Name: Spencer shwetz

Re: DaVinci Resolve 17.1 Studio input format SDK (for Gopro

PostTue Feb 07, 2023 8:34 pm

Hey Ronan,

Thanks for building all this.

Do you know if this plug-in currently works on macOS 13.1 and Resolve Studio 18.1?

My builds fail during the "make" process but I am unsure if it is a personal error or a software version break.


Thanks!
Local 600 Digital Imaging Technician
Offline

Ronan Le Meillat

  • Posts: 60
  • Joined: Wed Apr 12, 2017 4:40 am

Re: DaVinci Resolve 17.1 Studio input format SDK (for Gopro

PostWed Feb 08, 2023 6:03 am

Bevoson wrote:Hey Ronan,

Thanks for building all this.

Do you know if this plug-in currently works on macOS 13.1 and Resolve Studio 18.1?

My builds fail during the "make" process but I am unsure if it is a personal error or a software version break.


Thanks!

Hi,
I'm a bit busy yet but I'll make a try next week. But since it is an pure OpenFX/Metal plugin it is probably a small change… Could you provide the error you get ?
Offline

Bevoson

  • Posts: 14
  • Joined: Fri Jan 03, 2020 5:12 pm
  • Location: Los Angeles, CA
  • Real Name: Spencer shwetz

Re: DaVinci Resolve 17.1 Studio input format SDK (for Gopro

PostWed Mar 29, 2023 10:43 pm

Ronan Le Meillat wrote:
Bevoson wrote:Hey Ronan,

Thanks for building all this.

Do you know if this plug-in currently works on macOS 13.1 and Resolve Studio 18.1?

My builds fail during the "make" process but I am unsure if it is a personal error or a software version break.


Thanks!

Hi,
I'm a bit busy yet but I'll make a try next week. But since it is an pure OpenFX/Metal plugin it is probably a small change… Could you provide the error you get ?



Please excuse the delay

I am running Mac OS 13.2.1 , Resolve Studio 18.1.4, XCode 14.2, Macbook Pro M1

With my limited knowledge, it appears I am having an OFX warning and an error caused by Python or improper install of Python?

Terminal log below:

Code: Select all
spencer@spencers-MacBook-Pro ~ % cd reframe360XL
spencer@spencers-MacBook-Pro reframe360XL % make
rm -f *.o *.ofx *.zip *.metallib Reframe360Kernel.h OpenCLKernel.h
rm -fdr Reframe360.ofx.bundle
c++ -target x86_64-apple-macos10.12 -c Reframe360.cpp -std=c++11 -fvisibility=hidden -I/include -I/Library/Application\ Support/Blackmagic\ Design/DaVinci\ Resolve/Developer/OpenFX/Support/include -I/Library/Application\ Support/Blackmagic\ Design/DaVinci\ Resolve/Developer/OpenFX/OpenFX-1.4/include -I../glm
In file included from Reframe360.cpp:1:
In file included from ./Reframe360.h:3:
In file included from /Library/Application Support/Blackmagic Design/DaVinci Resolve/Developer/OpenFX/Support/include/ofxsImageEffect.h:47:
/Library/Application Support/Blackmagic Design/DaVinci Resolve/Developer/OpenFX/Support/include/ofxsParam.h:267:14: warning: 'auto_ptr<OFX::ParamInteractDescriptor>' is deprecated [-Wdeprecated-declarations]
        std::auto_ptr<ParamInteractDescriptor> _interact;
             ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__memory/auto_ptr.h:32:28: note: 'auto_ptr<OFX::ParamInteractDescriptor>' has been explicitly marked deprecated here
class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11 auto_ptr
                           ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__config:1054:39: note: expanded from macro '_LIBCPP_DEPRECATED_IN_CXX11'
#  define _LIBCPP_DEPRECATED_IN_CXX11 _LIBCPP_DEPRECATED
                                      ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__config:1043:48: note: expanded from macro '_LIBCPP_DEPRECATED'
#    define _LIBCPP_DEPRECATED __attribute__ ((deprecated))
                                               ^
In file included from Reframe360.cpp:1:
In file included from ./Reframe360.h:3:
In file included from /Library/Application Support/Blackmagic Design/DaVinci Resolve/Developer/OpenFX/Support/include/ofxsImageEffect.h:47:
/Library/Application Support/Blackmagic Design/DaVinci Resolve/Developer/OpenFX/Support/include/ofxsParam.h:726:14: warning: 'auto_ptr<OFX::ParamInteractDescriptor>' is deprecated [-Wdeprecated-declarations]
        std::auto_ptr<ParamInteractDescriptor> _interact;
             ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__memory/auto_ptr.h:32:28: note: 'auto_ptr<OFX::ParamInteractDescriptor>' has been explicitly marked deprecated here
class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11 auto_ptr
                           ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__config:1054:39: note: expanded from macro '_LIBCPP_DEPRECATED_IN_CXX11'
#  define _LIBCPP_DEPRECATED_IN_CXX11 _LIBCPP_DEPRECATED
                                      ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__config:1043:48: note: expanded from macro '_LIBCPP_DEPRECATED'
#    define _LIBCPP_DEPRECATED __attribute__ ((deprecated))
                                               ^
In file included from Reframe360.cpp:1:
In file included from ./Reframe360.h:3:
/Library/Application Support/Blackmagic Design/DaVinci Resolve/Developer/OpenFX/Support/include/ofxsImageEffect.h:404:10: warning: 'auto_ptr<OFX::InteractDescriptor>' is deprecated [-Wdeprecated-declarations]
    std::auto_ptr<EffectOverlayDescriptor> _overlayDescriptor;
         ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__memory/auto_ptr.h:32:28: note: 'auto_ptr<OFX::InteractDescriptor>' has been explicitly marked deprecated here
class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11 auto_ptr
                           ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__config:1054:39: note: expanded from macro '_LIBCPP_DEPRECATED_IN_CXX11'
#  define _LIBCPP_DEPRECATED_IN_CXX11 _LIBCPP_DEPRECATED
                                      ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__config:1043:48: note: expanded from macro '_LIBCPP_DEPRECATED'
#    define _LIBCPP_DEPRECATED __attribute__ ((deprecated))
                                               ^
Reframe360.cpp:572:10: warning: 'auto_ptr<OFX::Image>' is deprecated [-Wdeprecated-declarations]
    std::auto_ptr<OFX::Image> dst(m_DstClip->fetchImage(p_Args.time));
         ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__memory/auto_ptr.h:32:28: note: 'auto_ptr<OFX::Image>' has been explicitly marked deprecated here
class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11 auto_ptr
                           ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__config:1054:39: note: expanded from macro '_LIBCPP_DEPRECATED_IN_CXX11'
#  define _LIBCPP_DEPRECATED_IN_CXX11 _LIBCPP_DEPRECATED
                                      ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__config:1043:48: note: expanded from macro '_LIBCPP_DEPRECATED'
#    define _LIBCPP_DEPRECATED __attribute__ ((deprecated))
                                               ^
Reframe360.cpp:577:10: warning: 'auto_ptr<OFX::Image>' is deprecated [-Wdeprecated-declarations]
    std::auto_ptr<OFX::Image> src(m_SrcClip->fetchImage(p_Args.time));
         ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__memory/auto_ptr.h:32:28: note: 'auto_ptr<OFX::Image>' has been explicitly marked deprecated here
class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11 auto_ptr
                           ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__config:1054:39: note: expanded from macro '_LIBCPP_DEPRECATED_IN_CXX11'
#  define _LIBCPP_DEPRECATED_IN_CXX11 _LIBCPP_DEPRECATED
                                      ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__config:1043:48: note: expanded from macro '_LIBCPP_DEPRECATED'
#    define _LIBCPP_DEPRECATED __attribute__ ((deprecated))
                                               ^
5 warnings generated.
python ./HardcodeKernel.py OpenCLKernel Reframe360Kernel.cl
make: python: No such file or directory
make: *** [OpenCLKernel.h] Error 1
spencer@spencers-MacBook-Pro reframe360XL %


Thank you
Local 600 Digital Imaging Technician

Return to Software Developers

Who is online

Users browsing this forum: No registered users and 13 guests