DaVinci Resolve

来自 Arch Linux 中文维基

Davinci Resolve(简称为DR)是一款用于视频剪辑、调色和后期处理的专有软件。

安装[编辑 | 编辑源代码]

DaVinci Resolve分别提供免费版和付费版(Studio版)。
若要获取免费版本,安装 davinci-resolveAURdavinci-resolve-betaAUR
若要获取付费版本,安装 davinci-resolve-studioAURdavinci-resolve-studio-betaAUR

DaVinci Resolve需要合适的OpenGL和OpenCL驱动才能运行。目前暂不支持开源的OpenCL驱动。注意,应当卸载不兼容的OpenCL驱动,以免导致Resolve崩溃(例:如果使用了opencl-nvidia等专有驱动,则应卸载opencl-mesa)。

目前暂不支持Intel GPU。如果使用了AMD+Intel的混合配置,可以使用Intel GPU作为主GPU,并为AMD GPU使用专有的OpenCL驱动。

OpenGL驱动表
GPU厂商 Type GPU驱动 OpenGL驱动 归档 已测试的驱动版本 是否可用于Davinci Resolve 已测试的Davinci Resolve版本 备注
AMD / ATI 开源 xf86-video-amdgpu mesa AMDGPU 22.0.0-1 是/否
取决于GPU
17.4.5-1 已分别测试于Radeon Pro W6600(可用)和RX580(不可用)。见https://gitlab.freedesktop.org/mesa/mesa/-/issues/6256
xf86-video-ati ATI 尚未测试
专有 xf86-video-amdgpu amdgpu-pro-libglAUR AMDGPU PRO 21.10_1247438-1 17.1.1 需要用progl脚本运行Resolve。使用方法见文档[损坏的链接:无效的章节]驱动github页面
Intel 开源 xf86-video-intel mesa Intel graphics
NVIDIA 开源 xf86-video-nouveau mesa Nouveau
专有 nvidia nvidia-utils NVIDIA 460.32.03-1 17.0b6-1 已测试于使用nvidia-xrun的Optimus技术笔记本。
OpenCL驱动表
GPU厂商 OpenCL驱动 已测试的驱动版本 是否可用于Davinci Resolve 已测试的Davinci Resolve版本 备注
通用(Neutral) opencl-mesa 22.0.0-1 部分可用,可视为不可用 17.4.5-1 使用效果与intel-compute-runtime相同:可以正常启动并打开项目,但是在Cut和Edit页面中无法播放时间线(即使没有视频轨道),Fairlight页面则可以播放。
Davinci Resolve需要OpenCL 1.2才能使用。Mesa 支持OpenCL 1.2, 尽管会报告为OpenCL 1.1. Overriding 带有以下参数的OpenCL版本 CLOVER_PLATFORM_VERSION_OVERRIDE=1.2 CLOVER_DEVICE_VERSION_OVERRIDE=1.2 CLOVER_DEVICE_CLC_VERSION_OVERRIDE=1.2 不会改变这一情况。
已测试于RX580.
AMD opencl-amdAUR 21.40.2.1350682-3 17.4.3 已测试于Radeon Pro W6600
Intel intel-compute-runtime 21.21.19914-1 部分可用,可视为不可用 17.2.1 可以正常启动并打开项目,但是在Cut和Edit页面中无法播放时间线(即使没有视频轨道),Fairlight页面则可以播放。
已测试于Intel酷睿i7-8700 CPU.
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-resolveAUR的下载链接可能无法使用,请前往 https://www.blackmagicdesign.com/support/download/8f1bf6e1fc9641718a32d2ba1e2cf161/Linux 下载安装包后放置在 .cache/yay/davinci-resolve 后再尝试使用 AUR 安装。

DaVinci Resolve检查器[编辑 | 编辑源代码]

可以通过运行 davinci-resolve-checker 脚本以确认自己的配置是否能够正常运行Davinci Resolve。如果配置良好,它将会输出以下内容:

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

BlackMagic采集卡[编辑 | 编辑源代码]

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

提示与技巧[编辑 | 编辑源代码]

减少安装时间[编辑 | 编辑源代码]

因为二进制文件很大,压缩Davinci Resolve软件包需要大量时间。更多信息见Makepkg#Use other compression algorithms

使用便携版软件[编辑 | 编辑源代码]

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

使用自动化脚本[编辑 | 编辑源代码]

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

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

重新映射键盘和鼠标滚轮以滚动和缩放[编辑 | 编辑源代码]

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

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

在软件中无法重新映射这些快捷键,见[1]。若要解决此问题,可以使用IMWheel工具。它能只为正则表达式中的程序重新映射快捷键。

使用以下配置:

~/.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

疑难解答[编辑 | 编辑源代码]

日志存储位置[编辑 | 编辑源代码]

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

窗口没有标题栏[编辑 | 编辑源代码]

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

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

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格式[编辑 | 编辑源代码]

Linux的免费版Davinci Resolve不支持MP4容器和AAC音频流(MP4使用的音频格式),因此MP4视频无法显示预览图,回放时AAC音频也没有声音。

免费版DR的解决方案[编辑 | 编辑源代码]

需要将MP4视频转为其他格式才能使用,转换的命令格式如下:

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

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

DR Studio的解决方案[编辑 | 编辑源代码]

需要将MP4视频的音频导出并转换为MP3(MP3空间占用比WAV小,并且DR支持MP3格式,见下文),然后将音频导入并和视频轨道重新组合在一起才能使用音频。

可以使用Andrew Shark编写的mp4 audio compounder.py脚本以自动化此操作。

There is no yet (as of February 2022) a document listing supported codecs for DR 17, but DR 17.1 and DR studio 17.4.3 both supports mp3 files. However, for some reason, integrating mp3 audio to mov file is not playing. 官方目前(2022年2月)还没有发布DR 17的编解码器支持列表,但DR 17.1和DR studio 17.4.3都支持MP3文件,然而某些原因导致MP3在集成到MOV视频后无法播放。

高分辨率支持[编辑 | 编辑源代码]

为了兼容高分辨率显示器,请设置以下环境变量:

export QT_DEVICE_PIXEL_RATIO=2
export QT_AUTO_SCREEN_SCALE_FACTOR=true

来源:https://forum.blackmagicdesign.com/viewtopic.php?f=21&t=84614&p=469009&hilit=hidpi#wrapper

关于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)。

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 you need to redirect it to use PulseAudio 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:

export __NV_PRIME_RENDER_OFFLOAD=1
export __GLX_VENDOR_LIBRARY_NAME=nvidia

与libcrypto.so.1.0.0有关的静默崩溃[编辑 | 编辑源代码]

可能出现的崩溃信息:

~/.local/share/DaVinciResolve/logs/ResolveDebug.txt
...

==== [CRASH DUMP] ====

Please send this to support:

#TIME Sat Jan 23 19:42:20 2021 - Uptime 00:00:08 (hh:mm:ss)
#PROGRAM_NAME DaVinci Resolve v16.2.8.005 (Linux/Clang)

/opt/resolve/bin/resolve() [0x550e0a9]
/opt/resolve/bin/resolve() [0x550d89a]
/usr/lib/libpthread.so.0(+0x140f0) [0x7f80d90640f0]
/usr/lib/libc.so.6(+0x15df7e) [0x7f80d6af5f7e]
/opt/resolve/bin/../libs/libcrypto.so.1.0.0(lh_insert+0xad) [0x7f80d8aa2e4d]
/opt/resolve/bin/../libs/libcrypto.so.1.0.0(OBJ_NAME_add+0x65) [0x7f80d89f1855]
...

/opt/resolve/libs/libcrypto.so.1.0.0替换为/usr/lib/libcrypto.so.1.0.0

# cp /usr/lib/libcrypto.so.1.0.0 /opt/resolve/libs/libcrypto.so.1.0.0

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

Error while loading shared libraries: libcrypt.so.1[编辑 | 编辑源代码]

安装libxcrypt-compat以解决此问题。

杀死挂起进程[编辑 | 编辑源代码]

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了。

另见[编辑 | 编辑源代码]

  • 已通过测试的配置见Davinci Resolve论坛的这条帖子
  • Davinci Resolve 16编解码器的支持列表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.