Jump to content

GSoC/2025/StatusReports/Ajay Chauhan

From KDE Community Wiki

Improving Kdenlive timeline markers

Kdenlive currently supports single-point timeline markers, which limits efficiency for workflows that require marking time ranges, such as highlight editing or collaborative annotations. This project proposes enhancing Kdenlive's marker system by introducing duration-based markers that define a clear start and end time.

The project will extend the marker data model to support a duration attribute while maintaining backward compatibility. The UI will be updated to visualize range markers as colored regions on the timeline, with interactive handles for resizing and editing.

These markers will be integrated with key features like zone-to-marker conversion, search and navigation, rendering specific ranges, and import/export capabilities.

Mentor

Jean-Baptiste Mardelle

Work report

Week 1:

  • Got started with adding duration support to the `CommentedTime` class.[1]
  • Added support for range markers in `MarkerListModel`, alongside the usual point markers.
  • Introduce `addOrUpdateRangeMarker_lambda` for adding or updating existing range markers [2]
  • Updated `editMarker` to preserve duration when editing markers.

Week 2:

  • Cleaned up the `CommentedTime` constructor — it now accepts duration as an optional param. [3]
  • Updated marker roles to include duration-specific info (needed for UI and export).
  • Adjusted the undo/redo system to support range marker changes without breaking existing flows.[4]
  • Worked on import/export logic to ensure it could handle durations (and still support older, non-duration markers).

Week 3:

  • Improved the JSON import logic to detect and handle range markers properly. [5]
  • Wrote tests to cover range vs point markers, editing them, and converting between the two.[6]
  • Made sure old marker formats (without duration fields) still import cleanly, backward compatibility was a priority.
  • Started working on `importFromTxt` to allow durations to be parsed directly from comment lines.

Week 4:

  • Finished up the TXT import improvements, markers can now include durations in brackets and they’ll be recognized automatically. [7]
  • Added new template variables for text export: {duration}, {durationtimecode}, {endtimecode}, {endframe}, {hasrange}. [8]
  • Improved FFmpeg chapter export so it now includes durations when available.

Week 5:

  • Added full range marker support in MarkerDialog, including synced “End Time” and “Duration” fields so changes update both ways. [9]
  • Updated markerlistmodel.cpp to handle range markers with correct duration math and frame-based positions.
  • Built QML timeline components (Clip.qml, Ruler.qml) to draw range markers with proper colors and visuals. [[10]]

Week 6:

  • Switched marker position handling from seconds (PosRole) to frames (FrameRole) for better precision and consistency. [11]
  • Set up tests for range marker logic to verify unit conversions and data accuracy.
  • Tweaked the marker dialog UI to add range-specific elements like duration display and end time inputs.

Week 7:

  • Added range marker color spans to the Clip Monitor’s ruler. [12]
  • Improved rendering order so the playhead and marker visuals stack correctly (z-index adjustments).
  • Added vertical line markers for range start and end in the monitor view

Week 8:

  • Made marker list model automatically add duration info to comments for range markers. [13]
  • Finished integrating range markers across the timeline, monitor, and dialog so they work consistently everywhere.

Week 9:

  • Introduced drag-to-resize functionality for range markers in both Monitor and Timeline; added left/right resize handles with live feedback and snapping.
  • Added new resizeMarker() method in MonitorProxy and TimelineController to centralise the behaviour.
  • Verified smooth interaction in Clip/Project monitors and ensured visual cursor-state changes while dragging

Week 10:

  • Refactored the internal resizing code into a single helper, simplifying future maintenance.
  • Added right-click capture to the Monitor Ruler so users have a precision alternative for resizing markers.
  • Hardened the undo/redo stack in MarkerListModel so range-marker edits (including resizes) roll back cleanly.

Week 11:

  • Extended TimelineController with resizeGuide() and suggestSnapPoint() to improve snapping accuracy when guides or markers are resized.
  • Implemented “Create Range Marker from Zone” actions in both monitor and timeline context menus, complete with validation and user feedback.
  • Ensured new zone-to-marker workflow respects existing snapping/guide rules and integrates with the command stack.

Week 12:

  • Polished UI/UX: renamed marker-creation actions for clarity, added guide-end options, and displayed guide markers with distinct icons.
  • Performed cleanup (redundant comment removal) and a temporary revert to keep the branch build-safe during integration testing.
  • Fixed edge cases: zone marker creation when no zone is set, double-click guide insertion, and general marker display glitches

Links to Blogs and other writing

Implementing Range Marker Support in Kdenlive

Working on Range Markers in Kdenlive Part 2

Contact

[email protected]

@hisir:matrix.org