brian
January 3, 2023, 5:02am
#22
Thanks for the minimal project.
I’ve been “squinting” my ears on these files and I am really struggling. In all my listening tests, the original WAV file, the Shotcut preview playback and the exported file all sound the same. I’m afraid that my perception is not good enough to hear any difference. Hopefully someone else will be able to hear a difference in the example you provided.
Can you explain this more? In the minimal project, there is only one clip from the WAV file. There are not multiple parts.
Tomade
January 3, 2023, 7:53am
#23
Hello Brian, right, I cutted the original source only into one short part. The most (at least to me) noticable clicks are right at the beginning of the exported file.
st599
January 4, 2023, 9:14am
#24
Does the click disappear if you put a 1 video frame length audio fade in and out? Is it just a discontinuity caused by cutting?
Tomade
February 9, 2023, 10:26am
#25
Hi, it appears with and without a fader. I tried several lenghts of fades but it didn’t work. If I put in a one-frame-fade in audio, the audio completly disappears (another bug?). With a 2-frame-fader it works, but the cracklings and noises are still here.
Tomade
February 9, 2023, 10:27am
#26
Hi Brian. Here I have another minimal example which has even more noticeable noises in the export that are not in the sourcefile.
crackling_example_2.zip (4.9 MB)
Thanks for your effort!
brian
February 10, 2023, 2:30am
#27
Your project contains raw flac files. Unfortunately, that is known to be problematic in Shotcut. The underlying FFMPEG library does not seek well with raw flac. And we have not found a solution. FLAC in MKV in works better.
Use Properties > menu > Convert to Edit-friendly.
Alternatively, I suggest to remux that to a mkv file using ffmpeg ffmpeg -i your.flac -c copy your.mkv
.
Additional reading:
Windows 10 with Shotcut version 21.06.29
I made a sine wave in Audacity and exported it as FLAC. I imported it in Shotcut, put it on an audio track, split it in 10 places, then exported it using the FLAC preset. It is distorted in many places, and the waveform is visibly distorted in some places when put back into Audacity to analyze it.
Also this is unrelated to splitting audio, but the file was inexplicably 48 ms longer whether it was split or not.
opened 03:03PM - 15 Oct 21 UTC
### Description
When rendering an MLT file referencing a FLAC audio file, the r… endered output will contain audible artifacts (crackles, pops) if the producers in offset is greater than zero (beginning is cropped), otherwise the audio is clean.
### Reproduction
1. Generate a 5 second sine wave FLAC audio using ffmpeg: `ffmpeg -f lavfi -i "sine=frequency=1000:duration=5" sine.flac`
2. Create two MLT files crackle.mlt and clean.mlt with the following content:
```
<?xml version="1.0" standalone="no"?>
<mlt LC_NUMERIC="C" version="7.0.0" title="Shotcut version ARCH-21.08.29" producer="main_bin">
<profile description="PAL 4:3 DV or DVD" width="1920" height="1080" progressive="1" sample_aspect_num="1" sample_aspect_den="1" display_aspect_num="16" display_aspect_den="9" frame_rate_num="60" frame_rate_den="1" colorspace="709"/>
<chain id="sine" out="00:00:04.983">
<property name="length">00:00:05.000</property>
<property name="eof">pause</property>
<property name="resource">sine.flac</property>
<property name="mlt_service">avformat-novalidate</property>
<property name="seekable">1</property>
<property name="audio_index">0</property>
<property name="video_index">-1</property>
<property name="mute_on_pause">0</property>
<property name="xml">was here</property>
</chain>
<playlist id="playlist0">
<entry producer="sine" in="<in_offset>" out="00:00:04.983"/>
</playlist>
</mlt>
```
3. replace `<in_offset>` of crackle.mlt with `00:00:01.000`
4. replace `<in_offset>` of clean.mlt with `00:00:00.000`
5. play crackle.mlt: `melt crackle.mlt`
6. play clean.mlt: `melt clean.mlt`
You will notice that rendering crackle.mlt produces artifacts while clean.mlt doesn't
### Workaround
If you use uncompressed WAV audio instead of FLAC there are no issues whatsoever.
### Technical Info
* MLT version: `7.0.1`
* FFmpeg version: `n4.4`
* OS: `5.10.68-1-MANJARO #1 SMP PREEMPT Wed Sep 22 12:29:47 UTC 2021 x86_64 GNU/Linux`
### Additional Info
The MLT data used here was created by reproducing the problem in Shotcut (ARCH-21.08.29) and stripping the resulting MLT file to the bare minimum (as far as I could tell without knowing too much about MLT XML). The same problem can be reproduced using kdenlive (21.08.1) as it also uses MLT as its rendering backend. I also tried different FLAC bit-depths (16 and 24 bit) as well as sampling-rates (44,1kHz and 48kHz), but the problem stays the same.
I noticed when you are working with imported FLAC audio tracks in shotcut, the audio kind of chops for a split second. Only happens with FLAC, WAV and other formats had no issues at all. Any way to fix that?
I have these audio crackling / popping noises when playing the file back but also in the exported output. Here is an example of this: help.wav - Google Drive
OS: Windows 11 (64 bit)
Shotcut version:22.06.23
Qt version: 5.15.2
Any ideas on what I can do? I don’t want to throw the project away
Tomade
February 10, 2023, 6:42am
#28
Thank you, I’ll try it with that and avoid flac.