<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.kde.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugs.kde.org/"
          
          maintainer="sysadmin@kde.org"
>

    <bug>
          <bug_id>474927</bug_id>
          
          <creation_ts>2023-09-27 06:44:02 +0000</creation_ts>
          <short_desc>AppImage: FFmpeg binary should be found automatically when path field is empty or invalid.</short_desc>
          <delta_ts>2023-09-29 09:30:42 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>2</classification_id>
          <classification>Applications</classification>
          <product>krita</product>
          <component>Animation</component>
          <version>git master (please specify the git hash!)</version>
          <rep_platform>Other</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>release_blocker</keywords>
          <priority>NOR</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Emmet O&apos;Neill">emmetoneill.pdx</reporter>
          <assigned_to name="Krita Bugs">krita-bugs-null</assigned_to>
          <cc>dimula73</cc>
          
          <cf_commitlink>https://invent.kde.org/graphics/krita/-/commit/14f499a664899ef4938c7d418d7cd10e70495598</cf_commitlink>
          <cf_versionfixedin></cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>0</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2255529</commentid>
    <comment_count>0</comment_count>
    <who name="Emmet O&apos;Neill">emmetoneill.pdx</who>
    <bug_when>2023-09-27 06:44:02 +0000</bug_when>
    <thetext>SUMMARY

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


STEPS TO REPRODUCE
1.  Create a short animation.
2.  File &gt; Render Animation
3.  Enable &quot;Export as Video&quot; 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 &quot;Unknown Error&quot;. 

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&apos;s bundled inside the AppImage&apos;s appdir (&quot;$AppDir/usr/bin/ffmpeg&quot;).

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


SOFTWARE/OS VERSIONS
AppImage built with Dmitry&apos;s docker environment.
Fedora Silverblue 38</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2255530</commentid>
    <comment_count>1</comment_count>
    <who name="Emmet O&apos;Neill">emmetoneill.pdx</who>
    <bug_when>2023-09-27 06:47:08 +0000</bug_when>
    <thetext>Marking this one as a release blocker unfortunately. 

It was too easy to get into a situation in which Krita can&apos;t find the FFmpeg that&apos;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&apos;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&apos;s kind of frustrating to not be able to empty the path or have krita try to solve the problem automatically.)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2255966</commentid>
    <comment_count>2</comment_count>
    <who name="Dmitry Kazakov">dimula73</who>
    <bug_when>2023-09-29 08:02:25 +0000</bug_when>
    <thetext>I can confirm that Krita **packed into an appimage** cannot find ffmpeg automatically. In all other forms Krita finds ffmpeg correctly :)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2255974</commentid>
    <comment_count>3</comment_count>
    <who name="Dmitry Kazakov">dimula73</who>
    <bug_when>2023-09-29 09:30:04 +0000</bug_when>
    <thetext>Git commit 70352ca536af0586ad06ac3234ecd2391969df8b by Dmitry Kazakov.
Committed on 29/09/2023 at 11:26.
Pushed by dkazakov into branch &apos;krita/5.2&apos;.

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</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2255976</commentid>
    <comment_count>4</comment_count>
    <who name="Dmitry Kazakov">dimula73</who>
    <bug_when>2023-09-29 09:30:42 +0000</bug_when>
    <thetext>Git commit 14f499a664899ef4938c7d418d7cd10e70495598 by Dmitry Kazakov.
Committed on 29/09/2023 at 11:30.
Pushed by dkazakov into branch &apos;master&apos;.

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</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>