Bug 353251

Summary: 1 video 2 audio tracks muted audio 2 kills audio 1
Product: [Applications] kdenlive Reporter: Steve <stevej>
Component: User Interface & MiscellaneousAssignee: Jean-Baptiste Mardelle <jb>
Status: RESOLVED UNMAINTAINED    
Severity: major CC: ed.rogalsky, Harmandhadli97, julius.kuenzel, wegwerf-1-2-3
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Illistration on muting wrond track.
eddrogs track layout

Description Steve 2015-09-27 18:44:08 UTC
I typically have 2 video tracks and 2 audio tracks. Audio is sometimes not cumulative, meaning that sometimes I hear all tracks and somtimes I don't.

Here is one instance that is easily reproduceable.
One video on Video Track 2
One audio on Audio Track 1
One audio on Audio Track 2
Mute Audio Track 2

RESULT:
Audio Track 1 is silent

If I mute Audio Track 1 and unmute Audio Track 2, I hear both Video Track 2 and Audio Track 2 as expected.

If I mute Audio Track 2 and Video Track 2, I hear Audio Track 1 as expected.
Comment 1 Filipp Sudanov 2016-05-28 12:35:46 UTC
Created attachment 99228 [details]
Illistration on muting wrond track.

On this screenshot track "Audio 4" is muted. However, at the position of playhead, track "Audio 2" also does not play, only top-most "Sony" audio track produces sound. As soon, as clip on "Sony" track ends, track "Audio 2" starts playing.
Comment 2 Jean-Baptiste Mardelle 2016-05-30 21:18:27 UTC
Git commit c2f2d95147a53519188b09859ca1ff8f0118ec4c by Jean-Baptiste Mardelle.
Committed on 30/05/2016 at 21:18.
Pushed by mardelle into branch 'master'.

Fix audio mix when muting lower tracks

M  +17   -19   src/timeline/timeline.cpp

http://commits.kde.org/kdenlive/c2f2d95147a53519188b09859ca1ff8f0118ec4c
Comment 3 eddrog 2016-06-03 12:20:54 UTC
@j-b-m: it still happens in git master head if a new additional audio track is added. In this case we have same problem. You fix works with 3 audio tracks. 

Steps to do:
1. Play with additional audio tracks e.g. create audio track 4 and 5
2. Place music on track 3 and 4 => bang!!!
3. Mute track 5 -> all works like expected.
Comment 4 Jean-Baptiste Mardelle 2016-06-03 14:15:37 UTC
Git commit 44e585c5a3b9c4cdc62a56c00fad7478f0ab6051 by Jean-Baptiste Mardelle.
Committed on 03/06/2016 at 14:15.
Pushed by mardelle into branch 'master'.

Check audio mix on track add/remove

M  +4    -0    src/timeline/customtrackview.cpp

http://commits.kde.org/kdenlive/44e585c5a3b9c4cdc62a56c00fad7478f0ab6051
Comment 5 eddrog 2016-06-04 18:58:09 UTC
@j-b-m: still not fixed for me. See screenshot for tracks layout.
Comment 6 eddrog 2016-06-04 18:59:19 UTC
Created attachment 99367 [details]
eddrogs track layout

track layout
Comment 7 Jean-Baptiste Mardelle 2016-06-05 16:24:11 UTC
Git commit a39b2788214487948939d483feadac22e2791121 by Jean-Baptiste Mardelle.
Committed on 05/06/2016 at 16:23.
Pushed by mardelle into branch 'master'.

Fix possible corruption on add track
Fix audio mix on some track layouts

M  +14   -0    src/doc/documentvalidator.cpp
M  +5    -3    src/doc/kdenlivedoc.cpp
M  +25   -14   src/renderer.cpp
M  +2    -18   src/timeline/timeline.cpp

http://commits.kde.org/kdenlive/a39b2788214487948939d483feadac22e2791121
Comment 8 Wegwerf 2016-06-06 07:41:00 UTC
Jean-Baptiste, as you mentioned possible add track corruption: with your recent changes incorporated I still see problems after adding a track using the "Insert Track" context menu from the track headers.

My project setup: V4, V3, V2, V1, A1, A2

It's probably important that there are audio clips on A1.

Now, when I insert a new audio track (A0) above A1 the following happens:
* A0 gets inserted between V1 and A1 -- as it should be.
* all audio clips from A1 are now shown on A0 -- albeit they will be correctly saved as belonging to A1, so after reloading the project all is fine.
* I can see that A2 is still there, but on my setup it gets clipped and the timeline does not show any vertical scrollbar.
Comment 9 Vincent PINON 2016-06-07 21:46:55 UTC
Git commit 85e9f4f1c611289431fa6bb9f23bf6c5d360b735 by Vincent Pinon, on behalf of Jean-Baptiste Mardelle.
Committed on 07/06/2016 at 20:34.
Pushed by vpinon into branch 'Applications/16.04'.

Check audio mix on track add/remove

M  +4    -0    src/timeline/customtrackview.cpp

http://commits.kde.org/kdenlive/85e9f4f1c611289431fa6bb9f23bf6c5d360b735
Comment 10 Wegwerf 2016-07-30 10:48:53 UTC
Steve, this sounds right like the so-called "internally added" audio mixers got, well, mixed up (sorry for the pun). I've seen this also with one of my older projects. We've found this out just these weeks and the recent Kdenlive 16.07.90 beta version already has fixes in place. There's even an online Kdenlive project analyzer that can help tracking down mixing issues: https://thediveo.github.io/kdenlive-project-analyzer/kdenlive-project-analyzer.html

I would like to ask you to try your existing project loading into the recent beta version. The audio tracks then should behave as expected. If not, please add a single track, and check again, then audio mixing should be fine. You can later remove this empty track again. The reason is that Kdenlive now recreates its internal per-track audio mixers upon loading and in any case when adding or removing a timeline track.

If this solves your problem, I would like to ask you to close this bug report as RESOLVED FIXED. Thank you very much for your cooperation!
Comment 11 Julius Künzel 2021-08-14 08:16:21 UTC
This report is very old and most of the responsible code has been completely rewritten during the refactoring a few years ago so I am closing it now. Feel free to reopen if you still see a similar problem. Thanks again for your report!