Bug 451971 - Waveform audio visualization doesn't display correctly for some clips
Summary: Waveform audio visualization doesn't display correctly for some clips
Status: CONFIRMED
Alias: None
Product: kdenlive
Classification: Applications
Component: Timeline & Editing (show other bugs)
Version: git-master
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Jean-Baptiste Mardelle
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-03-27 20:09 UTC by Mazin07
Modified: 2024-10-01 19:14 UTC (History)
3 users (show)

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


Attachments
Demo file showing this bug (1.32 MB, video/x-matroska)
2022-03-27 20:09 UTC, Mazin07
Details
waveform misalign (130.97 KB, image/png)
2022-09-18 01:04 UTC, thompson
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mazin07 2022-03-27 20:09:42 UTC
Created attachment 147776 [details]
Demo file showing this bug

SUMMARY

I am using SimpleScreenRecorder to record some desktop clips including captured audio from the programs. The audio plays fine in kdenlive and any other program I use, but the visualization is incorrect, making it useless for editing.

File is a MKV with Vorbis audio.

STEPS TO REPRODUCE
1. Download the attached video file and add to a Kdenlive project.

OBSERVED RESULT
Audio visualization doesn't match actual audio.

EXPECTED RESULT
Audio visualization matches actual audio.

SOFTWARE/OS VERSIONS

Linux/KDE Plasma: Ubuntu 20.04.4
(available in About System)
Kdenlive: 	kdenlive-master-165-linux-centos_64-gcc.AppImage	Mar 24, 2022
Comment 1 erjiang 2022-05-11 03:11:56 UTC
The bug is because the audio in the demo file is not centered at zero.  Looks like Kdenlive shows audio amplitude as `max(highest_value, -lowest_value)` but it would need to instead calculate the value range within each time window. Otherwise a silent audio track that's not centered at zero will look like a non-silent track.
Comment 2 thompson 2022-09-18 01:04:03 UTC
Created attachment 152175 [details]
waveform misalign
Comment 3 thompson 2022-09-18 01:04:29 UTC
I would also add to this. I rendered out a 4 audio track video. Beside the issue of volume not displayed correctly, the waveforms are also offset and no longer aligned with master bus (track1) 

above kdenlive 22.04.3 on windows 10

below davinci resolve 18.0.36