Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to increase recording quality? #119

Closed
mako19 opened this issue Mar 18, 2019 · 32 comments
Closed

How to increase recording quality? #119

mako19 opened this issue Mar 18, 2019 · 32 comments

Comments

@mako19
Copy link

mako19 commented Mar 18, 2019

I see that MP3s generated are 24kBit/s, what do I need to change and where to make it at least 128kBit/s, and generally as good as possible? I miss greatly the ausio filter that is present in SDRsharp. Without it my weak airband is not intelligible. Thanx.

@mako19 mako19 changed the title How to increasr recording quality? How to increase recording quality? Mar 18, 2019
@szpajder
Copy link
Collaborator

szpajder commented Mar 19, 2019 via email

@mako19
Copy link
Author

mako19 commented Mar 21, 2019

Thanx. Where do I modify the code to make it 128 kbps? I have unstable brach so it is by default filtered 100-2500 Hz, and yet my receptions are not intelligible. But they are intelligible in SDRsharp. If only there was a workaround this!

@szpajder
Copy link
Collaborator

szpajder commented Mar 21, 2019 via email

@mako19
Copy link
Author

mako19 commented Mar 21, 2019

Yes, I am comparing these all the time. My system is a Yagi airband antenna pointed towards UUEE airport. I receive planes on ground, albeit barely. Then goes airband filter and LNA, a splitter and 2 identical dongles. First let's compare two identical parts against themselves. Here are SDRSharp settings and a sample file. First part is from one dongle and second part from the other. You see, both screenshots and audio look almost identical.
https://dropmefiles.com/GQjIL
2sharp

@mako19
Copy link
Author

mako19 commented Mar 21, 2019

Gain is index 14 which corresponds to 7.0dB according to rtl-test program.

@mako19
Copy link
Author

mako19 commented Mar 21, 2019

Here is a comparison between SDRSharp and Rtl-Airband with all parameters equal
https://dropmefiles.com/6MM4s
I had to change to strong frequency as rtl-airband records would be inaudible otherwize

@szpajder
Copy link
Collaborator

szpajder commented Mar 21, 2019 via email

@mako19
Copy link
Author

mako19 commented Mar 21, 2019

This is an inaudible recording example. Please note that no settings were changed on either dongle compared to the previous example, only frequency is now the weak one.
https://dropmefiles.com/PQW8Q
The two scrrenshots are made just before the recording and during the recording. Both Sharp and RTL-Airband are shown and a config file.
121 8

@mako19
Copy link
Author

mako19 commented Mar 21, 2019

Both of my dongles are FC0013
rtl-test

@mako19
Copy link
Author

mako19 commented Mar 21, 2019

Yes I prefer squelch always on, not to lose any data at the beginning of transmission. I don't care about file size.

@danmilon
Copy link

danmilon commented Mar 21, 2019

  • ppm correction is different. in sdr# it's 17, but in rtlsdr-airband it's 5.
  • Are you sure the gain in sdr# is 7db? I think rtl-tcp will report the value that sdr# asks it to set the gain to.

Also, what arguments do you pass to rtl-tcp?

@mako19
Copy link
Author

mako19 commented Mar 21, 2019

PPM values are different for the two dongles. See first screenshot. Dongles have serial numbers programmed. Dongle #3 is ppm=5 and dongle #4 is ppm=17.

No, I am not sure about gain. I assumed that marker position in SDRsharp corresponds to rtl-test value on that place. There are 24 values in rtl-test and 24 marker positions in SDRSharp. But I am not sure. Too sad Thomas eliminated auto gain. I used auto in older versions. It worked for me.

@szpajder
Copy link
Collaborator

szpajder commented Mar 21, 2019 via email

@mako19
Copy link
Author

mako19 commented Mar 21, 2019

What puzzles me is that with strong signal RTL-Airband works more-or-less, but on weak signal it simply loses everything. Is it gain problem or lack audio noise filter?

I will now try high gain. But I choose gain value using waterfall and SNR indicator in Sharp. It must be optimal.

@mako19
Copy link
Author

mako19 commented Mar 21, 2019

Tried 18.1 but it just as bad

@mako19
Copy link
Author

mako19 commented Mar 21, 2019

Tested it with E4000 but still no reception at weak signals only strong. Strange.

@danmilon
Copy link

You run rtl_tcp and connect sdr# to it, correct? What arguments do you pass to rtl_tcp exactly?

@szpajder
Copy link
Collaborator

szpajder commented Mar 21, 2019 via email

@mako19
Copy link
Author

mako19 commented Mar 22, 2019

Can you guys make a similar comparison? Sharp vs RTL-Airband on weak signals? Is it just me or it should be that way?

@szpajder
Copy link
Collaborator

szpajder commented Mar 23, 2019

Screenshot_20190323_101840

The stronger transmissions are from aircraft. The weak one is the tower controller (from ground transmitter).

SDRSharp:

https://drive.google.com/open?id=1xfvSkJxK2nwzTbmkrWYyH_7UcgOF4te-

rtl_airband:

https://drive.google.com/open?id=1rDtmObFH81rtGeoGeMUwhHhy84TS9P5d

Same antenna, same RTL dongle, so different points in time, but the ground transmitter power stays constant, so it's quite comparable.

Standard RTL2832+R820T2 dongle, end-fed dipole located ca 40 meters above terrain, no amplifiers, no filters. Airport transmitter located about 25 km away, mostly flat terrain with some obstacles (low buildings, etc).

rtl_airband settings:

  • RTL gain 34 dB
  • default sampling rate
  • default FFT size
  • default squelch settings
  • centerfreq offset from channel frequency: 75 kHz
  • waterfall shows 8/8 when the channel is silent, 35/8 when the ATCO is transmitting.

To get the recording in SDRSharp, I used a spyserver. SDRSharp gain was set to 15 (on a scale from 0 to 29 - I don't know how it's related to RTL gain which goes from 0 to 49.6 dB).

To me both recordings are intelligible most of the time. Indeed, audio sampling rate in SDRSharp is higher, but this mostly adds high frequency noise, not any extra sound quality.

@mako19
Copy link
Author

mako19 commented Mar 23, 2019

Thanx Tomas! Quality is very good indeed. This is what I expect from my setup but don't get for some strange reason... I'm using RTL-Airband since 2016 and it always used to be like your recordings. But recently something broke. I must reinstall it. Maybe install was botched? I simply deleted RTL-Airband folder and went through unstable branch step-by-step.

@mako19
Copy link
Author

mako19 commented Mar 23, 2019

I live under huge TV tower in Moscow. I absolutely need filter and I have a good one. And a Yagi custom made for me. All high quality equipment. But it does not explain the difference. It must be some software bug somewhere in y system.

@mako19
Copy link
Author

mako19 commented Mar 23, 2019

Maybe it's an audio AGC issue? The noise in my recordings is deafening. I had to use audio software to reduce volume. Was too loud.

@szpajder
Copy link
Collaborator

The noise is deafening because you have very low signal to noise ratio and you have disabled squelch which causes the AGC to operate constantly, even when the squelch would normally be closed. So when there is no transmission, the noise gets amplified to a reasonably loud level for your listening comfort :)

I'm a bit puzzled with the distortion in your audio. Can you take a brief recording of baseband I/Q data when this occurs and when the audio is unintelligible? You can do this using "rawfile" output type (https://github.com/szpajder/RTLSDR-Airband/wiki/Configuring-rawfile-outputs).

@mako19
Copy link
Author

mako19 commented Mar 24, 2019

I deleted my RTL-Airband folder, deleted /usr/bin/rtl-airband file and installed stable 3.0.1 version. It seems the problem is solved.
https://dropmefiles.com/kAYsR

@mako19
Copy link
Author

mako19 commented Mar 24, 2019

First part is SDRSharp as always. Well, this is a good result but my question still applies - maybe we can increase a bitrate so we can apply filtering post-facto? Or it will not work with compressed formats? I am talking of filtering recorded files, not a stream. I tried to use Audacity noise filter function, but it had no effect. SDRSharp is still somewhat more intelligible. With weak signals every dB is precious.

@szpajder
Copy link
Collaborator

I deleted my RTL-Airband folder, deleted /usr/bin/rtl-airband file and installed stable 3.0.1 version. It seems the problem is solved.

The only change since 3.0.1 to current unstable which affects the sound quality is the introduction of filters, which are on by default, but you can turn them off.

maybe we can increase a bitrate so we can apply filtering post-facto?

As I said before - the bitrate is dynamically adjusted by the MP3 VBR codec. If it thinks it's enough to convey the instantaneous bandwidth of the input signal, then it's enough and increasing the bitrate will not help at all.

Regarding https://dropmefiles.com/kAYsR - in my opinion both recordings are good enough (for the SNR you are able to get). rtl_airband audio is a bit louder and hence easier to listen. SDRSharp audio has a higher sampling rate, which gives more hiss, but contributes nothing to the overall speech quality. If you want even better quality, then what you need is higher SNR. Neither higher sampling rate nor higher MP3 bitrate nor super-duper DSP algorithms will give you this.

@mako19
Copy link
Author

mako19 commented May 20, 2019

Great program again, but I still see the audible difference betweein it and Sharp, which is critical for intelligibility of my receptions. Is there a way to save an undecoded I/Q stream, so that I can feed it to Sharp later? Saving it with rtl_tcp needs a lot of space. We onlyy need 10kHz really. Would be great.

@szpajder
Copy link
Collaborator

szpajder commented May 20, 2019 via email

@mako19
Copy link
Author

mako19 commented May 20, 2019

Yes I know but I couldn't feed it to Sharp, which is what I want to do.

@mako19
Copy link
Author

mako19 commented May 22, 2019

I'll ask it here...how importaint is sample loss at high rates? Do I understand it right that for our purpose it is negligible even at 3.2MSPS? The picture is 10 seconds of testing.
sampleloss

@mako19
Copy link
Author

mako19 commented May 23, 2019

No, I am wrong. 3,2MSPS doesn't work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants