Bug 417868 - Specific WAV files not played when seeking / out of sync when cut into several parts
Summary: Specific WAV files not played when seeking / out of sync when cut into severa...
Status: RESOLVED UPSTREAM
Alias: None
Product: kdenlive
Classification: Applications
Component: Rendering & Export (other bugs)
Version First Reported In: 19.12.2
Platform: Neon Linux
: HI normal
Target Milestone: ---
Assignee: Jean-Baptiste Mardelle
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-02-19 10:50 UTC by Mahendra Tallur
Modified: 2020-03-03 22:01 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:
fritzibaby: Brainstorm+


Attachments
WAV flle triggering the issue. (1.70 MB, audio/x-wav)
2020-02-19 10:50 UTC, Mahendra Tallur
Details
video description (959.81 KB, image/gif)
2020-03-03 13:16 UTC, farid
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mahendra Tallur 2020-02-19 10:50:36 UTC
Created attachment 126158 [details]
WAV flle triggering the issue.

SUMMARY

After recording a WAV file from my phone (LineageOS Android / "Soundrecorder") I and inserting it into the Kdenlive timeline, I noticed the file would only be played when the "time" cursor is first set before the beginning of the audio file in the timeline.

If I seek / start playing the video preview after the beginning of the aforementioned WAV file, I hear no audio. If I cut the audio file (inside of kdenlive) into several pieces, each piece is played at a bad offset relatively to the full WAV file.

After double checking with other WAV files, I figured out it would only happen with WAV files produced by the Android Soundrecorder. They don't seem to be corrupt though, I can open them in Audacity etc.

STEPS TO REPRODUCE
1. Record a WAV file from the Android Soundrecorder
2. Import it into any Kdenlive project
3. Insert it into the project timeline
4. Move the cursor between the beginning and the end of the WAV file
5. Play the preview

OBSERVED RESULT

Audio is not played (at least, the relevant audio track).

EXPECTED RESULT

WAV file should be heard.

SOFTWARE/OS VERSIONS

Linux/KDE Plasma: KDE Neon, up to date, Plasma 5.18.1, KDE Apps 19.12.2
(available in About System)
KDE Plasma Version: 5.18.1
KDE Frameworks Version: 5.67.0
Qt Version: 5.13.2

ADDITIONAL INFORMATION
Audio editing / previewing / cutting work perfectly when using WAV files from other sources (though I only tried a couple of them -- incl. with the same bitrate / frequency) and with MP3 files. Audio is played when the cursor is set before the inserted audio sample.
Comment 1 farid 2020-03-03 13:16:56 UTC
Created attachment 126566 [details]
video description
Comment 2 Jean-Baptiste Mardelle 2020-03-03 22:01:46 UTC
There definitely is something confusing MLT with this file.
Playing it in mlt's command line player also reproduces the problem when seeking:

melt broken-file.wav

However a simple remuxing fixes the issue:

ffmpeg -i broken-file.wav -acodec copy result.wav

Not sure we can support every file produced by any app...
Please open an issue in MLT if you want some more details:
https://github.com/mltframework/mlt/issues