SUMMARY When rendering the timelapse recorded in krita ffmpeg gives error and doesn't export the video. I tried all the formats gif, mkv, webm mp4 all give ffmpeg crashed error. This might also affect animation export too. The ffmpeg path is mapped to "/tmp/.mount_krita-N1yWQW/usr/bin/ffmpeg" STEPS TO REPRODUCE 1. Open latest nightly build and open a document to record a timelapse 2. Open recorder docker and set it up for recording, draw some strokes and stop recording 3. Export the recording using the default preset. OBSERVED RESULT Export doesn't happen and ffmpeg crash error dialog pops up. EXPECTED RESULT Export should happen as usual.
Thanks for the report Raghu, marking this as a release blocker.
Hi, Emmet! Can this bug be related to the following report https://bugs.kde.org/show_bug.cgi?id=473727 ?
Git commit 155bbdea44cf556f952fbd6d89b7749526a9676f by Sharaf Zaman. Committed on 04/09/2023 at 15:07. Pushed by szaman into branch 'master'. 3rdparty: Fix a crash in ffmpeg caused by different struct definitions A +37 -0 3rdparty/ext_ffmpeg/0001-Copy-over-some-macros-from-libavutil-version.h.patch M +1 -0 3rdparty/ext_ffmpeg/CMakeLists.txt https://invent.kde.org/graphics/krita/-/commit/155bbdea44cf556f952fbd6d89b7749526a9676f
Created attachment 161629 [details] Attaching the error dialog when rednering via built in ffmpeg Sorry this bug is still present in the nightly appimage. The version shows (git fe971a1) Attaching an image to show the error dialog.
Raghavendra reports it is not fixed.
here is what the ffmpeg log file says /tmp/.mount_krita-meSKCk/usr/bin/ffmpeg -hide_banner -y -framerate 30 -i /home/raghu/Desktop/recorder/20230915142113/%07d.jpg -framerate 30 -start_number 15-1 -i /home/raghu/Desktop/recorder/20230915142113/%07d.jpg -filter_complex [0]loop=5*30:size=1:start=15[main1]; [main1]scale=3500:3500[main2]; [main2]loop=1:size=1:start=0[main3]; [main3]setpts=PTS-STARTPTS[main4]; [1]split [first1][transition1]; [transition1]scale=3500:3500 [transition2]; [transition2]loop='if(gte(2, 1), 1*30, 0)':size=1:start=1[transition3]; [transition3]setpts=PTS-STARTPTS[transition4]; [transition4][main4]xfade=transition=smoothright:duration=0.5:offset=0[v1]; [v1]setpts=PTS-STARTPTS[v2]; [v2]trim=start_frame=1[v3]; [first1]loop='if(gte(2, 1), (2*30) - 0.5, 2*30)':size=1:start=1[preview1]; [preview1]scale=3500:3500[preview2]; [preview2]setpts=PTS-STARTPTS[preview3]; [preview3][v3] concat [final1]; [final1] setpts=PTS-STARTPTS[final2]; [final2] trim=start_frame=1 -c:v libx264 -r 30 -pix_fmt yuv420p /home/raghu/Desktop/recorder/1.mp4 ===================================================== [mjpeg @ 0x5585084dbec0] EOI missing, emulating Input #0, image2, from '/home/raghu/Desktop/recorder/20230915142113/%07d.jpg': Duration: 00:00:00.50, start: 0.000000, bitrate: N/A Stream #0:0: Video: mjpeg (Baseline), yuvj420p(pc, bt470bg/unknown/unknown), 3500x3500 [SAR 96:96 DAR 1:1], 30 fps, 30 tbr, 30 tbn, 30 tbc Input #1, image2, from '/home/raghu/Desktop/recorder/20230915142113/%07d.jpg': Duration: 00:00:00.03, start: 0.000000, bitrate: N/A Stream #1:0: Video: mjpeg (Baseline), yuvj420p(pc, bt470bg/unknown/unknown), 3500x3500 [SAR 96:96 DAR 1:1], 30 fps, 30 tbr, 30 tbn, 30 tbc Unknown encoder 'libx264'
I think this may be a different issue. Instead of a crash i think individual presets are bugging out like webm and mp4. Because mkv export worked
Mp4 and mp4 with flash effect doesn't work as shown in the screenshot, webm also gives and error Export failed. FFmpeg message: [vp8_v4l2m2m @ 0x56085c82a740] Could not find a valid device Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height Conversion failed!
I think it is the same bug as bug 474559 and I think I have a fix for that :) *** This bug has been marked as a duplicate of bug 474559 ***
Okay, my fix doesn't actually fix the issue.
The bug should be fixed in https://invent.kde.org/graphics/krita/-/commit/dce681672a5ae22d4be4ee19eb8e964e0fe743a1
Hi, Raghavendra! Could you please check this build when it is finished? I think I have fixed this bug: https://binary-factory.kde.org/job/Krita_Stable_Appimage_Build/1993/
Git commit dce681672a5ae22d4be4ee19eb8e964e0fe743a1 by Dmitry Kazakov. Committed on 21/09/2023 at 12:22. Pushed by dkazakov into branch 'master'. Fix external ffmpeg not working on Linux due to clash in LD_LIBRARY_PATH We embed a dynamically linked ffmpeg into our appimage and add that into the environment with a LD_LIBRARY_PATH variable. If the user tries to use a system-provided dynamically-linked ffmped, then there will be a clash and ffmpeg will crash. Hence we should detect if a non-embedded ffmpeg is running and remove the variable from its environment. M +47 -1 libs/ui/animation/KisFFMpegWrapper.cpp M +2 -0 libs/ui/animation/KisFFMpegWrapper.h https://invent.kde.org/graphics/krita/-/commit/dce681672a5ae22d4be4ee19eb8e964e0fe743a1
Git commit 4cc1ab5a659cb6b1f5229a44b5c92890779d09e1 by Dmitry Kazakov. Committed on 21/09/2023 at 12:33. Pushed by dkazakov into branch 'krita/5.2'. Fix external ffmpeg not working on Linux due to clash in LD_LIBRARY_PATH We embed a dynamically linked ffmpeg into our appimage and add that into the environment with a LD_LIBRARY_PATH variable. If the user tries to use a system-provided dynamically-linked ffmped, then there will be a clash and ffmpeg will crash. Hence we should detect if a non-embedded ffmpeg is running and remove the variable from its environment. M +47 -1 libs/ui/animation/KisFFMpegWrapper.cpp M +2 -0 libs/ui/animation/KisFFMpegWrapper.h https://invent.kde.org/graphics/krita/-/commit/4cc1ab5a659cb6b1f5229a44b5c92890779d09e1