Summary: | Recorder docker doesn't account for canvas size changes during drawing session. | ||
---|---|---|---|
Product: | [Applications] krita | Reporter: | wolthera <griffinvalley> |
Component: | Animation | Assignee: | Krita Bugs <krita-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | eoinoneill1991, info, kona.yachiyachi+kde, loentar, zoldyakopersonal |
Priority: | NOR | ||
Version: | git master (please specify the git hash!) | ||
Target Milestone: | --- | ||
Platform: | Other | ||
OS: | Linux | ||
Latest Commit: | https://invent.kde.org/graphics/krita/-/commit/47961a1a9c3322bfae8250cb9d3f8114af07cc7d | Version Fixed In: | |
Sentry Crash Report: |
Description
wolthera
2020-11-18 22:10:26 UTC
*** Bug 434626 has been marked as a duplicate of this bug. *** Of note: The resize function in ffmpeg seems to be mostly about storing metadata inside the file instead of actually resizing the result? Maybe we should fix that first? This could be solved by adding ",setsar=1" after "scale=$WIDTH:$HEIGHT", but.. frames become stretched. We can add black padding to keep ratio by adding "force_original_aspect_ratio=decrease,pad=$WIDTH:$HEIGHT:(ow-iw)/2:(oh-ih)/2" but probably it doesn't look so good? Also some filters and encoders like gif doesn't work with variable input image size it either causes ffmpeg to crash or just skip everything until the target ratio is reached. You can try how it works, just edit MP4 x264 profile like this: ------------------------------------------------------------ -framerate $IN_FPS -i "$INPUT_DIR%07d.jpg" -vf "scale=$WIDTH:$HEIGHT:force_original_aspect_ratio=decrease,pad=$WIDTH:$HEIGHT:(ow-iw)/2:(oh-ih)/2,setsar=1" -c:v libx264 -r $OUT_FPS -pix_fmt yuv420p ------------------------------------------------------------ If it's ok, I will update profiles accordingly. Dmitrii Utkin, I think scaling w/ black bars here would be the appropriate solution for MP4. Are you saying that GIF would be a problem with the proposed solution though? Eoin O'Neill, yes.. By some reason it doesn't render frames with different frame size(?). Just some part of the whole timelapse. Looks like palette generator filter causes render to stop. split[s0][s1];[s0]palettegen[p];[s1][p]paletteuse If I remove it, the resulting gif is created as expected (whole timelapse), but it look horrible due to missing palette. (In reply to Dmitrii Utkin from comment #3) > This could be solved by adding ",setsar=1" after "scale=$WIDTH:$HEIGHT", > but.. frames become stretched. We can add black padding to keep ratio by > adding > "force_original_aspect_ratio=decrease,pad=$WIDTH:$HEIGHT:(ow-iw)/2:(oh-ih)/ > 2" but probably it doesn't look so good? > > Also some filters and encoders like gif doesn't work with variable input > image size it either causes ffmpeg to crash or just skip everything until > the target ratio is reached. > > You can try how it works, just edit MP4 x264 profile like this: > > ------------------------------------------------------------ > -framerate $IN_FPS > -i "$INPUT_DIR%07d.jpg" > -vf > "scale=$WIDTH:$HEIGHT:force_original_aspect_ratio=decrease,pad=$WIDTH: > $HEIGHT:(ow-iw)/2:(oh-ih)/2,setsar=1" > -c:v libx264 > -r $OUT_FPS > -pix_fmt yuv420p > > ------------------------------------------------------------ > > If it's ok, I will update profiles accordingly. This workaround worked for me! *** Bug 485502 has been marked as a duplicate of this bug. *** Git commit 40524a339fc519cec62ed6e1fab663e923111635 by Emmet O'Neill, on behalf of Ralek Kolemios. Committed on 01/05/2024 at 22:07. Pushed by emmetoneill into branch 'master'. Reworked default FFmpeg profiles Related: bug 455006, bug 450790, bug 485515, bug 485514 M +2 -0 plugins/dockers/recorder/recorder_export.cpp M +166 -147 plugins/dockers/recorder/recorder_export_config.cpp M +1 -0 plugins/dockers/recorder/recorder_profile_settings.ui https://invent.kde.org/graphics/krita/-/commit/40524a339fc519cec62ed6e1fab663e923111635 Git commit 47961a1a9c3322bfae8250cb9d3f8114af07cc7d by Freya Lupen, on behalf of Ralek Kolemios. Committed on 05/06/2024 at 19:10. Pushed by freyalupen into branch 'krita/5.2'. Reworked default FFmpeg profiles Related: bug 455006, bug 450790, bug 485515, bug 485514 Conflicts: plugins/dockers/recorder/recorder_export.cpp plugins/dockers/recorder/recorder_export_config.cpp (cherry-picked from commit 40524a33) M +2 -0 plugins/dockers/recorder/recorder_export.cpp M +166 -147 plugins/dockers/recorder/recorder_export_config.cpp M +1 -0 plugins/dockers/recorder/recorder_profile_settings.ui https://invent.kde.org/graphics/krita/-/commit/47961a1a9c3322bfae8250cb9d3f8114af07cc7d |