Bug 491074 - [Feature Request] Multi-Track audio editing
Summary: [Feature Request] Multi-Track audio editing
Status: REPORTED
Alias: None
Product: kdenlive
Classification: Applications
Component: Rendering & Export (show other bugs)
Version: 22.04.3
Platform: Ubuntu Linux
: NOR wishlist
Target Milestone: ---
Assignee: Jean-Baptiste Mardelle
URL:
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2024-07-31 17:07 UTC by Uwe Dippel
Modified: 2024-12-23 13:01 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Uwe Dippel 2024-07-31 17:07:29 UTC
***
If you're not sure this is actually a bug, instead post about it at https://discuss.kde.org
***
I had posted the issue there, but was advised to re-post it here. Therefore, it'd be done here.

My issues contain a number of sub-topics under a single umbrella. Therefore, I post all of these here, initially. If so advised, I will gladly spilt the topics into individual reports. Here we go:

I am aware, that this feature (multiple audio tracks)  isn’t available (yet). For us, here in multi-lingual Europe, it is really missing … .

Whatever, I find the ‘workarounds’ difficult, if not flawed (bug?). Why:

1. When I select “Separate file for each audio track”, I obtain files with an extension of mp4. I’d expect mp3 (or, even better, a choice).

2. When I have an original containing 4 tracks, and I de-select 2 of these tracks so that there are only 2 tracks in the timeline, at rendering it produces all 4 tracks, that is 4 audio files with the extension mp4. In my opinion this is a bug, since the renderer ought to respect my choice of audio tracks.

3. Rather a RFE: It would make the later assembly into one file easier, if the first audio track could - as usual - be already included in the output file, and only additional tracks would have to be added later.

4. Is there an easier method or software to do that than ffmpeg? Though it is very versatile, it always requires to add and edit the metadata plus labels. And then I have to have a paper&pen based note on FR(ench) - EN(glish) - DE(german), or other; depending on the original.

Thanks for your ideas!
Comment 1 emohr 2024-10-26 11:12:46 UTC
To summarize: Your idea is in the render dialog to have a choice, like a tick box to render out:
1.	Video + audio track 1 (ambient) + audio track 2 (English) + subtitle track 1 (English)
2.	Video + audio track 1 (ambient) + audio track 2 (German) + subtitle track 1 (English)
3.	Video + audio track 1 (ambient) + audio track 2 (French) + subtitle track 1 (English)

Now, Kdenlive is so “clever” that it renders number 1. and then just the audio of number 2 (German) and 3 (French) and add it together that you have a complete number 2 and 3. Then you have a minimized render time with a maximum on output file.

Is that correct?
Comment 2 Uwe Dippel 2024-10-26 19:30:57 UTC
(In reply to emohr from comment #1)
> To summarize: Your idea is in the render dialog to have a choice, like a
> tick box to render out:
> 1.	Video + audio track 1 (ambient) + audio track 2 (English) + subtitle
> track 1 (English)
> 2.	Video + audio track 1 (ambient) + audio track 2 (German) + subtitle track
> 1 (English)
> 3.	Video + audio track 1 (ambient) + audio track 2 (French) + subtitle track
> 1 (English)
> 
> Now, Kdenlive is so “clever” that it renders number 1. and then just the
> audio of number 2 (German) and 3 (French) and add it together that you have
> a complete number 2 and 3. Then you have a minimized render time with a
> maximum on output file.
> 
> Is that correct?

I'm not so sure I get your comment right. I know that I kind of overloaded the initial request. Maybe we should separate the subtitles all together, since as of now I haven't found a way to add existing sub title files at all (in the time line; not with ffmpeg in the end)?

I think, we should offer the user much more flexibility w.r.t output file(s). In some project, he'll want a single output file with all audio tracks mixed down (ambient(A1), background(A2), music(A3), voices(A4) ...). Another one (like in your example), the user will want a single output file, but with separate audio tracks; to be selected at reproducing (either English or French or Japanese). In this case, including one or more sub title tracks to be selected from, or deselecting all. 

As of now, kdenlive is so "clever" (I hope you like irony as much as I do), that it mixes down all audio tracks automatically together with video (e.g. mp4); and on request ("separate audio tracks") all tracks as individual mp4 audio tracks. 
[I have written some utilities based on ffmpeg to handle the resulting streams for my needs.]
These mp4 audio tracks take a hell of time, because they actually render as video, just without the video information (which is perfect only for 100% correct timing, while AC3 would be like "fire and forget" in this respect; and yet sufficiently precise for most cases).

Yes, for my most frequent purpose, a single output file of V1 plus, including English(A1), French(A2), ... Japanese(An) as MP4 with AC3 audio would be perfect. Including the chance to (de)select individual tracks for that unified output. Which isn't possible yet. -> I have to go to the "Render" window and remove the tracks that I don't want as individual output files. 
Therefore, the "Render" dialogue might be a good choice, though I think it would be easier and clearer, to mark/tick the tracks that one wants in a SINGLE output file, why not in the time line? Like
V2 I
V1 -
A1 I
A2 -
A3 I
will render V2 together A1 and A3 into  a single file. 

Now it will be a design decision: What to do for an extra file: either go back to the timeline, and select another combination, and go to "Render" again, and so forth. 
Or, to use a matrix, with the tracks as lines, and the columns for output files. So 3 columns would mean three output files. 
(My personal preference would be the first method, though.) 

The last decision then is on the eventually desired mixing down to single tracks. I propose to do similar, only with another identifier. Like
V2 M
V1 M
A1 -
A2 M
A3 M
will mix down V1 and V2 into a single video stream, and A2 and A3 into a single audio stream.

For the first user as above, who uses kdenlive to assemble a clip, he'd select
V2 -
V1 I
A1 M
A2 M
A3 M
A4 M
A5 M

I THINK that this is a method with maximal flexibility for all possible uses. Kind of a construction kit for one or more output files for any combination of tracks (streams). Including eventual subtitle tracks.

Sorry, this was pretty long, and hopefully still comprehensible. If not, just keep asking! I'll be glad to explain it further!
Comment 3 Uwe Dippel 2024-10-27 11:19:04 UTC
(For clarification, as example: The current setting with "separate audio tracks does, in the notation of my earlier message, with a time line containing 2 video tracks and 4 audio tracks:)
V2 M
V1 M
A1 M
A2 M
A3 M
A4 M
First file: all video tracks, all audio tracks, mixed down

V2 -
V1 -
A1 I
A2 -
A3 -
A4 -
Second file: first audio track

V2 -
V1 -
A1 -
A2 I
A3 -
A4 -
Third file: second audio track

V2 -
V1 -
A1 -
A2 -
A3 I
A4 -
Fourth file: third audio track

V2 -
V1 -
A1 -
A2 -
A3 -
A4 I
Fifth file: fourth audio track

And there is nothing the user can do about this. At least for versions older than one year, this was decided on the number of audio tracks, so that deactivated tracks, or even empty tracks! were still rendered as individual files. To me, this was just too crude, too predetermined. 
Whatever he wanted, he'd obtain the mixed down video with all audio tracks mixed down as one audio track. Anything the user wouldn't need in the rendered outputs in as separate audio track, he'd have to delete that track from the time line. Respectively abort the rendition from the Render window.
Comment 4 Uwe Dippel 2024-12-23 13:01:13 UTC
(While this one is still pending,)
I can confirm, with many thanks, that the previous / accompanying bugs (491124, 491108, 491109, 491163) have been completed according to my suggestions. I hope that everyone finds 24.12.0 as enjoyable as I do!?
My thanks go to everyone involved.

With all of this preliminary work, it shouldn't be a great step, to assemble those - by now user-defined - streams into a single container, I guess?