跳转到内容
来自 Arch Linux 中文维基

本文或本节需要翻译。要贡献翻译,请访问简体中文翻译团队

附注: 请提供模板的第一个位置参数以更详细的指示。(在 Talk:DaVinci Resolve# 中讨论)

Davinci Resolve is a proprietary video editing, color grading, color correction, visual effects, motion graphics and audio post-production application.

安装

Both a limited free version and a paid (Studio) version are offered.

For the free version, install davinci-resolveAUR or davinci-resolve-betaAUR.

若要获取付费版本,安装 davinci-resolve-studioAURdavinci-resolve-studio-betaAUR

注意:Since version 19.1.3-2, you must manually download the installer from Blackmagic Design's official website and place it in the same directory as the PKGBUILD before building the package.[1]

To run DaVinci Resolve, it is required to use suitable OpenGL and OpenCL drivers. Open-source OpenCL drivers are supported via Mesa (Rusticl) for AMD cards and Intel cards. The NixOS wiki has a compatibility matrix of supported AMD GPUs for Davinci Resolve.

Table of OpenGL drivers
GPU 制造商 OpenGL 驱动 是否开源 文档 已测试的驱动版本 是否能够运行DaVinci Resolve 测试的DaVinci Resolve版本 Notes
AMD mesa AMDGPU 23.0.2-2 18.1.4-1 On pre-Vega GPUs, if using opencl-amd and mesa, DR crashes, see this bug report. You can instead use rocm with ROC_ENABLE_PRE_VEGA=1 or use opencl-amd with progl.

Tested with Radeon RX 580. Tested with Radeon PRO W6600.

amdgpu-pro-oglpAUR AMDGPU PRO 21.10_1247438-1 17.1.1 This is required if using ORCA legacy OpenCL driver. Requires running Resolve with the progl wrapper script. See documentation and the driver github for usage.
Intel mesa Intel graphics 23.1.6 18.5.1 Works without issues.
NVIDIA mesa Nouveau
nvidia-utils NVIDIA 460.32.03-1 17.0b6-1 Tested on optimus laptop using nvidia-xrun.
Table of tested OpenCL drivers
GPU 制造商 OpenCL 驱动 是否开源 测试的驱动版本 是否能够运行DaVinci Resolve 测试的DaVinci Resolve版本 Comment
Neutral opencl-rusticl-mesa 1:23.3.2-2 18.6.4-1 This only works if opencl-clover-mesa is not installed, otherwise DR will use Clover instead of rusticl. Some kernel versions have an issue with ROCm, but 6.1 LTS and 6.10.2 work.

Tested with RX 6800M.

mesa-tkg-git 24.0.0_devel.180705.fdbb5d58983-1 18.6 DR works with rusticl now that MR 21305 has been merged (commit 0a072bb3).

Tested with RX 7600 using RUSTICL_ENABLE=radeonsi.

AMD opencl-amdAUR Mixed pro and open components 1:5.6.0-2 18.5b There is no currently AUR package with only repackaged rocm drivers from Ubuntu (this opencl-amd packages both rocm and orca). On GFX8 (RX 580 and others), the ORCA legacy driver is used by default, which itself currently requires the AMDGPU-PRO OpenGL drivers to work (see above).

Tested with Radeon Pro W6600 (works, even with mesa) Tested with Radeon RX 580 (works, currently only with progl). Tested with Radeon RX 5700 XT (with mesa) Addresses crashing (encounted with rocm-opencl-runtime package) when attempting to perform color correction on the color page. Tested with Radeon 7900XT.

rocm-opencl-runtime 5.4.3-1 18.1.4-1 For GPUs older than GFX9/Vega use variable ROC_ENABLE_PRE_VEGA=1; works with Mesa OpenGL

Tested with Radeon Pro W6600 Tested with AMD RX580. Color correction may result in crashing (did for Radeon )7900XT), consider using opencl-amd 5.6.0-2.

opencl-legacy-amdgpu-proAUR 22.10.1_1401426-1 Yes, for GPUs older than Vega 17.4.6-2 Note that this is simply the opencl-amdAUR package without the ROCm drivers.

Requires the AMDGPU-PRO OpenGL drivers to work. Tested with Radeon RX580.

Intel intel-compute-runtime custom 18.5.1 Works with patches, described in this issue.
mesa with the cl-gl sharing MR applied 23.3.0 with MR applied 18.6 Works with RUSTICL_ENABLE=iris exported as an environment variable
beignetAUR 1.3.2+12+gfc5f430c-2 Core dumped
intel-openclAUR 5.0.r63503-2 Core dumped
intel-opencl-runtimeAUR 1:18.1.0.013-2 Core dumped
Nvidia opencl-nvidia 460.32.03-1 Suitable, but working on cuda instead?

DaVinci Resolve检查器

可以通过运行 davinci-resolve-checker 脚本以确认自己的配置是否能够正常运行Davinci Resolve。(doesn't work for Intel iGPUs - says OpenCL driver is unsupported, though you can make it work). 如果配置良好,它将会输出以下内容:

All seems good. You should be able to run DaVinci Resolve successfully.

BlackMagic采集卡

如果使用DeckLink、UltraStudio或Intensity卡进行视频采集和播放,请使用decklinkAUR包安装Blackmagic Desktop Video Software。

提示与技巧

减少安装时间

Compression of the Davinci Resolve package takes a significant amount of time because the binary is quite large. You can instruct makepkg to use a different compression algorithm, which in this case disables compression altogether, speeding up the process tremendously.

PKGEXT='.pkg.tar'

使用便携版软件

如果因为软件包太大、需要切换多个版本等原因不想在系统中安装Davinci Resolve,可以把需要版本的安装包解压到想要解压的目录,然后直接在目录里运行opt/resolve/bin/resolve。

使用自动化脚本

Davinci Resolve支持脚本。免费版只支持从软件内部启动脚本,而Studio版本可以从外部调用脚本。在 首选项->系统->常规->使用外部脚本 中可以选择三个选项:无(只能从软件内部调用)、本地(允许从本地主机调用)和网络(允许从远程主机调用)。

可以在 帮助 -> 文档 -> 开发者 中找到相关文档。

重新映射键盘和鼠标滚轮以滚动和缩放

软件本身滚动和缩放的快捷键很奇怪:

  • Shift + 滚轮 = 调整轨道高度
  • Ctrl + 滚轮 = 滚动时间线
  • Alt + 滚轮 = 缩放时间线
  • 滚轮 = 垂直滚动

在软件中无法重新映射这些快捷键,见[2]

A workaround (working in X11 and Wayland) is to use evsieve. Replace /dev/input/event3 and /dev/input/event5 with your keyboard and mouse events in the following command:

# evsieve --input /dev/input/event3 grab --input /dev/input/event5 grab \
    --hook   key:leftalt:1 toggle=alt:2 \
    --hook   key:leftalt:0 toggle=alt:1 \
    --hook   key:leftctrl:1 toggle=ctrl:2 \
    --hook   key:leftctrl:0 toggle=ctrl:1 \
    --toggle rel:wheel @alt-up @alt-down id=alt \
    --map    yield rel:wheel@alt-down key:leftalt:0 key:leftctrl:1 key:leftctrl:2 rel:wheel key:leftctrl:0 key:leftalt:1 \
    --toggle rel:wheel @ctrl-up @ctrl-down id=ctrl \
    --map    yield rel:wheel@ctrl-down key:leftctrl:0 key:leftalt:1 key:leftalt:2 rel:wheel key:leftalt:0 key:leftctrl:1 \
    --block  rel:wheel_hi_res \
    --print  @alt-down @alt-up @ctrl-down @ctrl-up \
    --output create-link=/dev/input/by-id/merged-virtual-KM name="merged virtual KM"

Another workaround (working in X11 (and Xwayland), is worse and sometimes skips events) of this problem, you can use IMWheel utility. It can remap modifiers only for the application described by regular expression.

使用以下配置:

~/.imwheelrc
"^resolve"

    # just wheel for scroll
    None, Up, Control_L|Button4
    None, Down, Control_L|Button5

    # crtl wheel for zoom
    Control_L, Up,   Alt_L|Button4
    Control_L, Down, Alt_L|Button5

    # alt wheel for track height
    Alt_L, Up,   Shift_L|Button4
    Alt_L, Down, Shift_L|Button5

或使用以下配置:

~/.imwheelrc
"^resolve"

     # just wheel for zoom
     None, Up,   Alt_L|Button4
     None, Down, Alt_L|Button5

     # shift wheel for scroll
     Shift_L, Up, Control_L|Button4
     Shift_L, Down, Control_L|Button5

Prevent prompt returning before full exit

When you exit application, the terminal prompt is returned to you, but suddenly the terminal is polluted with "Socket disconnected" message. To prevent this, pipe output of main process via cat. See here for explanation.

疑难解答

日志

DaVinci Resolve每次启动时都会在~/.local/share/DaVinciResolve/logs/ResolveDebug.txt创建日志文件。如果出现问题,可以检查此日志以获取相关信息。

窗口没有标题栏

KDE可以用窗口规则强制开启标题栏,见[3]

你可以手动创建描述所需窗口规则的文件:

DaVinci_Resolve_main_window_always_with_titlebar_and_frame.kwinrule
[DaVinci Resolve main window always with titlebar and frame]
Description=DaVinci Resolve main window always with titlebar and frame
clientmachinematch=0
noborder=false
noborderrule=2
titlematch=0
types=1
wmclass=resolve
wmclasscomplete=false
wmclassmatch=1

然后在系统设置 > 窗口管理 > 窗口规则中导入此文件。

MP4, H.264, H.265 and AAC Support

It's a misconception that DaVinci Resolve free does not support the MP4 container type. It is more accurate to say DaVinci Resolve free does not support decoding or encoding H.264 and H.265 video, regardless of the container type. For example, an MP4 containing an AV1 video stream and MP3 or PCM audio stream, can be decoded by DaVinci Resolve free. Neither DaVinci Resolve free or Studio versions support decoding or encoding of AAC audio streams.

Table of MP4, H.264, H.265 and AAC Support
Release MP4 H.264 H.265 AAC Tested Version Notes
Free 18.6.6-2 MP4 supported provided supported codecs are being used (eg: AV1 and PCM). AV1 only on Nvidia, maybe even for decoding, according to codecs document.
Studio 18.6.6-2

Workaround for DaVinci Resolve Free

If your MP4's video is H.264 or H.265, but audio is MP3 or PCM, you need only transcode your video to a supported codec, as the audio is already supported.

$ ffmpeg -i input.mp4 -c:v dnxhd -profile:v dnxhr_hq -pix_fmt yuv422p -c:a copy output.mov

If your MP4's video is H.264 or H.265, and the audio is AAC, you need to transcode both your video and audio to a supported codec.

$ ffmpeg -i input.mp4 -c:v dnxhd -profile:v dnxhr_hq -pix_fmt yuv422p -c:a alac output.mov

If your MP4's video is AV1, but the audio is AAC, transcode just the audio to a supported codec:

$ ffmpeg -i input.mp4 -c:v copy -c:a pcm_s32le output.mp4

If your space is limited, you could use this option (still x4..5 increase in file size) - but bear in mind, this is a lossy format so you could possibly get compression artefacts at later stages - for example, due to color correction - and lose your work :

$ ffmpeg -i input.mp4 -c:v mpeg4 -q:v 2 -c:a alac output.mp4

You could also use alac codec for initial recording in OBS, and then copy audio with "-c:a copy" as ffmpeg parameter, to avoid encoding.


可以使用incron自动转换指定文件夹里出现的文件,见此文章中的设置案例。也可以编写脚本以实现此效果,更多信息见另见部分

DR Studio的解决方案

Both H.264 and H.265 video is supported by Studio, but AAC audio is not. You can transcode the audio from the unsupported AAC format, into a supported lossless format without destructively re-compressing the video, or separating the audio from the video.

In #See also section, note a link to a PDF containing an official list of supported codecs.

To transcode audio into Apple Lossless Audio Codec (-c:a alac). This is a good option if you prefer using MOV containers.

$ ffmpeg -i input.mp4 -c:v copy -c:a alac output.mov

FLAC offers just a minor compression advantage over ALAC. To transcode into FLAC, you will need to use the MKV container.

$ ffmpeg -i input.mp4 -c:v copy -c:a flac -compression_level 12 output.mkv

There's probably no real advantage to using PCM, except that MP4, MOV and MKV containers all support it, if that's important to you.

$ ffmpeg -i input.mp4 -c:v copy -c:a pcm_s32le output.mov

高分辨率支持

To enable compatibility with high-resolution displays, set the following environment variables accordingly:[4]

 QT_DEVICE_PIXEL_RATIO=2
 QT_AUTO_SCREEN_SCALE_FACTOR=true

You can change UI scaling in settings: Preferences (ctrl + ,) > User tab > UI settings > UI Display Scale.

关于Wine版本

因为有些插件能用于Windows而无法用于Linux版DR,而且Linux有MP4格式问题,所以可能有人想用Wine运行DR。但尽管Wine 6.5支持了DR所需的OpenCL 1.2,还是无法用Wine启动DR。

测试结果在此。在DR 17.4.1中,DR无法看到可用的GPU列表(wine 6.21)。Probably, need some hack to make wine present gpus to applications. In dr 18.5b1 with wine 8.7-1 I get the rocm error (5.4.3-1) that is filed here.

OpenCL版本错误

If the application simply is not starting, even after showing installer and "tour" successfully your OpenCL Version may not match your NVIDIA driver. If you have installed nvidia-440xx make sure to install opencl-nvidia-440xx as well. 错误信息可能如下:

~/.local/share/DaVinciResolve/logs/LogArchive/ResolveDebug_C1.txt
...
OpenCL error -1001: 'Unspecified Error', GPUPropertiesUtilUnix.cpp:338
...

再次显示初始界面

在尝试安装驱动时,可能需要从能检查系统和显卡的初始界面开始,你可以在备份后使用以下命令删除配置文件:

rm -r $HOME/.local/share/DaVinciResolve/configs

找不到全屏预览功能

仅Studio版有此功能,可以在菜单的 Workspace > Video Clean Feed 中找到。

视频预览时没有声音

DaVinci interfaces the ALSA directly, so if you use pulseaudio you need to install pulseaudio-alsa or pipewire-alsa. Alternatively you can redirect it to use PulseAudio yourself by creating asound.conf in /etc/ with the following content:

/etc/asound.conf
pcm.!default pulse
ctl.!default pulse

在intel/nvidia混合显卡上出现Error Code: 999

"The GPU failed to perform image processing because of an error. Error Code: 999."

If nvidia gpu is used in on-demand mode, you have to explicitly demand it. To enable set the following environment variables:

__NV_PRIME_RENDER_OFFLOAD=1
 __GLX_VENDOR_LIBRARY_NAME=nvidia

与libcrypto.so.1.0.0有关的静默崩溃

DaVinci Resolve is not starting in graphical mode.

In the console, this error is thrown:

$ /opt/resolve/bin/resolve 
bin/resolve: error while loading shared libraries: libcrypt.so.1: cannot open shared object file: No such file or directory

You need to install libxcrypt-compat.

Missing Workflow Integrations menu

In DR Studio for Windows and Mac OS there is Workspace -> Workflow Integrations menu. Workflow Integration plugins are written in JavaScript (electron applications). As noted in documentation (you can reach it in Help -> Documentation -> Developer), Linux currently is not supported (checked in 17.4.3). They say Integration Scripts are supported in Linux, this is most probably a mistake, because they did not provided a path where to put them and still the menu is missing (it is that same Workspace -> Workflow Integrations).

Python 3.6 not found

前往 Workspace -> Console -> Py3 ,可能会弹出错误窗口 "Python 3.6 not found"。

以下提供一种解决方案(来自此问题):

env PYTHON_CONFIGURE_OPTS="--enable-shared" pyenv install 3.6.11
sudo ln -s $HOME/.pyenv/versions/3.6.11/lib/python3.6 /usr/local/lib/python3.6
sudo ln -s $HOME/.pyenv/versions/3.6.11/lib/libpython3.so /usr/local/lib/libpython3.6.so

In DR 18 they say that all python 3 versions are supported.

杀死挂起进程

If dr hanged, fails to release a terminal when you press ctrl + c (to send sigint), and when its window is not shown and you cannot open dr again (it is saying another instance is already running), you can still fix it. 打开任务管理器(KDE的快捷键是ctrl + esc), 然后搜索名为"GUI"的进程, 然后杀死它 (发送信号9)。现在可以正常打开DR了。

Use Dolphin instead of Qt File Picker

Unfortunately, DR does not support XDG desktop portals yet. See [5] for feature request. As a workaround, you can use Andrew Shark's script Import Media via Dolphin.

Unable to start (onetbb/log4cxx)

The switch to onetbb is causing a hang with the following message:

/opt/resolve/bin/resolve
...

ActCCMessage Already in Table: Code= c005, Mode= 13, Level=  1, CmdKey= -1, Option= 0

ActCCMessage Already in Table: Code= c006, Mode= 13, Level=  1, CmdKey= -1, Option= 0

ActCCMessage Already in Table: Code= c007, Mode= 13, Level=  1, CmdKey= -1, Option= 0

ActCCMessage Already in Table: Code= 2282, Mode=  0, Level=  0, CmdKey= 8, Option= 0

PnlMsgActionStringAdapter Already in Table: Code= 615e, Mode=  0, Level=  0, CmdKey= -1, Option= 0

log4cxx: No appender could be found for logger (BtCommon).

log4cxx: Please initialize the log4cxx system properly.

...

One suggested workaround is to temporarily rename /opt/intel/oneapi/compiler/2023.0.0/linux/lib/libOpenCL.so to something else.

See the tbb is replaced by onetbb and resolve cannot start on linux forum post for further discussion.

Unable to start (libpango/glib)

Due to the way Resolve handles libraries, starting the software may fail if the system libraries differ too much from the ones resolve ships.

/opt/resolve/bin/resolve: symbol lookup error: /usr/lib64/libpango-1.0.so.0: undefined symbol: g_string_free_and_steal

To circumvent it you can force Resolve to use the systems' version instead:

$ LD_PRELOAD="/usr/lib64/libglib-2.0.so" /opt/resolve/bin/resolve

Resolve may fail to launch on the first try, but it will work on subsequent attempts.

It may be resulted in a new error:

/opt/resolve/bin/resolve: symbol lookup error: /usr/lib/libgdk_pixbuf-2.0.so.0: undefined symbol: g_task_set_static_name

As of 2024-05-23, the fix for that `g_task_set_static_name` error is (source for solution in Arch forum):

$ LD_PRELOAD="/usr/lib/libgio-2.0.so /usr/lib/libgmodule-2.0.so" /opt/resolve/bin/resolve

Another workaround is to remove a few libs from Resolve's directory. This way Resolve will be forced to use system libs, not the ones packaged with it. See also the AUR comments for the packages and the PKGBUILD itself for more information on this trick.

/opt/resolve/libs/libglib-2.0.so*
/opt/resolve/libs/libgio-2.0.so*
/opt/resolve/libs/libgmodule-2.0.so*

另见

  • 已通过测试的配置见Davinci Resolve论坛的这条帖子
  • Davinci Resolve 19编解码器的支持列表PDF
  • Here you can check if BMD released a document for a newer version, see in the Latest Support Notes column. Also, it lists the whats new notes for each release.
  • ResolveDevDoc - 关于脚本的非官方文档。Formatted with readthedocs and is prettier to read and search than in original txt file.
  • pydavinci - a reworked resolve scripting api