Bug 474803 - [recorder plugin] FFmpeg render presets not working for webm and mp4
Summary: [recorder plugin] FFmpeg render presets not working for webm and mp4
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Dockers/Recorder (show other bugs)
Version: nightly build (please specify the git hash!)
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Dmitry Kazakov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-09-23 11:01 UTC by Raghavendra kamath
Modified: 2024-11-08 19:41 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Raghavendra kamath 2023-09-23 11:01:44 UTC
I am using latest nightly build and I have also tested a build given by dmitry for ffmpeg crash.
On both the default presets for mp4 an webm fail to render. The mp4 preset is using libx264 changing it to -c:v libopenh264 works and the ffmpeg renders the mp4 files correctly.

STEPS TO REPRODUCE
1. Open latest nightly and draw something
2. be sure to record the drawing
3. Export the timelapse with any of the mp4 or webm presets

OBSERVED RESULT
ffmpeg gives error
Comment 1 Bug Janitor Service 2023-09-26 09:09:26 UTC
A possibly relevant merge request was started @ https://invent.kde.org/graphics/krita/-/merge_requests/1948
Comment 2 Dmitry Kazakov 2023-09-26 12:43:28 UTC
Update about WebM support in our ffmpeg binary:

Our ffmpeg binary supports only hardware encoding of vp8 using `vp8_v4l2m2m` encoder, it requires the presence of hardware and the specific driver. To support software encoding, we need to build ffmpeg with libvpx support, which we don't do (I don't know why, perhaps due to some license issues)

Here is the link to the problem like ours:
https://stackoverflow.com/questions/55056694/ffmpeg-codec-conversion-cant-configure-encoder
Comment 3 Dmitry Kazakov 2023-09-26 12:58:12 UTC
Git commit 6f2ca3bad196b34e1c5ff9482c24305aebe473ff by Dmitry Kazakov.
Committed on 26/09/2023 at 11:08.
Pushed by dkazakov into branch 'master'.

Add openh264 presets to the recorder plugin

Internal ffmpeg binary supports only libopenh264 encoder, while
external ffmpeg binary supports only libx264 encoder :) We need
to add presets for both of them.

M  +55   -0    plugins/dockers/recorder/recorder_export_config.cpp

https://invent.kde.org/graphics/krita/-/commit/6f2ca3bad196b34e1c5ff9482c24305aebe473ff
Comment 4 Dmitry Kazakov 2023-09-26 13:10:34 UTC
Git commit 1feefa4b4cf3f24e78a705ff429f6a7b31cc4329 by Dmitry Kazakov.
Committed on 26/09/2023 at 15:10.
Pushed by dkazakov into branch 'krita/5.2'.

Add openh264 presets to the recorder plugin

Internal ffmpeg binary supports only libopenh264 encoder, while
external ffmpeg binary supports only libx264 encoder :) We need
to add presets for both of them.


(cherry picked from commit 6f2ca3bad196b34e1c5ff9482c24305aebe473ff)

M  +55   -0    plugins/dockers/recorder/recorder_export_config.cpp

https://invent.kde.org/graphics/krita/-/commit/1feefa4b4cf3f24e78a705ff429f6a7b31cc4329
Comment 5 Dmitry Kazakov 2023-09-26 13:11:48 UTC
MP4 part of the bug is fixed in master and krita/5.2. WebM part will not be fixed in 5.2.0, because our ffmpeg is built without software encoding support for vp8, only hardware one using GPU.
Comment 6 Dmitry Kazakov 2023-09-26 13:12:02 UTC
Removing release-blocker tag