Curious slow audio fade-in with certain USB audio card ... SDL-related?

Harald Albrecht harald.albrecht at gmx.net
Thu Sep 7 16:04:18 UTC 2017


Note: I've finally found a setting that avoids the slow audio fade-in, 
see below for the impatient. However, I've checked several combinations 
until I got one without the fade-in... (*phew*)

So I tried first, as suggested, playing a clip in melt.

1. at the beginning while playing the clip, there's an unwanted 2s audio 
fade-in, that's not present in the clip. For reference, when I play the 
same clip using VLC, audio is immediately audible, without the fade-in. 
So neither the Steinberg UR22mkII nor the USB audio kernel driver seems 
to be involved in the unwanted audio fade-in.

2. when stopping playback in melt using the "5" key, and then only after 
several seconds continuing playing using "p", there's no audio fade-in 
either.

To me, this looks like "melt" is opening the audio playback channel only 
once (through the SDL consumer?), and this causes an unwanted audio 
fade-in. I've no idea why this happens with the Steinberg UR22mkII, but 
not with the Behringer QX1202USB. In contrast to Kdenlive, "melt" keeps 
the consumer "open", while Kdenlive seems to "reset" it, for my lack of 
a better description.

Finally, I checked with either Kdenlive's audio backend "SDL" and 
"RtAudio": now it's getting interesting, so test the variances:

a. automatic --> NAY :( fade-in
b. OSS --> YEAH! no fading
c. ALSA --> YEAH! no fading
d. PulseAudio --> NAY :(
e. OSS w/DMA --> doesn't give any sound at all, not unexpectedly ... ;)
f. Esound daemon --> doesn't work at all
g. ARTS daemon --> doesn't work at all

As for a suitable sample, just take some clip with audio that starts at 
the beginning of the clip. The problem is, that the fade-in problem 
seems to affect only some USB audio cards, but not others. Anyway, VLC 
doesn't suffer the unwanted fade-in; it's set to "automatic" for its 
audio output module. I've also tested to set it to "ALSA" or 
"pulseaudio", and there's no fade-in either.

And that's crazy, considering that Kdenlive set to "automatic" or 
"PulseAudio" has a fade-in, while VLC set to "pulseaudio" hasn't. Oh 
well...!

BTW, my system is a (K)Ubuntu 17.04 stock installation.

Best regards,
Harald


Am 07.09.2017 um 07:16 schrieb jb at kdenlive.org:
>
> On September 6, 2017 9:28:31 PM GMT+02:00, Harald Albrecht <harald.albrecht at gmx.net> wrote:
>> Hi,
> Hi,
>
>> here's a difficult question, I couldn't solve so far despite extensive
>> research. Maybe someone here from devs/users can help?
>> Some weeks ago I got myself a Steinberg UR22mkII USB audio mic
>> preamp+playback for recording voice overs. So far, I were using a more
>> bulky Behringer 12chan USB audio mixwr with mic preamps.
>> I'm noticing a strange audio behavior when using the UR22mkII in
>> Kdenlive, which I don't see in Audacity: whenever stopping playing the
>> project timeline, and then a few seconds later restarting it, there's a
>> 1s-2s clearly audible audio fade in. This doesn't happen with the
>> Behringer. This fade in basically makes editing and arranging audio
>> clips impossible. For reference, when I'm using the Steinberg UR22mkII
>> with my Android tablet to record audio, there's no such unwanted audio
>> fade-in, and playback immediately is at the correct level.
>> Could the unwanted fade be related to how MLT/Kdenluve use SDL?
> First step is to play one of your audio file directly with mlt:
> melt myaudio.wav
>
> Then during playback, pause, seek and play. Does the fade also appear ? If it does we should open an issue in Mlt with an attached audio sample.
>
> If it does not, it is probably related to the audio mix transitions we have in Kdenlive, and sharing a small audio sample would help us make some tests.
>
> Regards
>
>
>> Yes, my question may, erm, sound strange. But after checking drivers,
>> aufio setup, et cetera, this is the best educated guess I can make at
>> the moment. Maybe the devs can, erm, chime in?
>> Best regards, Harald



More information about the kdenlive mailing list