Bug 405146 - flatpak: ffmpeg not found automatically
Summary: flatpak: ffmpeg not found automatically
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Unclassified
Component: Animation (show other bugs)
Version: 4.1.7
Platform: Flatpak Linux
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-03-06 18:06 UTC by Peter Eszlari
Modified: 2019-04-05 10:26 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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