Em seg, 2021-09-06 às 18:39 +0200, Fulbert escreveu:
> Hello,
> 
> shotcut 21.06.29 (guix ce65f2b) appears to have missing bin files.
> When 
> trying to export a video, the status of the task is "failed" inside
> the 
> GUI, and below is the debug message on the terminal.
> 
> [Debug  ] <MeltJob::start> 
> "/gnu/store/qz8nr42ax7k3v0cysmh6afhmy93vvj82-shotcut-
> 21.06.29/bin/melt-7 
> -verbose -progress2 -abort xml:%2Ftmp%2Fshotcut-xNVrrX.mlt"
> [Info   ] <AbstractJob::onFinished> job failed with 127
> 
> And here is the content of the bin directory :
> 
> $ ls -la $(dirname $(realpath $(which shotcut)))
> total 3248
> dr-xr-xr-x 2 root root    4096  1 janv.  1970 .
> dr-xr-xr-x 4 root root    4096  1 janv.  1970 ..
> -r-xr-xr-x 2 root root    1840  1 janv.  1970 shotcut
> -r-xr-xr-x 2 root root    1401  1 janv.  1970 .shotcut-real
> -r-xr-xr-x 2 root root 3308600  1 janv.  1970 ..shotcut-real-real
> 
> 
Hello,

Thanks for the report and sorry for the late response, I only found
this issue today.

I had a look at the Shotcut source code and it does seem to copy files
from other projects to its bin directory [1] and read the melt-7
executable from a variable called "shotcutPath" [2].

I am attaching a tested patch that symlinks these executables to the
shotcut bin folder. It was based on the update to 21.10.31 at 51898 but
should work in the current version.

I also removed other variables in the 'wrap-executable phase that don't
seem to be used. MLT_PREFIX is only read in Darwin and PATH was set
only for ffmpeg, but in the patch ffmpeg is symlinked instead.

[1]
https://github.com/mltframework/shotcut/blob/af9f47882d64eb15105559e0729bc7b1e337a9bf/scripts/build-shotcut.sh#L1874

[2]
https://github.com/mltframework/shotcut/blob/ef7830846d03fb3557e8780057608cd9f1c8bd77/src/jobs/meltjob.cpp#L97
From 19fac8591375a5fb99c40d546dacd519a0a438c2 Mon Sep 17 00:00:00 2001
From: Vinicius Monego <mon...@posteo.net>
Date: Tue, 16 Nov 2021 22:33:14 -0300
Subject: [PATCH] gnu: shotcut: Find ffmpeg and mlt at runtime.

* gnu/packages/video.scm (shotcut)[arguments]<:#phases>: Symlink ffmpeg and
mlt binaries to the Shotcut bin folder in the 'wrap-executable phase.
---
 gnu/packages/video.scm | 17 ++++++++++++-----
 1 file changed, 12 insertions(+), 5 deletions(-)

diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm
index 7145af58f1..2307583e8d 100644
--- a/gnu/packages/video.scm
+++ b/gnu/packages/video.scm
@@ -4813,16 +4813,23 @@ transitions, and effects and then export your film to many common formats.")
                     (frei0r (assoc-ref inputs "frei0r-plugins"))
                     (ffmpeg (assoc-ref inputs "ffmpeg"))
                     (jack (assoc-ref inputs "jack"))
+                    (mlt (assoc-ref inputs "mlt"))
                     (sdl2 (assoc-ref inputs "sdl2")))
+               ;; Shotcut looks for ffmpeg and melt executables in the shotcut
+               ;; directory.  Symlink them to be found at runtime.
+               (for-each (lambda (file)
+                           (symlink (string-append ffmpeg "/bin/" file)
+                                    (string-append out "/bin/" file)))
+                         '("ffmpeg" "ffplay" "ffprobe"))
+               (for-each (lambda (file)
+                           (symlink (string-append mlt "/bin/" file)
+                                    (string-append out "/bin/" file)))
+                         '("melt" "melt-7"))
                (wrap-program (string-append out "/bin/shotcut")
-                 `("PATH" ":" prefix
-                   ,(list (string-append ffmpeg "/bin")))
                  `("LD_LIBRARY_PATH" ":" prefix
                    ,(list (string-append jack "/lib" ":" sdl2 "/lib")))
                  `("FREI0R_PATH" ":" =
-                   (,(string-append frei0r "/lib/frei0r-1/")))
-                 `("MLT_PREFIX" ":" =
-                   (,(assoc-ref inputs "mlt"))))))))))
+                   (,(string-append frei0r "/lib/frei0r-1/"))))))))))
     (native-inputs
      `(("pkg-config" ,pkg-config)
        ("python" ,python-wrapper)
-- 
2.30.2

Reply via email to