Bug 474927 - AppImage: FFmpeg binary should be found automatically when path field is empty or invalid.
Summary: AppImage: FFmpeg binary should be found automatically when path field is empt...
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Animation (show other bugs)
Version: git master (please specify the git hash!)
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords: release_blocker
Depends on:
Blocks:
 
Reported: 2023-09-27 06:44 UTC by Emmet O'Neill
Modified: 2023-09-29 09:30 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 Emmet O'Neill 2023-09-27 06:44:02 UTC
SUMMARY

Despite running in an AppImage with bundled FFmpeg, Krita fails to render animations due to an empty or invalid FFmpeg path inside the "Render Animation" dialog.


STEPS TO REPRODUCE
1.  Create a short animation.
2.  File > Render Animation
3.  Enable "Export as Video" section.
4.  Specify an empty or invalid FFmpeg path.
5.  Hit OK and continue.

OBSERVED RESULT

FFmpeg path is empty even though it should be bundled within the AppImage itself.
As a result, rendering animation fails with an "Unknown Error". 

EXPECTED RESULTS

1. In the event of a empty/invalid/bad user-specified FFmpeg path, we should probably have a solid fallback that checks various logical paths where FFmpeg might be, depending on the platform. In the case of Linux AppImages, I think we should always be able to fall back to the FFmpeg that's bundled inside the AppImage's appdir ("$AppDir/usr/bin/ffmpeg").

2. Is it possible to improve the "Unknown Error" that we get in this circumstance, because unknown errors are not very informative?


SOFTWARE/OS VERSIONS
AppImage built with Dmitry's docker environment.
Fedora Silverblue 38
Comment 1 Emmet O'Neill 2023-09-27 06:47:08 UTC
Marking this one as a release blocker unfortunately. 

It was too easy to get into a situation in which Krita can't find the FFmpeg that's bundled with the AppImage, and the average user is unlikely to know how/where to find it manually. (To make matters worse, Krita won't allow us to change the ffmpeg path until you supply a *valid* ffmpeg binary, so if a previously-correct path is no longer working, it's kind of frustrating to not be able to empty the path or have krita try to solve the problem automatically.)
Comment 2 Dmitry Kazakov 2023-09-29 08:02:25 UTC
I can confirm that Krita **packed into an appimage** cannot find ffmpeg automatically. In all other forms Krita finds ffmpeg correctly :)
Comment 3 Dmitry Kazakov 2023-09-29 09:30:04 UTC
Git commit 70352ca536af0586ad06ac3234ecd2391969df8b by Dmitry Kazakov.
Committed on 29/09/2023 at 11:26.
Pushed by dkazakov into branch 'krita/5.2'.

Fix detection of FFMpeg in AppImages

AppImage changes its mount point on every run, hence the location
of ffmpeg changes as well. We should reconfigure it if possible.

M  +7    -1    libs/ui/animation/KisDlgAnimationRenderer.cpp

https://invent.kde.org/graphics/krita/-/commit/70352ca536af0586ad06ac3234ecd2391969df8b
Comment 4 Dmitry Kazakov 2023-09-29 09:30:42 UTC
Git commit 14f499a664899ef4938c7d418d7cd10e70495598 by Dmitry Kazakov.
Committed on 29/09/2023 at 11:30.
Pushed by dkazakov into branch 'master'.

Fix detection of FFMpeg in AppImages

AppImage changes its mount point on every run, hence the location
of ffmpeg changes as well. We should reconfigure it if possible.

M  +7    -1    libs/ui/animation/KisDlgAnimationRenderer.cpp

https://invent.kde.org/graphics/krita/-/commit/14f499a664899ef4938c7d418d7cd10e70495598