| Summary: | Audio thumbnail wrong for second audio track in mkv with two audio tracks | ||
|---|---|---|---|
| Product: | [Applications] kdenlive | Reporter: | gdorn_kde |
| Component: | Audio Effects & Transitions | Assignee: | Jean-Baptiste Mardelle <jb> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | fritzibaby |
| Priority: | NOR | Keywords: | triaged |
| Version First Reported In: | 24.12.2 | ||
| Target Milestone: | --- | ||
| Platform: | Manjaro | ||
| OS: | Linux | ||
| Latest Commit: | https://invent.kde.org/multimedia/kdenlive/-/commit/4fc03d21abfae214c6497e2c347fc8a39a83683a | Version Fixed/Implemented In: | 25.04.0 |
| Sentry Crash Report: | |||
| Attachments: |
Clip exhibiting issue
Screenshot showing issue |
||
|
Description
gdorn_kde
2025-03-09 22:41:53 UTC
Well, I'd fix the description field, but there's no edit button. Feel free to dress this one up. Thank you for reporting. We have a complete new audio wave form calculation in the upcoming version 25.04. If you don't mind have a look on the latest master build and check if the issue is still happen. https://cdn.kde.org/ci-builds/multimedia/kdenlive/master/linux/ Please keep in mind that the master is for testing only. Any feedback is welcome. Can you please confirm if the issue still happens with development builds ? Or provide a sample clip reproducing the issue. Without further feedback, we will close this bug. Ah, I did not realize that the bug tracking system was not set up to ingest email. I did extensive testing and attempted to send this on March 11: Yes, I just tested on Kdenlive Version 25.07.70 and found the same result - the thumbnail for the second audio track is incorrect. Master is showing an additional bug, though - at some zoom levels, the second half of the thumbnail is simply blank. Sometimes when previewing it'll populate the second half, and then if I change zoom levels the thumbnail changes somewhat randomly, though never representing what is actually being played. I re-tested the same file on 24.12.2 and it does not show this behavior, just the thumbnail being wrong, so whatever change is in master may actually be worse at this. More details regarding the original bug: - It doesn't appear to be codec-related. I thought might be caused by the Opus codec, but I have some MKVs containing two Opus tracks that produce the bug, and some that do not. It may relate to length; I'm still looking for a file shorter than a half hour that exhibits the bug. - The thumbnail appears to be shifted left by 7-8 seconds, at least in this one test case. If I compare the audio track in audacity, both it and kdenlive play the sound at the right time, but kdenlive's thumbnail looks like the sound should have play about 7-8 seconds earlier. When the master version doesn't exhibit the additional instability bug, that offset is consistent across versions. Could you check if the 2 audio streams have the same length ? This command should print the length of the first audio stream: ffmpeg -i input.mkv -c copy -map 0:a:0 -f null - 2>&1 | tail -3 | grep -oP "(?<=time=).+?\s" And for the second stream: ffmpeg -i input.mp4 -c copy -map 0:a:1 -f null - 2>&1 | tail -3 | grep -oP "(?<=time=).+?\s" Created attachment 179894 [details]
Clip exhibiting issue
Short clip showing issue. Track 1 is fine, but thumbnail for track 2 shows audio several seconds before the actual audio content.
Added a clip showing the issue. In the full file, the lengths are 02:13:07:72 for track 1 and 02:13:07:82 for track 2. In the shorter clip, the lengths are 00:00:14.99 and 00:00:15.01. Neither seems sufficiently different to account for 7 seconds of offset. Created attachment 179895 [details]
Screenshot showing issue
In this screenshot, the second audio track shows an audio waveform of a brief voice clip; it suggests the voice is present roughly halfway through the clip, but the voice does not actually begin until the last couple seconds.
Comment on attachment 179895 [details]
Screenshot showing issue
Ignore the filename in the screenshot; I had to transcode to get under the 4MB limit, but the new file also looks the same.
Thanks for providing the file. I can confirm that the clip thumbnail in timeline for the second stream has an offset, but the audio preview for the two streams in the Clip monitor is still correct. Will work on it. Git commit 4fc03d21abfae214c6497e2c347fc8a39a83683a by Jean-Baptiste Mardelle. Committed on 01/04/2025 at 09:09. Pushed by mardelle into branch 'release/25.04'. Fix timeline audio thumbnails for clips with multiple streams and different channel count FIXED-IN: 25.04.0 M +2 -2 src/bin/projectclip.cpp M +2 -2 src/bin/projectclip.h M +4 -1 src/lib/audio/audioStreamInfo.cpp M +1 -1 src/lib/audio/audioStreamInfo.h M +1 -1 src/timeline2/model/clipmodel.cpp https://invent.kde.org/multimedia/kdenlive/-/commit/4fc03d21abfae214c6497e2c347fc8a39a83683a |