JvanKatwijk / qt-dab

Qt-DAB, a general software DAB (DAB+) decoder with a (slight) focus on showing the signal
http://www.sdr-j.tk
GNU General Public License v2.0
293 stars 61 forks source link

Audio skips/jitter in playback #188

Closed Weppel closed 2 years ago

Weppel commented 3 years ago

Very nice work on qt-dab @JvanKatwijk!

I've installed qt-dab (dab-maxi) on a Raspberry Pi 4 with the latest Raspberry Pi OS. I also have a rtl-sdr v3 stick. I'm receiving fine, but I'm experiencing audio skips/jitter (like a bad CD skipping over) every minute or so.

My signal looks good.

image

Sometimes I'm even picking up multiple transmitters (21+16 and 21+04) and it does seem to be jumping between those two from time to time. Mostly it stays on 21+16 but occasionally it jumps to 21+04.

I've also adjusted latency to "30" as per recommendations I found elsewhere.

I've tried swapping the Pi (v4 > v3), new OS install, new stick, new antenna, all still result in the same issue.

Any idea how to solve this issue?

JvanKatwijk commented 3 years ago

a. if you look at the processor load (e.g. by looking at htop), is the processor load divided (more or less( equally over the cores or is there a single core with most of the load b. from the picture it is not clear what audio device you selected. It might be a buffer issue then, in the ".ini" file there is a setting for the size of the audio buffers

Op ma 16 nov. 2020 om 22:15 schreef Weppel notifications@github.com:

Very nice work on qt-dab @JvanKatwijk https://github.com/JvanKatwijk!

I've installed qt-dab (dab-maxi) on a Raspberry Pi 4 with the latest Raspberry Pi OS. I also have a rtl-sdr v3 stick. I'm receiving fine, but I'm experiencing audio skips/jitter (like a bad CD skipping over) every minute or so.

My signal looks good. Sometimes I'm even picking up multiple transmitters:

[image: image] https://user-images.githubusercontent.com/6195608/99309085-33220500-2859-11eb-9df9-641095342675.png

I've tried swapping the Pi (v4 > v3), new OS install, new stick, new antenna, all still result in the same issue.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/JvanKatwijk/qt-dab/issues/188, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACCPHQFNBT3DH6LVJV6EOBTSQGJADANCNFSM4TXWWDRA .

-- Jan van Katwijk

Weppel commented 3 years ago

Processor load isn't equally divided over cores, but I also do not see a single core being overloaded/maxed:

image

As for buffers I've already set "latency=30", but this does not seem to solve the problem. Will raising this value even higher possibly fix this?

For output, I'm not using local playback but rather the record function.

JvanKatwijk commented 3 years ago

OK, I'll have a look at the record function later today.

Op di 17 nov. 2020 om 08:44 schreef Weppel notifications@github.com:

Processor load isn't equally divided over cores, but I also do not see a single core being overloaded/maxed:

[image: image] https://user-images.githubusercontent.com/6195608/99360504-fbdf4280-28b0-11eb-8fff-2e9b0c4c0a56.png

As for buffers I've already set "latency=30", but this does not seem to solve the problem. Will raising this value even higher possibly fix this?

For output, I'm not using local playback but rather the record function.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/JvanKatwijk/qt-dab/issues/188#issuecomment-728748398, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACCPHQEML4HPEYP6DZXA4RLSQISWZANCNFSM4TXWWDRA .

-- Jan van Katwijk

JvanKatwijk commented 3 years ago

I just made a 10 minute recording on an RPI 3, and when playing the recording with aplay on the RPI there was no jitter/skipping at all. (I recorded with an SDRplay, not a stick). Can you send me recording (well, a link to it)? then maybe I'm able to detect a pattern or so What device are you using to write the file on? an usb stick, or an ssd card.

Given that it is not a performance issue, the possibilities seem to be a. the input is distorted, and ithe decoding of sound fragments fails b. writing the output gives problems

Op wo 18 nov. 2020 om 11:19 schreef jan van katwijk <j.vankatwijk@gmail.com

:

OK, I'll have a look at the record function later today.

Op di 17 nov. 2020 om 08:44 schreef Weppel notifications@github.com:

Processor load isn't equally divided over cores, but I also do not see a single core being overloaded/maxed:

[image: image] https://user-images.githubusercontent.com/6195608/99360504-fbdf4280-28b0-11eb-8fff-2e9b0c4c0a56.png

As for buffers I've already set "latency=30", but this does not seem to solve the problem. Will raising this value even higher possibly fix this?

For output, I'm not using local playback but rather the record function.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/JvanKatwijk/qt-dab/issues/188#issuecomment-728748398, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACCPHQEML4HPEYP6DZXA4RLSQISWZANCNFSM4TXWWDRA .

-- Jan van Katwijk

-- Jan van Katwijk

andimik commented 3 years ago

Well, I am using RPI and Qt-DAB for recording, too.

But my recordings are error free.

Maybe you should specify which record function you are talking about:

RAW UFF (XML) AAC

zeitfalle commented 3 years ago

I also use the recording function to record for 6-8 hours per day on a Raspberry Pi 4 - I have never had any problem whatsoever. Could it be possible that you might be using a bad SD-Card (if that is what you are actually using)?

Weppel commented 3 years ago

Interesting! What settings did you guys use in .qt-dab.ini?

I'm recording using the regular record function, this outputs a WAV file. I'm recording it to a mounted NFS volume to prevent overloading the SD card. I'll plug in a local USB stick to see if that helps.

I'll try and get a sample file soon.

andimik commented 3 years ago

No special settings.

From time to time I even delete this file. It will be created at the next start, the default settings are fine.

If you use raw, then you can save 50%. Wave (*.sdr) are 16bit, an RTLSDR dongle is 8bit only.

Update: Do you want to record a service (= radio station) or the complete ensemble as IQ samples?

JvanKatwijk commented 3 years ago

what AAC decoder did you include in the configuration ? fdkaac or faad

I seem to recall that when using fdkaac there were some glitches in the audio output

Op wo 18 nov. 2020 om 17:03 schreef Weppel notifications@github.com:

Interesting! What settings did you guys use in .qt-dab.ini?

I'm recording using the regular record function, this outputs a WAV file. I'm recording it to a mounted NFS volume to prevent overloading the SD card. I'll plug in a local USB stick to see if that helps.

I'll try and get a sample file soon.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/JvanKatwijk/qt-dab/issues/188#issuecomment-729778070, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACCPHQEAW7OO5C5CBJNQH6TSQPV37ANCNFSM4TXWWDRA .

-- Jan van Katwijk