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.