Skip to content

Recorder plugin Enhancements

For details please see this topic: https://krita-artists.org/t/enhancements-on-recorder-plugin/12362

Recorder enhancements implemented:

  • extended configuration option
  • configuration is saved automatically
  • rewritten capture code
  • use jpeg files as fast storage (also to make it work on any supported platform)
  • REC notification in status bar
  • multi document support
  • downscale (1/2, 1/4) image support using fast algorithm
  • show warning if colorSpace != "ARGB 8U" and disable recording.
  • use separate directory per document (based on doc creation time)
  • export timelapse as video using ffmpeg executable like "Render Animation...".
  • render white background for transparent parts: transparent background or for isolate layer/group mode.
  • record only documents where Record button where pressed. Also honor the "Record automatically" option.
  • actions "Record", "Export..." which can be added as buttons to toolbar.
  • a profile with flash effect in the end and few extra seconds of the last changed frame.
  • add an option to don't record when Isolate layer is active.
  • avoid recording when main dialog is inactive to prevent filter dialogs from disappear.
  • support of uneven size canvas.

TODO:

  • Move ffmpeg location to settings.

Test Plan

Recorder Docker UI:

  • Add "Recorder" docker via docker menu
  • Add "Record Timelapse" and "Export Timelapse" actions to BrushesAndStuff toolbar.
  • Docker panel must be disabled when no document is open
  • Docker panel must appear fully enabled when document with supported color space (RGB/Alpha 8-bit) is opened and record is inactive
  • Record button, Record Timelapse action must be disabled and warning about unsupported color space must be visible if current document is in unsupported color space
  • Any changes in Recorder settings must be restored after restarting the app
  • Selecting a new Shapshots directory must change the setting, cancelling the dialog must not.
  • Capture interval must be limited to range of 1-99 seconds
  • Quality setting must be limited to range of 1-100 percent
  • It must be possible to select Resolution from 3 pre-defined values: Original (WxH), Half (W/2xH/2), Quarter (W/4xH/4)
  • Resolution combo label sizes must depend on current document image size.
  • When clicked Record button must appear checked and change it's caption to "Stop".
  • "Record Timelapse" action must be synchronized (checked or not) with "Record" button.
  • When clicked Export button (if interface is enabled) or "Export Timelapse" action "Export timelapse" dialog must appear.

Recorder Docker Functional:

  • When recording is active any recorded snapshots must be captured in sequencial order into directry "Snapshots directory"/DocumentID (DocumentID is formed from creation date by removing any non-numeric characters)
  • Capture interval, quality and resolution settings must work. Can be checked by clicking "Export", "Open record directory" (small button top right)
  • When option "Record automatically" is checked recording must be started automatically for any newly opened or created documents
  • When switching between documents the Record button must represent the current state of the doc (Recording or not).
  • If automatic recording is enabled it should be possible to stop recording. Switching between documents in that mode must still show the current state of the recording.
  • When recording is started the REC indicator must appear in status bar
  • REC indicator circle must appear red when changing the current doc (drawing, etc).
  • REC indicator circle must appear light gray when no changes (idle)
  • Snapshots must be only written on document changes (red REC indicator)
  • Document transparent parts must be rendered as white color.
  • When recording is active it should not interrupt any other tools (Periodic locking the canvas image causes some tools like Move or Transform to be interrupted) nor filter dialogs.

Export Timelapse UI. Part 1 (Settings):

  • The top line must show the last frame size (px) and the total number of frames recorded (and depends on document).
  • Any settings in "Export Timelapse" dialog must be saved automatically
  • Input FPS must be limited to range of 1-10000
  • Output FPS must be limited to range of 1-60
  • Resize checkbox must enable resize setting only when checked
  • When constrain proportion button is pressed the width and height must be constrained to current document proportions
  • It shouldn't be possible to enter odd numbers for width or height
  • When ffmpeg is installed via apt FFMpeg Autodetection should work
  • When ffmpeg binary is detected in path check mark should appear to the right side of FFMpeg path line edit. Tooltip to check mark must reveal ffmpeg info.
  • When ffmpeg binary is not detected in path red cross mark should appear to the right side of FFMpeg path line edit.
  • It should be possible to choose different ffmpeg binary using the button to the right of ffmpeg path line edit.
  • It must be possible to select and edit video profiles ("Render as").
  • It must be possible to change output video location by pressing the "Setup directory to export timelapse video".
  • When different video profile is selected the video file extension must represent the current profile.
  • Video duration label must show the calculated resulting video duration (number of frames * input fps), in hours minutes, seconds and second fractions (1 symbol). zero hours, then zero minutes must be hidden.
  • Close button must close dialog.
  • Export button must start the encoding process.
  • If output file is already exist, the confirmation dialog must appear. If confirmed the dialog must change it's appearance to Part 2 (Encoding Progress).

Export timelapse UI. Part 2 (Encoding Progress):

  • When export process is started the title, progress bar and cancel button must be only visible.
  • When Cancel button or Esc or Close window button is pressed, the confirmation box must appear. If confirmed, the Part 1 (Settings) must appear.
  • The progress bar must update the current state of encoding (see debug logs)
  • When encoding process is finished the dialog must change it's appearance to Part 3 (Finished).

Export timelapse UI. Part 3 (Finished):

  • The video path must be selectable and user must have possibility to copy it to clipboard
  • When clicked "Watch it!" button video must be opened in default video player (if any).
  • When show in folder button is pressed default file browser must appear (not Qt has no ability to select the video file in directory).
  • When restart is pressed the dialog must change it's appearance to Part 1 (Settings).

Export Timelapse Functional:

  • The video must be encoded with the selected options.

Edit profile UI:

  • The revert button must reset all profile fields to pre-defined settings
  • When any of the fields is empty OK button must be disabled
  • Profile must only be saved when OK button (or Enter) is pressed
  • When profile is changed Export Timelapse Dialog must represent the changes automatically.

Formalities Checklist

  • I confirmed this builds.
  • I confirmed Krita ran and the relevant functions work.
  • I tested the relevant unit tests and can confirm they are not broken. (If not possible, don't hesitate to ask for help!)
  • I made sure my commits build individually and have good descriptions as per KDE guidelines.
  • I made sure my code conforms to the standards set in the HACKING file.
  • I can confirm the code is licensed and attributed appropriately, and that unattributed code is mine, as per KDE Licensing Policy.
Edited by Dmitrii Utkin

Merge request reports