Bug 515796

Summary: FFmpeg bundled in Krita appimage fails to export Krita Recorder Docker videos
Product: [Applications] krita Reporter: Tyson Tan <tysontanx>
Component: Dockers/RecorderAssignee: Krita Bugs <krita-bugs-null>
Status: REPORTED ---    
Severity: normal CC: penguinflyer2222
Priority: NOR    
Version First Reported In: 5.3.0-beta1   
Target Milestone: ---   
Platform: Manjaro   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Tyson Tan 2026-02-10 03:36:43 UTC
SUMMARY
Krita's Recorder Docker fails to export videos. It appears to be a problem with the ffmpeg binary bundled with appimage. It reports "invalid [resolution] in dependency layer settings", regardless of any resolution I use. However, I was able to export the video by changing to the distro's native ffmpeg, with the exact same settings.

This issue has been happening since the first time I use Krita's Recorder Docker (around mid 2025). It is still happening in all versions, including 5.3/6.0 beta 1 and newer.

Error message:

[OpenH264] this = 0x0x7f2d74003b50, Error:ParamValidationExt(), width > 0, height > 0, width * height <= 9437184, invalid 10000 x 5008 in dependency layer settings!
[OpenH264] this = 0x0x7f2d74003b50, Error:WelsInitEncoderExt(), ParamValidationExt failed return 2.
[OpenH264] this = 0x0x7f2d74003b50, Error:CWelsH264SVCEncoder::Initialize(), WelsInitEncoderExt failed.
Initialize failed
[vost#0:0/libopenh264 @ 0x55fe192d71c0] Error while opening encoder - maybe incorrect parameters such as bit_rate, rate, width or height.
[fc#0 @ 0x55fe192d1f80] Error sending frames to consumers: Unknown error occurred
[vost#0:0/libopenh264 @ 0x55fe192d71c0] Could not open encoder before EOF
[vost#0:0/libopenh264 @ 0x55fe192d71c0] Task finished with error code: -22 (Invalid argument)
[vost#0:0/libopenh264 @ 0x55fe192d71c0] Terminating thread with return code -22 (Invalid argument)



SOFTWARE/OS VERSIONS
Operating System: Manjaro Linux 
KDE Plasma Version: 6.5.5
KDE Frameworks Version: 6.22.0
Qt Version: 6.10.1
Kernel Version: 6.18.8-1-MANJARO (64-bit)
Graphics Platform: X11
Comment 1 Freya Lupen 2026-02-10 13:45:36 UTC
According to the error message, you tried to render an absolutely ginormous 10000x5008 video, that's over 50 million pixels (50080000) per frame! OpenH264 has a limitation of just under 9.5 million (9437184) pixels per frame (maximum size for a square video is 3072x3072px). Your distro's native FFMpeg is probably using libx264 instead, which doesn't have this limitation; Krita automatically picks the available x264 encoder when using the default MP4 export profile.

It should work if you use the Resize checkbox to render a smaller video (4K video is around 3840x2160, for reference).  For this image's aspect ratio, something like 4000x2003 should work.
Comment 2 Tyson Tan 2026-02-10 14:11:06 UTC
Yeah, the video export worked with the resize box check.

In any case, this exposed some usability issues in the export video dialogue:

1. The resize checkbox should be ON with dimensions set to safe values, by default.
Reason: People usually draw at least with a size of A4 300dpi (3508x4960), which is already over the limitation. We should prevent any error like this when the user uses the app with default settings.

2. Add a Default button to reset all settings. 
Reason: I have no idea whether tha resize checkbox is ON/OFF by default. There was no straight forward way to reset FFmpeg binary to the bundled one, either. These settings are too technical and we should give the user a way to fallback to failsafe values.

3. Group the options under these sections with titles:

* Frames
* Result
* Size
* Format

Reason: This is to enhance the discoverability of each option. I actually looked for "Size" related options in the dialogue, but did not noticed it. I think I overlooked it because it is grouped along with the frame related stuff, such context is misleading.
Comment 3 Tyson Tan 2026-02-10 14:15:45 UTC
For (3), I recommend adding a Screen Size preset droplist for common screen sizes, and a button to swap X and Y dimension so that we can quickly switch compositions for different target devices.

It'd be even nicer if it can detect the picture's orientation and use a fitting horizontal/vertical default size accordingly.