Bug 502091 - Timeline: Create new A/V track by dropping clip onto top/bottom empty row.
Summary: Timeline: Create new A/V track by dropping clip onto top/bottom empty row.
Status: REPORTED
Alias: None
Product: kdenlive
Classification: Applications
Component: User Interface & Miscellaneous (other bugs)
Version First Reported In: git-master
Platform: Other Other
: NOR wishlist
Target Milestone: ---
Assignee: balooii
URL:
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2025-03-27 20:50 UTC by Gabriel Gazzán
Modified: 2025-04-24 17:58 UTC (History)
3 users (show)

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


Attachments
just a simple mockup showing how it would look. (35.96 KB, image/png)
2025-03-27 20:50 UTC, Gabriel Gazzán
Details
Example of showing a green line where a new trck would be created (16.41 KB, image/png)
2025-04-21 13:36 UTC, Bernd
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gabriel Gazzán 2025-03-27 20:50:03 UTC
Created attachment 179795 [details]
just a simple mockup showing how it would look.

In Timeline, it'd be great to be able to create a new track by just dropping a clip onto special top/bottom rows (like a false track), designed for that purpose. (top for new video and bottom for new audio tracks)

I'm not discovering anything, but still. It's a useful feature other programs have that could benefit Kdenlive users too.

Thanks for listening!
Comment 1 balooii 2025-04-19 07:30:03 UTC
Hey, I like the idea. This is the first draft of how it could look like:

https://invent.kde.org/-/project/19/uploads/66554a4d8b3829265eaf52f4d4f62411/track-creation-drop-area.mp4
Comment 2 Gabriel Gazzán 2025-04-19 16:46:27 UTC
Yes, that would be awesome! :)
Thanks!!
Comment 3 Bernd 2025-04-19 17:27:03 UTC
(In reply to balooii from comment #1)
> Hey, I like the idea. This is the first draft of how it could look like:
> 
> https://invent.kde.org/-/project/19/uploads/66554a4d8b3829265eaf52f4d4f62411/
> track-creation-drop-area.mp4

That looks really great! Thanks for working on this. Would it create a video AND audio track depending on what kind of streams are present in the clip or whether the user dragged the clip by the video or audio icon?
Comment 4 balooii 2025-04-19 18:09:59 UTC
> Would it create a video AND audio track depending on what kind of streams are present in the clip or whether the user dragged the clip by the video or audio icon?

Sounds reasonable to me :thumbsup:

* video-only clip selected or clip with both video/audio but selected via the movie icon -> only upper drop area will be shown and adds video track
* audio-only clip selected or clip with both video/audio but selected via the speaker icon -> only lower drop area will be shown and adds audio track
* clip with both video/audio selected (no icon used) -> both upper and lower drop areas will be shown and it will create an AV track regardless in which zone you drop it

But I'm not an expert so maybe should work differently. Feedback welcome.
Comment 5 Gabriel Gazzán 2025-04-19 18:39:33 UTC
> But I'm not an expert so maybe should work differently. Feedback welcome.

It seems ok to me.

Just a note on "audio/video only" cases:
To me in those cases the drag operation should only activate the new track behavior, when going over the respective area (top/bottom). 
That'd be just to avoid unexpected results in areas the user is not looking into (i.e. focusing attention on top track, while a new audio track only is potentially being created off-screen, in case of too many tracks to fit in view).
Comment 6 Gabriel Gazzán 2025-04-19 18:49:19 UTC
A variant just crossed my mind...
Perhaps while dragging, a modifier key (Ctrl ?) could also be (optionally) pressed to be able to activate the "dashed line" not at the top-most track, but in between any two existent tracks the mouse cursor is over?

I know, that's a step further, and I'm totally happy with just the proposed behavior, but I wouldn't be me if I didn't say it. :)
Maybe for a second stage...
Comment 7 Bernd 2025-04-20 14:56:57 UTC
After watching the screen recording again and sleeping over it, I think the drop zones are not that intuitive. I recommend the user to be able to drag the clip to the track header section and then where they want the track to be created. @Gabriel Gazzan suggested that, too, and I fully second that. Depending on what streams are present or which icon was used to drag the clip from the bin to the timeline/track header section, the new function creates a video track and a corresponding audio track, just a video track, or just an audio track.
Comment 8 balooii 2025-04-21 12:48:41 UTC
Hey Bernd,

> I recommend the user to be able to drag the clip to the track header section and then where they want the track to be created.

Can you draw a mockup or describe it please?
I'm not sure if in your proposal there still would be a drop zone. First part is clear I think "drag the clip to the track header" meaning there is no visualization. But the "and then where they want the track to be created" part is where I'm struggling to understand what should be happening there exactly.
Comment 9 balooii 2025-04-21 13:03:31 UTC
I've updated the component again and added a preview of where in the new track the clips would be inserted looking very similar to what it looks like if you were dragging a clip into an existing track.

Here is the updated demo:

https://invent.kde.org/-/project/19/uploads/c3e95fb6186aac8e1d766a0dbcc84a13/new-track-drop-zone-v2.mp4
Comment 10 balooii 2025-04-21 13:07:50 UTC
> Perhaps while dragging, a modifier key (Ctrl ?) could also be (optionally) pressed to be able to activate the "dashed line" not at the top-most track, but in between any two existent tracks the mouse cursor is over?

Pressing a modifier key would have the benefit of knowing 100% that the user actually wants to insert the clip into a new track. In that case, yeah why not having drop zones above/below all tracks?

Another idea with or without modifier would be to not show the contracted version of the drop zone (single dashed line) but still keep the invisible drop zone which would extend to the dashed rectangle if you're hovering over the edge for some time. So same behavior as in the demo but without visualization of the contracted / dashed line drop zone. I like the single dashed line as it gives a clue that you can create a track this way but I can also understand that it still might be annoying for some even with your other suggestion to limit it to the vicinity of top/bottom tracks.
Comment 11 Bernd 2025-04-21 13:36:16 UTC
Created attachment 180478 [details]
Example of showing a green line where a new trck would be created
Comment 12 Bernd 2025-04-21 13:44:15 UTC
(In reply to balooii from comment #8)
> Hey Bernd,
> 
> > I recommend the user to be able to drag the clip to the track header section and then where they want the track to be created.
> 
> Can you draw a mockup or describe it please?
> I'm not sure if in your proposal there still would be a drop zone. First
> part is clear I think "drag the clip to the track header" meaning there is
> no visualization. But the "and then where they want the track to be created"
> part is where I'm struggling to understand what should be happening there
> exactly.

It would work exactly like in your mockup except that the drop zone would show between the track headers. When the user drags the clip vertically across the track headers the insert-here indicator ( a thick bright green line or a dashed one like on your mockup that expands) would jump from one track edge to the next one. I also support the idea of using a modifier like CTRL.
The added benefit of this method would be that the new track is created where the user needs it instead of creating a new track as the top most one. Unless we (you ;-) ) also create the new function to rearrange tracks so that a user can grab V2 and drag it between V3 and V4 and insert it there.
Comment 13 Julius Künzel 2025-04-21 13:46:38 UTC
I know DaVinci Resolve at least has similar feature. We should check how it works there especially with A/V clips.

A modifier key makes sense in my opinion if you can us it to create tracks between existing tracks too. If we only ever show drop areas above and below all tracks we can also add a settings option to enable/disable the feature.
Comment 14 Gabriel Gazzán 2025-04-21 15:08:57 UTC
I tend to favor dragging the selected clips directly to the place and time in the timeline where you want to put them, so essentially you're accomplishing two tasks at once: creating the new track(s) and placing the clips wherever you need to.
I like the second video mockup from @balooii 

I'd always offer the user the chance to create new tracks above/below all, without having to press a modifier key (improves discoverability of the feature), but only offer inserting new tracks between existent ones when the modifier key is pressed.

(Also, please check new audio tracks get created as well, when dragging AV clips)

Thanks!! :)
Comment 15 Gabriel Gazzán 2025-04-21 16:11:38 UTC
Regarding AV clips, I see Kdenlive has some rigidity as to determine when there is available tracks allowing for a clip to be dropped in the timeline.

For example, when you try and drop an AV clip in some place in track V3, if for some reason track A3 is occupied with some other clip, the clip just can't be dropped in V3, even if there are other free audio tracks in the timeline for that time range.
I guess there's some internal condition applying, where for a pair of A and V clips to be handled in a grouped fashion, they have to be in tracks with the same number. (V3 and A3, V1 and A1, etc.)

Just wanted to mention it, as it is a factor directly conditioning the behavior of this new feature.
(As things currently are, when creating new track for an AV clip we should always create a companion track. Perhaps in the future, if that restriction is lifted, and available counterpart tracks are available for the required time range, just one new track could be created).
Comment 16 Bernd 2025-04-21 17:10:32 UTC
(In reply to Gabriel Gazzán from comment #14)
> I tend to favor dragging the selected clips directly to the place and time
> in the timeline where you want to put them, so essentially you're
> accomplishing two tasks at once: creating the new track(s) and placing the
> clips wherever you need to.
Great point! This also works when the drop zone is between tracks in the header section, I guess. One can safely assume that the timeline is roughly where the new clip would end up. User drags a clip from the bin to the track header section, drop zone opens between, say V3 and V4, user drops the clip, track is created, and clip is dropped right there (beginning of the displayed timeline). User can now drag the clip exactly where they need it in the displayed section of the timeline.

> I'd always offer the user the chance to create new tracks above/below all,
> without having to press a modifier key (improves discoverability of the
> feature), but only offer inserting new tracks between existent ones when the
> modifier key is pressed.
Good thinking! This can be accomplished without a modifier by having multiple drop zone: one above the timeline, one below, and between tracks. So depending on where the user drags the clip the respective drop zone shows up.
Comment 17 Bernd 2025-04-21 17:11:53 UTC
And while we are at it, could we include the ability to move tracks around? Like grab V2 and drop it between V3 and V4?
Comment 18 Gabriel Gazzán 2025-04-22 21:46:13 UTC
(In reply to Bernd from comment #16)
> User drags a clip from the bin to the track
> header section, drop zone opens between, say V3 and V4, user drops the clip,
> track is created, and clip is dropped right there (beginning of the
> displayed timeline). User can now drag the clip exactly where they need it
> in the displayed section of the timeline.

Just to clarify, what you say could be resumed as (correct me if I'm wrong):
1. Drag a clip to the tracks header area to open the drop zone.
2. Drop the clip (in the header area?). The clip will be placed at the start of the new track.
3. Drag the clip in the newly created track to the desired time. END.

I was thinking more of:
1. Drag a clip to the sensitive area** in the timeline (not the header) AND to the desired time.
2. Drop clip there. END.

** Sensitive area: Above the top-most video or below the bottom-most audio tracks. Optionally, when Ctrl is pressed, the sensitive areas would be opening at any track separation lines in the timeline.

It should be very useful if while dragging selected clip(s), borders could snap to things like: timeline cursor, other clips borders, etc.


@balooii
One thing I noticed in the second video is that the time counter in the Timeline toolbar stops tracking the time when the mouse cursor is over the drop zone. It'd be great if it continued tracking the time, so the user could better decide where the clip should be dropped. :)
Comment 19 Bernd 2025-04-23 14:27:00 UTC
(In reply to Gabriel Gazzán from comment #18)
> (In reply to Bernd from comment #16)
> > User drags a clip from the bin to the track
> > header section, drop zone opens between, say V3 and V4, user drops the clip,
> > track is created, and clip is dropped right there (beginning of the
> > displayed timeline). User can now drag the clip exactly where they need it
> > in the displayed section of the timeline.
> 
> Just to clarify, what you say could be resumed as (correct me if I'm wrong):
> 1. Drag a clip to the tracks header area to open the drop zone.
Correct

> 2. Drop the clip (in the header area?). The clip will be placed at the start
> of the new track.
That was the idea, yes. To be precise: It's not the start of the new track (00:00:00,00), but wherever the timeline display is. For example, the timeline shown is from 00:00:10,00 to 00:00:15,00. The clip would be dropped at 00:00:10,00

> 3. Drag the clip in the newly created track to the desired time. END.
Correct

> I was thinking more of:
> 1. Drag a clip to the sensitive area** in the timeline (not the header) AND
> to the desired time.
> 2. Drop clip there. END.
I understand that and find it a good UX. But then a track is only created above the top most track. What if I wanted/needed a new track between V2 and V3?

> ** Sensitive area: Above the top-most video or below the bottom-most audio
> tracks. Optionally, when Ctrl is pressed, the sensitive areas would be
> opening at any track separation lines in the timeline.
Why would I need a modifier for this? Why not make track separation lines sensitive areas from the very start?

> It should be very useful if while dragging selected clip(s), borders could
> snap to things like: timeline cursor, other clips borders, etc.
Agreed
Comment 20 Gabriel Gazzán 2025-04-23 17:22:58 UTC
(In reply to Bernd from comment #19)

> I understand that and find it a good UX. But then a track is only created
> above the top most track. What if I wanted/needed a new track between V2 and
> V3?

In case the user wanted to create a new track between V2 and V3, the procedure would be almost the same, just having to press Ctrl (or another modifier key) to enable the insertion of new track between any two tracks.
As I envision it, the time where the selected clip would be dropped would be always marked by an inverted triangle (maybe smaller than the timeline cursor one) in the time ruler. That way, while dragging, the user will have an exact feedback of the time in which the clips will be dropped, no matter if this is done above all or between any two tracks.

Which rises your very valid question:
> Why would I need a modifier for this? Why not make track separation lines
> sensitive areas from the very start?

Well (and that's debatable, of course, but) the main reason I imagined the use of a modifier key for track insertion between existent tracks, was to avoid the timeline to become a "Xmas tree" every time the user drags a clip to a track for other purposes.
Dragging a clip above the top-most track (or bottom-most track) is a very specific action that I think could trigger the dashed line (or even open that cool preview, @balooii showed us) without causing noticeable hassle or being distracting if activated by error, but I guess, having dashed lines or mini track previews appearing and disappearing as the mouse cursor travels over each tracks division line could be.
So the solution to avoid that would be that, only when the user "declares an intention" to do so (by pressing Ctrl) the said dashed lines would be shown.

Maybe there could be alternate solutions to that, and I'm totally open to them. :)
Comment 21 Bernd 2025-04-24 13:39:26 UTC
(In reply to Gabriel Gazzán from comment #20)
> Which rises your very valid question:
> > Why would I need a modifier for this? Why not make track separation lines
> > sensitive areas from the very start?
> 
> Well (and that's debatable, of course, but) the main reason I imagined the
> use of a modifier key for track insertion between existent tracks, was to
> avoid the timeline to become a "Xmas tree" every time the user drags a clip
> to a track for other purposes.
> Dragging a clip above the top-most track (or bottom-most track) is a very
> specific action that I think could trigger the dashed line (or even open
> that cool preview, @balooii showed us) without causing noticeable hassle or
> being distracting if activated by error, but I guess, having dashed lines or
> mini track previews appearing and disappearing as the mouse cursor travels
> over each tracks division line could be.
> So the solution to avoid that would be that, only when the user "declares an
> intention" to do so (by pressing Ctrl) the said dashed lines would be shown.
That makes perfect sense. Thanks for thinking this through more than I did. I totally agree that this would irritate the user. So, a drop zone only at the top it is. And as a modifier key I suggest the Special key (Windows, Mac) because CTRL is associated with copying while dragging (which may be introduced later so that you can drag&copy clips to other locations in the timeline), and SHIFT may be used for locking horizontal or vertical movement. That leaves ALT as a possible modifier but perhaps we want to use this to switch from insert-at-top to insert-at-bottom.
Comment 22 Gabriel Gazzán 2025-04-24 17:58:30 UTC
Yes, I agree that Ctrl has other common associations, users may expect.
(If I don't remember bad, for example, I think in Premiere Pro when you drag a clip to the timeline pressing Ctrl, the clip gets inserted in whichever track you drop it into, cutting the existent clip and moving it forward, in the process.)

So, any modifier key (that makes sense in the context of the program) will be good for this purpose.