Bug 405146

Summary: flatpak: ffmpeg not found automatically
Product: [Applications] krita Reporter: Peter Eszlari <peter.eszlari>
Component: AnimationAssignee: Krita Bugs <krita-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: halla
Priority: NOR    
Version: 4.1.7   
Target Milestone: ---   
Platform: Flatpak   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Peter Eszlari 2019-03-06 18:06:55 UTC
The flatpak of Krita has access to two ffmpeg binaries:

1. /app/bin/ffmpeg

This one is bundled with Krita, supports all formats that are needed and is the one meant to be used.

2. /usr/bin/ffmpeg

This one is part of the runtime, doesn't include support for all formats and therefore should be ignored.

To make Krita find the correct binary, I did the following modifications:

a) plugins/extensions/animationrenderer/DlgAnimationRenderer.cpp

Replaced "/usr/bin" with "/app/bin".

b) plugins/impex/video/kis_video_export.cpp

Replaced "cfg.customFFMpegPath()" with "/app/bin/ffmpeg".

The second change is necessary, because else the first try to render would fail (the following would succeed). Because I don't know how to fix that, I didn't submit a patch.
Comment 1 Halla Rempt 2019-04-04 12:39:28 UTC
I think it should be enough to look in the applicationroot/bin/ first, instead of first in the system paths.
Comment 2 Halla Rempt 2019-04-05 10:26:36 UTC
Git commit 5b163b9f7a25f0021515e41a668b8f3b1d626288 by Boudewijn Rempt.
Committed on 05/04/2019 at 10:26.
Pushed by rempt into branch 'master'.

Look first next to the krita executable for ffmpeg

Because, when running krita as a flatpak, we want our ffmpeg,
not the distribution one.

M  +3    -2    plugins/extensions/animationrenderer/DlgAnimationRenderer.cpp

https://commits.kde.org/krita/5b163b9f7a25f0021515e41a668b8f3b1d626288