-
-
Notifications
You must be signed in to change notification settings - Fork 12.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Package DaVinci Resolve #94032
Comments
This is (the slightly more involved than usual) approach taken by the AUR package to download the program without user intervention. |
Yes! |
Is anyone aware of whose phone number that is in the AUR package? Should we just copy the info there blindly, or? |
I've got a working { pkgs ? import <nixpkgs> {} }:
with pkgs;
stdenv.mkDerivation rec {
pname = "davinci-resolve";
version = "16.2.7-1";
# TODO: implement
src = runCommandLocal "${pname}-src" rec {
outputHashMode = "recursive";
outputHashAlgo = "sha256";
outputHash = "1bbj7ahz5gzcj5sh1a57a5xajbzyq6q71rahi49w3vwpk46bq3sw";
impureEnvVars = lib.fetchers.proxyImpureEnvVars;
nativeBuildInputs = [ curl gnused unzip ];
# ENV VARS
SSL_CERT_FILE = "${cacert}/etc/ssl/certs/ca-bundle.crt";
DOWNLOADID = "9b15a70f5ce1418686be3479612f1134";
REFERID = "b86a2a4c7a3b4ebfafcc6765f7e3d3a5";
SITEURL = "https://www.blackmagicdesign.com/api/register/us/download/${DOWNLOADID}";
USERAGENT = builtins.concatStringsSep " " [
"User-Agent: Mozilla/5.0 (X11; Linux ${targetPlatform.platform.kernelArch})"
"AppleWebKit/537.36 (KHTML, like Gecko)"
"Chrome/77.0.3865.75"
"Safari/537.36"
];
REQJSON = builtins.concatStringsSep "" [
''{''
'' "firstname": "Arch", ''
'' "lastname": "Linux", ''
'' "email": "someone@archlinux.org", ''
'' "phone": "202-555-0194", ''
'' "country": "us", ''
'' "state": "New York", ''
'' "city": "AUR", ''
'' "product": "DaVinci Resolve" ''
''}''
];
} ''
REQJSON="$( printf '%s' "$REQJSON" | sed 's/[[:space:]]\+/ /g')"
USERAGENT="$(printf '%s' "$USERAGENT" | sed 's/[[:space:]]\+/ /g')"
RESOLVEURL=$(curl \
-s \
-H 'Host: www.blackmagicdesign.com' \
-H 'Accept: application/json, text/plain, */*' \
-H 'Origin: https://www.blackmagicdesign.com' \
-H "$USERAGENT" \
-H 'Content-Type: application/json;charset=UTF-8' \
-H "Referer: https://www.blackmagicdesign.com/support/download/$REFERID/Linux" \
-H 'Accept-Encoding: gzip, deflate, br' \
-H 'Accept-Language: en-US,en;q=0.9' \
-H 'Authority: www.blackmagicdesign.com' \
-H 'Cookie: _ga=GA1.2.1849503966.1518103294; _gid=GA1.2.953840595.1518103294' \
--data-ascii "$REQJSON" \
--compressed \
"$SITEURL")
curl \
--retry 3 --retry-delay 3 \
-H "Host: sw.blackmagicdesign.com" \
-H "Upgrade-Insecure-Requests: 1" \
-H "$USERAGENT" \
-H "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8" \
-H "Accept-Language: en-US,en;q=0.9" \
--compressed \
"$RESOLVEURL" \
> resolve.zip
mkdir -p $out
unzip resolve.zip -d $out
'';
} |
nothing to add, just could really use this! |
@lambdadog a quick search brings up this: https://fakenumber.org/generator-us/202-555-0194
|
Had a go at patching the installer binary. What's also strange is, that The file command was run on the unpatched file. Does anyone have an idea what's still going wrong? Here's the derivation I'm building: { stdenv
, lib
, cacert
, curl
, fuse
, glib
, glibc
, gnused
, runCommandLocal
, targetPlatform
, unzip
, zlib
}:
stdenv.mkDerivation rec {
pname = "davinci-resolve";
version = "16.2.7-1";
src = runCommandLocal "${pname}-src"
rec {
outputHashMode = "recursive";
outputHashAlgo = "sha256";
outputHash = "1bbj7ahz5gzcj5sh1a57a5xajbzyq6q71rahi49w3vwpk46bq3sw";
impureEnvVars = lib.fetchers.proxyImpureEnvVars;
nativeBuildInputs = [ curl gnused unzip ];
# ENV VARS
SSL_CERT_FILE = "${cacert}/etc/ssl/certs/ca-bundle.crt";
DOWNLOADID = "9b15a70f5ce1418686be3479612f1134";
REFERID = "b86a2a4c7a3b4ebfafcc6765f7e3d3a5";
SITEURL = "https://www.blackmagicdesign.com/api/register/us/download/${DOWNLOADID}";
USERAGENT = builtins.concatStringsSep " " [
"User-Agent: Mozilla/5.0 (X11; Linux ${targetPlatform.platform.kernelArch})"
"AppleWebKit/537.36 (KHTML, like Gecko)"
"Chrome/77.0.3865.75"
"Safari/537.36"
];
REQJSON = builtins.concatStringsSep "" [
''{''
'' "firstname": "Arch", ''
'' "lastname": "Linux", ''
'' "email": "someone@archlinux.org", ''
'' "phone": "202-555-0194", ''
'' "country": "us", ''
'' "state": "New York", ''
'' "city": "AUR", ''
'' "product": "DaVinci Resolve" ''
''}''
];
} ''
REQJSON="$( printf '%s' "$REQJSON" | sed 's/[[:space:]]\+/ /g')"
USERAGENT="$(printf '%s' "$USERAGENT" | sed 's/[[:space:]]\+/ /g')"
RESOLVEURL=$(curl \
-s \
-H 'Host: www.blackmagicdesign.com' \
-H 'Accept: application/json, text/plain, */*' \
-H 'Origin: https://www.blackmagicdesign.com' \
-H "$USERAGENT" \
-H 'Content-Type: application/json;charset=UTF-8' \
-H "Referer: https://www.blackmagicdesign.com/support/download/$REFERID/Linux" \
-H 'Accept-Encoding: gzip, deflate, br' \
-H 'Accept-Language: en-US,en;q=0.9' \
-H 'Authority: www.blackmagicdesign.com' \
-H 'Cookie: _ga=GA1.2.1849503966.1518103294; _gid=GA1.2.953840595.1518103294' \
--data-ascii "$REQJSON" \
--compressed \
"$SITEURL")
curl \
--retry 3 --retry-delay 3 \
-H "Host: sw.blackmagicdesign.com" \
-H "Upgrade-Insecure-Requests: 1" \
-H "$USERAGENT" \
-H "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8" \
-H "Accept-Language: en-US,en;q=0.9" \
--compressed \
"$RESOLVEURL" \
> resolve.zip
mkdir -p $out
unzip resolve.zip -d $out
'';
dontStrip = true;
rpath = (lib.makeLibraryPath [ fuse glib glibc zlib ]);
installPhase = ''
mkdir -p $out/bin
cp DaVinci_Resolve_16.2.7_Linux.run $out/bin
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" $out/bin/DaVinci_Resolve_16.2.7_Linux.run
patchelf --set-rpath ${rpath} $out/bin/DaVinci_Resolve_16.2.7_Linux.run
'';
} |
Same problem here: the installer quits with |
The AUR package seems to extract the files directly from the installer instead of executing it:
...but I'm not sure how that's supposed to work, since it is not an archive file? when I do it on my side a get an expected:
I think I'm missing something here... |
Nevermind, |
Now I'm able to start
|
Seems like it is a curl related bug for some reason: https://bbs.archlinux.org/viewtopic.php?id=261752 |
Can you post your nix file? Just curious what you did to get it to work(ish) @timothee-haudebourg |
Unfortunately I'm fairly new to NixOS so I don't know how to write a package. For now I'm doing it "by hand". I just have a nix file to setup a shell with all the dependencies: { pkgs ? import <nixpkgs> {} }:
with pkgs; mkShell {
buildInputs = [
libGLU
libGL
xorg.libXxf86vm
xorg.libSM
xorg.libXext
xorg.libICE
xorg.libX11
xorg.xkeyboardconfig
freetype
libxml2
librsvg
libuuid
expat
alsaLib
libtool
bzip2
ocl-icd
stdenv.cc.cc.lib
];
QT_XKB_CONFIG_ROOT="${xorg.xkeyboardconfig}/share/X11/xkb";
} I also use the result of the following expression to configure the RPATH (I'm not patching, I'm using the with pkgs; lib.makeLibraryPath [ libGLU libGL xorg.libXxf86vm xorg.libSM xorg.libXext xorg.libICE xorg.libX11 freetype libxml2 librsvg libuuid expat alsaLib libtool bzip2 ocl-icd stdenv.cc.cc.lib ] This gives my an environment in which I can patch and execute |
I tried with the latest DaVinci Resolve 16, and there is still the
|
random thought here, but maybe it would be easier to package .deb version resolve rather than the original davinci release? https://www.danieltufvesson.com/makeresolvedeb |
@alexanderwatanabe I'd be surprised if that didn't use the same functionality of being able to unpack the installer using |
Looking at the bash script they use to turn the blackmagic download into a .deb, it looks like since ver15 the file has been a self-extracting archive? Only version 15 uses "xorriso" to extract the package? edit: sorry I think I confused the installer for the file you download from blackmagic. leaving this up in case that's not the case >_< |
re: the bsdtar issues, it looks like the updated version of the AUR package is just running the installer binary with some flags. Obviously this becomes more difficult using Nix, but definitely shouldn't be impossible if we setup As a result don't think not being able to use bsdtar should be much of an issue for further progress. |
As proposed I started to create a derivation using the installer of Davinci Resolve. But I got stuck because patchelf is complaining about a library Davinci is shipped with:
Has anyone an idea how to fix this? My current state: davinci-resolve/default.nix{ stdenv
, lib
, cacert
, curl
, runCommandLocal
, targetPlatform
, unzip
, appimage-run
, autoPatchelfHook
, addOpenGLRunpath
, libGLU
, alsaLib
, xlibs
}:
stdenv.mkDerivation rec {
pname = "davinci-resolve";
version = "17.2.1";
nativeBuildInputs = [ unzip appimage-run autoPatchelfHook addOpenGLRunpath ];
# Pretty sure, there are missing dependencies ...
buildInputs = [ alsaLib libGLU xlibs.libXxf86vm ];
src = runCommandLocal "${pname}-src.zip"
rec {
outputHashMode = "recursive";
outputHashAlgo = "sha256";
outputHash = "1wp45g21h76fymsw9qygqmaqbqpnzfb79b4sk5g5nsriyns09qz8";
impureEnvVars = lib.fetchers.proxyImpureEnvVars;
nativeBuildInputs = [ curl ];
# ENV VARS
SSL_CERT_FILE = "${cacert}/etc/ssl/certs/ca-bundle.crt";
DOWNLOADID = "3256e3339ca7410bae00f875716512b5";
REFERID = "7bdd5d639e6b408ea98ac17504ff94f7";
SITEURL = "https://www.blackmagicdesign.com/api/register/us/download/${DOWNLOADID}";
USERAGENT = builtins.concatStringsSep " " [
"User-Agent: Mozilla/5.0 (X11; Linux ${targetPlatform.linuxArch})"
"AppleWebKit/537.36 (KHTML, like Gecko)"
"Chrome/77.0.3865.75"
"Safari/537.36"
];
REQJSON = ''
{
"firstname": "Arch",
"lastname": "Linux",
"email": "someone@archlinux.org",
"phone": "202-555-0194",
"country": "us",
"state": "New York",
"city": "AUR",
"product": "DaVinci Resolve"
}
'';
} ''
RESOLVEURL=$(curl \
-s \
-H 'Host: www.blackmagicdesign.com' \
-H 'Accept: application/json, text/plain, */*' \
-H 'Origin: https://www.blackmagicdesign.com' \
-H "$USERAGENT" \
-H 'Content-Type: application/json;charset=UTF-8' \
-H "Referer: https://www.blackmagicdesign.com/support/download/$REFERID/Linux" \
-H 'Accept-Encoding: gzip, deflate, br' \
-H 'Accept-Language: en-US,en;q=0.9' \
-H 'Authority: www.blackmagicdesign.com' \
-H 'Cookie: _ga=GA1.2.1849503966.1518103294; _gid=GA1.2.953840595.1518103294' \
--data-ascii "$REQJSON" \
--compressed \
"$SITEURL")
curl \
--retry 3 --retry-delay 3 \
-H "Host: sw.blackmagicdesign.com" \
-H "Upgrade-Insecure-Requests: 1" \
-H "$USERAGENT" \
-H "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8" \
-H "Accept-Language: en-US,en;q=0.9" \
--compressed \
"$RESOLVEURL" \
> $out
'';
# The unpack phase won't generate a directory
setSourceRoot = ''
sourceRoot=$PWD
'';
installPhase = ''
runHook preInstall
export HOME=$PWD/home
mkdir -p $HOME
mkdir -p $out
appimage-run ./DaVinci_Resolve_${version}_Linux.run -i -y -n -C $out
runHook postInstall
'';
dontStrip = true;
postFixup = ''
for program in $out/bin/*; do
isELF "$program" || continue
addOpenGLRunpath "$program"
done
''
} |
That problem has been encountered before and seems to be a known issue with |
So, waiting for a working Sry for dumb questions but I'm very new to nix. |
There are at least two possible workarounds : using buildFHS or similar to fake a FHS distribution (no more patchelf), this post apparently had a working solution back then https://discourse.nixos.org/t/fixup-phase-cant-find-libcuda-so-1-build-abort-how-to-provide-dummy-libcuda-so-1/9541/8 The second solution is maybe to use a patched patchelf that keeps more space using the values provided here NixOS/patchelf#62 (comment) |
@jue89 the patchelf issue seems to be fixed. Can you try that again? |
According to fakenumber.org it's a fake phone number, so I think you could probably copy it (or another number from that site) without any problems. I could be wrong, though! |
Just gave this a try. Using @jue89's derivation without the auto-patchelf hook together with buildFHSUserenv (and a wrapper to manually add davinci-resolve itself to
Looks as if it either can't open or create a file that it expects to be present, though I'm not sure why – it should have write permissions, but then I'm not very familiar with any of these c++ libs. Maybe it needs to be executed in some pre-defined directory? As for patchelf: I wanted to try using it with the version from patchelf My current state: { stdenv
, lib
, cacert
, curl
, runCommandLocal
, targetPlatform
, unzip
, appimage-run
, autoPatchelfHook
, addOpenGLRunpath
, libGLU
, alsaLib
, xlibs
, buildFHSUserEnv
, bash
, writeText
}:
let davinci = ();# jue89's derivation goes here; I cut it to keep things short(ish)
in
buildFHSUserEnv {
name = "davinci-resolve";
targetPkgs = pkgs: with pkgs; [
librsvg libGLU libGL xlibs.libICE xlibs.libSM xlibs.libXxf86vm
udev opencl-headers alsa-lib
xlibs.libX11 xlibs.libXext expat
zlib libuuid bzip2 libtool ocl-icd
];
runScript = "${bash}/bin/bash ${
writeText "davinci-wrapper"
''cd /tmp; echo $PWD; LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${davinci}/libs ${davinci}/bin/resolve''
}";
} |
your crashlog mentions a relative path Here's the desktop file from ArchLinux:
indeed it specifies
However on ArchLinux, I can actually just run |
I mean, in the derivation create a symlink like `ln -s /var/resolve/log $out/log`, and then create the folder `/var/resolve/log`, either manually or via a script. That way, resolve will run from inside the nix store, it's just that `/nix/store/…resolve…/log` will point to a writable path.
|
I have some progress in davinci resolve: { stdenv
, lib
, cacert
, curl
, runCommandLocal
, targetPlatform
, unzip
, appimage-run
, addOpenGLRunpath
, libGLU
, alsaLib
, xlibs
, buildFHSUserEnv
, bash
, writeText
, ocl-icd
, xkeyboard_config
, glib
, libarchive
}:
let
davinci = (
stdenv.mkDerivation rec {
pname = "davinci-resolve";
version = "17.4.1";
nativeBuildInputs = [ unzip appimage-run addOpenGLRunpath ];
# Pretty sure, there are missing dependencies ...
buildInputs = [ alsaLib libGLU xlibs.libXxf86vm ];
src = runCommandLocal "${pname}-src.zip"
rec {
outputHashMode = "recursive";
outputHashAlgo = "sha256";
outputHash = "sha256-FLGX9/FW3SU9kTSYsiwSb4KvzJOlkc6qPswAHqZ9Wz8=";
impureEnvVars = lib.fetchers.proxyImpureEnvVars;
nativeBuildInputs = [ curl ];
# ENV VARS
SSL_CERT_FILE = "${cacert}/etc/ssl/certs/ca-bundle.crt";
DOWNLOADID = "46b47253f7974ba0a0e5ba7bc66786f2";
REFERID = "7421f21592e34ea3ab84b448ab51a666";
SITEURL = "https://www.blackmagicdesign.com/api/register/us/download/${DOWNLOADID}";
USERAGENT = builtins.concatStringsSep " " [
"User-Agent: Mozilla/5.0 (X11; Linux ${targetPlatform.linuxArch})"
"AppleWebKit/537.36 (KHTML, like Gecko)"
"Chrome/77.0.3865.75"
"Safari/537.36"
];
REQJSON = ''
{
"firstname": "Arch",
"lastname": "Linux",
"email": "someone@archlinux.org",
"phone": "202-555-0194",
"country": "us",
"state": "New York",
"city": "AUR",
"product": "DaVinci Resolve"
}
'';
} ''
RESOLVEURL=$(curl \
-s \
-H 'Host: www.blackmagicdesign.com' \
-H 'Accept: application/json, text/plain, */*' \
-H 'Origin: https://www.blackmagicdesign.com' \
-H "$USERAGENT" \
-H 'Content-Type: application/json;charset=UTF-8' \
-H "Referer: https://www.blackmagicdesign.com/support/download/$REFERID/Linux" \
-H 'Accept-Encoding: gzip, deflate, br' \
-H 'Accept-Language: en-US,en;q=0.9' \
-H 'Authority: www.blackmagicdesign.com' \
-H 'Cookie: _ga=GA1.2.1849503966.1518103294; _gid=GA1.2.953840595.1518103294' \
--data-ascii "$REQJSON" \
--compressed \
"$SITEURL")
curl \
--retry 3 --retry-delay 3 \
-H "Host: sw.blackmagicdesign.com" \
-H "Upgrade-Insecure-Requests: 1" \
-H "$USERAGENT" \
-H "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8" \
-H "Accept-Language: en-US,en;q=0.9" \
--compressed \
"$RESOLVEURL" \
> $out
'';
# The unpack phase won't generate a directory
setSourceRoot = ''
sourceRoot=$PWD
'';
installPhase = ''
runHook preInstall
export HOME=$PWD/home
mkdir -p $HOME
mkdir -p $out
appimage-run ./DaVinci_Resolve_${version}_Linux.run -i -y -n -C $out
mkdir -p $out/{configs,DolbyVision,easyDCP,Fairlight,GPUCache,logs,Media,"Resolve Disk Database",.crashreport,.license,.LUT}
runHook postInstall
'';
dontStrip = true;
postFixup = ''
for program in $out/bin/*; do
isELF "$program" || continue
addOpenGLRunpath "$program"
done
for program in $out/libs/*; do
isELF "$program" || continue
if [[ "$program" != *"libcudnn_cnn_infer"* ]];then
echo $program
addOpenGLRunpath "$program"
fi
done
'';
}
);
in
buildFHSUserEnv {
name = "davinci-resolve";
targetPkgs = pkgs: with pkgs; [
librsvg
libGLU
libGL
xlibs.libICE
xlibs.libSM
xlibs.libXxf86vm
udev
opencl-headers
alsa-lib
xlibs.libX11
xlibs.libXext
expat
zlib
libuuid
bzip2
libtool
ocl-icd
glib
libarchive
];
runScript = "${bash}/bin/bash ${
writeText "davinci-wrapper"
''
export QT_XKB_CONFIG_ROOT="${xkeyboard_config}/share/X11/xkb"
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${davinci}/libs
${davinci}/bin/resolve
''
}";
} |
The package @tfmoraes shared seems to work well with Davinci opening and displaying the project select screen, however it crashes soon after that with the following appearing in
I haven't had much luck debugging the segfault so far. Any guidance is appreciated. 🙂 |
I can confirm the findings of @garrett-hopper ! Exactly the same behavior. At least it is reproducible 😉 |
Also seeing the same but in cat ResolveDebug.txt | grep ERROR 0x7f2d23a826c0 | GPUDetect | ERROR | 2021-12-22 12:44:04,229 | X11 logs not found.
0x7f2d23a826c0 | GPUDetect | ERROR | 2021-12-22 12:44:04,238 | No Main Display GPU found and no monitors found to match, defaulting to gpu:3f233b50.1d30eeab.
0x7f2cc97fe640 | IO | ERROR | 2021-12-22 12:44:04,535 | The selected Nvidia GPU has no decode capability
0x7f2c902a7640 | SyManager | ERROR | 2021-12-22 12:44:04,612 | Failed to connect to panel socket
0x7f2c902a7640 | SyManager | ERROR | 2021-12-22 12:44:04,612 | DRIVER: open /var/tmp/davinci_socket failed
0x7f2c902a7640 | SyManager | ERROR | 2021-12-22 12:44:06,314 | Failed to connect to panel socket
0x7f2c664d2640 | UI | ERROR | 2021-12-22 12:44:08,273 | UiAutoUpdateController: Failed to get response from server (responseCode:2) (httpStatus:-1) (response:)
0x7f2d23a826c0 | UI | ERROR | 2021-12-22 12:44:09,641 | Failed to find text 'Apple ProRes' in combo-box
0x7f2d23a826c0 | UI | ERROR | 2021-12-22 12:44:09,649 | Failed to find text 'Apple ProRes' in combo-box
0x7f2d23a826c0 | UI | ERROR | 2021-12-22 12:44:09,649 | Failed to find text 'Apple ProRes' in combo-box
0x7f2d23a826c0 | UI | ERROR | 2021-12-22 12:44:09,650 | Failed to find text 'Apple ProRes' in combo-box
0x7f2cad5ae640 | CrashReport | ERROR | 2021-12-22 12:44:09,991 | Compress() : Failed to add file:/home/*********/.local/share/DaVinciResolve/configs/UI.preset to archive. Im assuming panel socket is in reference to the physical panel one can get from Blackmagic. I see some udev stuff sprinkled throughout the AUR PKGBUILD such as this: prepare()
{
# Remove udev rules (The official installer does not remove these files. This leads to the conflict "exists in the file system".)
confiles=$(find /usr/lib/udev/rules.d -name 75-davincipanel.rules -o -name 75-sdx.rules 2> /dev/null | awk -F/ '{print $NF}'
find /opt/resolve/configs -name log-conf.xml -o -name config.dat 2> /dev/null | awk -F/ '{print $NF}'
)
if [ "${confiles}" ]; then
echo -e "\033[1m==> The file(s) $(echo ${confiles} | xargs | sed 's/ /, /g') already exist in your filesystem.\033[0m"
echo -e "\033[1m==> This can lead to a conflict and the installation will fail.\033[0m"
echo -e "\033[1m==> Please restart the installation with the --overwrite option.\033[0m"
fi
} |
@tfmoraes can you create a draft PR to make testing easier? Has anyone tested it with AMD GPU? |
@davidak I have no experience testing nixpkgs versions/branches and overall little Nix knowledge, but if someone can give me a step-by-step I'm happy to give it a try on my recent AMD Thinkpad with its comparatively powerful integrated graphics. |
@s-ol Here is an example init PR for a new application/package - func init I recommend taking a look at the files changed as that covers the basic requirements. Make sure you add the package into the In your PR I would recommend giving credit to those that posted most the code here ( e.g. tfmoraes ) and including a link to this issue so to connect it to the PR for visibility. Highly recommend reviewing the Contributing Guide Lastly, this To test building the application in your PR you would simply go to the root of the repository and run Feel free to correct anything I missed @davidak Edit: Also, if you just want to do this to test on a AMD GPU then ignore the maintainer/meta block instructions I added. I made the assumption you were asking how to contribute but then I realized you might have just been asking for instructions on how to build the package locally.. |
I can reproduce the crash. The project selection was shown, but when i create a new project it hangs and i see the crash in logs.
Here is the full ResolveDebug.txt Maybe this is relevant?
I added |
Im seeing waveforms and getting audio for some of my MOV h264 videos. MKV is commonly H264 and reading up some on Davinci for linux I see there is a lack of support for H264 in the free version, only in the studio version. Is that the codec your videos are using? @davidak |
@davidak thanks for submitting the PR to add Davince Resolve! |
Seems to be working as expected for me. Nvidia GPU. Had to transcode my h264 videos to DNxHD - ffmpeg -y -i A001_004_20211217.MOV -f mov -vcodec dnxhd -vf "scale=1920:1080,fps=30" -profile:v dnxhr_hq 004_dnxhd.MOV I cant speak for performance as I'm remotely accessing my nix machine but it seems pretty good. Also, using gausian blur effect to hide the video content so.. I can confirm thats working as well 😄 Hats off you two and the amazing work! @tfmoraes @davidak Edit: another note, I was seeing online that AAC isnt supported for Linux so that might be why you weren't getting audio. Might need to transcode it.
|
@jshcmpbll oh wow, that's great! Although I guess it can't be considered fully ready since h264 doesnt work |
@flexagoon Unfortunately thats expected for the free version 😞 I guess paid studio ships with support for h264.. Im guessing its something to do with licensing and MIGHT be fixed in the future but thats just speculation (and a little hope) from me.. Something to note, H264 is a terrible codec for video editing anyways and it would be better to work off mezzanine codecs but that workflow isn't the easiest for those wanting to quickly get videos from their cameras native codec to the editor.. |
@jshcmpbll oh wait, I didn't see that it's a limitation of the free version and not a NixOS issue. Does this mean that the packaging is finally complete and the PR can be submitted now? |
@flexagoon I think it's pretty close. The open PR right now will need a maintainer added and maybe some other tweaks needed for AMD support.. not sure but hopefully @s-ol can test it out with their AMD GPU and give us an update after the holidays. 🤞 I'll do some further testing on Monday with it to see if there are any issues to report |
Using Resolve with an AMD GPU on Linux is… complicated at the moment. ROCm currently does not work with it and has not for a while; one needs to use the AMDGPU-PRO driver for OpenCL, which (last I checked) isn't in Nixpkgs. Fortunately the recent release seems to have made packaging it easier if someone wants to do that in the future, but I don't think it's worth holding up this PR for. FWIW, I did try to run the PR myself (I have an RX 6800). The program did not start unfortunately. (very incomplete) NixOS configuration (nixos-unstable)
Output of clinfo
ResolveDebug.txt
I would be happy to continue testing stuff though, please let me know if there's anything else you'd like me to try. P.S. @s-ol, Resolve is highly demanding and so I'd be really surprised if you manage to get it working with integrated graphics, but don't let me discourage you from trying if you want to give it a go! (I could be wrong after all!) |
The free version supports H.264 just fine. It's H.265 support that requires the Studio version. If H.264 does not work out of the box, then this is definitely a problem with the way Resolve is packaged. |
The supported codec list for Resolve 16 (I can't seem to find a supported codec list for version 17 for some reason) lists H.264 as Studio only, and I remember this being a limitation back when I used it on Arch. Was this changed in version 17? |
Yeah, I would LOVE to be wrong but I haven't seen anything online saying it supports h264 - this article also says it is not supported Now that I'm posting the link to it I see the original title was for 15 and it was just updated.. maybe the writer was unaware of the change too? Hoping @peti has personal experience with it because that would be awesome |
Yeah, the H.264 limitation is Linux only for some reason. |
I found out what's going on. According to https://beginnersapproach.com/davinci-resolve-frequently-asked-questions/#DaVinci-Resolve-Use-MP4, the free version of Resolve supports H.264, like I thought, but only on MacOS and Windows! The Linux version does not support h.264, indeed. |
Thanks @davidak for the PR, that made it quite easy to test. It builds and launches fine, but once the loading popup reaches "ready" it glitched out the GPU somehow, here's dmesg from when it started:
At this point my sway/wayland session was also mostly unresponsive. I switched to a different virtual console. I noticed that there it would now also periodically spit out these messages (as in dmesg), number of "callbacks surpressed" and lines varying:
Once I killed |
Huh, I just started it again to capture the resolve output log, and this time it launched right away without problems. Before I even imported any clips, I got a "GPU Memory full" message - that's integrated graphics for you I guess. Start of DebugLog.txt
later part that repeats often
As for video decoding, I'm not sure how to check whether hardware acceleration is working properly. On some starts it does decode a DNxHD video, but then crash shortly after seeking around in it (bad crash - screen freezes, have to reboot computer). |
I have updated the PR to the latest version 17.4.3! The issues for me are still the same. I tested with ProRes 422 videos recorded with Atomos Ninja V and i just see a still frame with glitched colors. I also get the "Your GPU memory is full." error. My GPU has 8 GB VRAM. That issue might be related to the open source amdgpu driver.
There is a PR that needs testers #151019 I opened a document to get some structure into the testing results: https://pad.nixnet.services/5sPJSxnyTm65W9dtku1sfg When the package works as expected, we should also package the studio version in a modular way. Maybe we can get a license key and dongle for free for the maintainers to test it. Also, the license is quiet cheap for what you get. Totally worth it if you regularly use it or use it professionally. There are licenses on ebay for about 200 euro and 265 euro is the cheapest offer from online stores (https://geizhals.de/blackmagic-design-davinci-resolve-studio-17-deutsch-pc-a2440969.html). At some point this year it was at 200 euro! There is also the bundle with the SPEED EDITOR controller https://www.toneart-shop.de/blackmagic-design-davinci-resolve-speed-editor.html?utm_source=geizhals&utm_medium=cpc&utm_campaign=geizhals. I might buy a license when i decide to use it. |
This discussion should be moved to #152113. |
Project description
DaVinci Resolve 16 is the world’s only solution that combines professional 8K video editing, color correction, visual effects and audio post production all in one software tool!
It is known to be hard to setup and currently only AUR has packaged it, so we can really solve a problem for many people and show the power of Nix.
https://repology.org/projects/?search=davinci-resolve&maintainer=&category=&inrepo=¬inrepo=&repos=&families=&repos_newest=&families_newest=
Metadata
The text was updated successfully, but these errors were encountered: