Bug 474140 - Restore audio only inserts first audio stream for videos with multiple audio streams
Summary: Restore audio only inserts first audio stream for videos with multiple audio ...
Status: RESOLVED FIXED
Alias: None
Product: kdenlive
Classification: Applications
Component: Audio Effects & Transitions (show other bugs)
Version: git-master
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Jean-Baptiste Mardelle
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-09-04 13:38 UTC by Bauke
Modified: 2025-03-25 06:05 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Bauke 2023-09-04 13:38:55 UTC
SUMMARY
***
Restore audio only restores the first audio stream of the video. If there's multiple audio streams, those cannot easily be recovered.

I ran into this bug while trying to recover from data loss caused by bug 474139.
***

STEPS TO REPRODUCE
1. Add a video with two audio streams to the timeline
2. Right click the video → Ungroup clips
2. Delete both audio clips
3. Right click the video → Restore audio

OBSERVED RESULT
Only the first audio stream is added

EXPECTED RESULT
Both audio streams are added

SOFTWARE/OS VERSIONS
Kdenlive: 23.11.70 (from ppa:kdenlive/kdenlive-master)
Linux: Kubuntu 23.04
KDE Plasma Version: 5.27.4
KDE Frameworks Version: 5.104.0
Qt Version: 5.15.8
Comment 1 Cheddar Fox 2025-03-22 23:35:31 UTC
I have the same issue in Windows in the 24.12.1 version
Comment 2 Jean-Baptiste Mardelle 2025-03-25 05:49:48 UTC
Git commit d7620212a29f1620e58926375aad1749d984264b by Jean-Baptiste Mardelle.
Committed on 25/03/2025 at 05:49.
Pushed by mardelle into branch 'release/25.04'.

Correclty restore all audio streams in restore audio operation.
Also, we should use active tracks not audio target tracks to restore
FIXED-IN: 25.04.0

M  +13   -5    src/lib/audio/audioStreamInfo.cpp
M  +1    -0    src/mltcontroller/clipcontroller.cpp
M  +42   -36   src/timeline2/model/timelinefunctions.cpp
M  +3    -2    src/timeline2/model/timelinefunctions.hpp
M  +7    -8    src/timeline2/model/timelineitemmodel.cpp
M  +1    -1    src/timeline2/model/timelineitemmodel.hpp
M  +7    -15   src/timeline2/view/timelinecontroller.cpp
M  +0    -2    src/timeline2/view/timelinecontroller.h
M  +1    -1    tests/modeltest.cpp
M  +4    -4    tests/trimmingtest.cpp

https://invent.kde.org/multimedia/kdenlive/-/commit/d7620212a29f1620e58926375aad1749d984264b
Comment 3 Cheddar Fox 2025-03-25 06:05:56 UTC
Sweet. 👍🏻