Feed problem - low audio into mp3 encoder

Status
Not open for further replies.

celltech161

Member
Joined
Mar 22, 2009
Messages
7
Location
Minneapolis, Ks
I'm having a problem with one of my feeds that I can't find a fix for (other than switching to linux).

The feed source is TX audio into the repeater > Windows 7 machine > Radio Feed (also tried Scannercast).

The audio input to my soundcard is at a proper level, and the "slider" on the soundcard line in is set at a point where maximum deviation on the receiver just almost redlines the sound card input.

But,

When Scannercast or Radio Feed encodes the mp3 bitstream, the encoded level is at least -10db in level, making the sound way too low compared to other feeds - especially my other feed. I can't raise the input level of my line in without clipping the A/D. My other feed is provided by a Raspberry Pi using Darkice and LAME, which allows me to tweak the parameters of LAME to optimize the bitstream in various ways. The Raspberry PI feed is at the proper level and sounds great. However, the feed I'm having trouble with (Windows 7/Radio Feed) does not seem to have provisions for optimizing the mp3 stream.

Can anybody help me with this low audio problem, or am I going to have to buy another Raspberry PI?

I know there has to be lots of working examples of Windows / Radio Feed that have the proper level, so what is wrong in this particular case?

Thanks,
Justin
N0UJQ
 

lotsofradios

Completely Banned for the Greater Good
Banned
Joined
Feb 2, 2013
Messages
119
Location
Ormond Beach FL
I fixed the problem by switching the feed over to a Raspberry Pi.

Justin

I have been playing with a Raspberry to stream to an Icecast server, Icecast server running on different computer. I am having an audio level issue. I am using Darkice at 22050 samples and 16 bitrate.

When you setup the soundlevels on your sound card are you using the alsamixer or is there something better. I am trying to find something which I can run on the Raspberry that will give me a 'UV' meter to make setting the levels easier.

Another smaller problem is Data Overrun errors from Darkice. I have reduced the overruns by running Darkice as a superuser - "sudo darkice -c /etc/darkice.cfg" but still get some.
 

celltech161

Member
Joined
Mar 22, 2009
Messages
7
Location
Minneapolis, Ks
Quote:
When you setup the soundlevels on your sound card are you using the alsamixer or is there something better. I am trying to find something which I can run on the Raspberry that will give me a 'UV' meter to make setting the levels easier.
--------------

I use the alsamixer. I monitor my level with Winamp listening to the stream, yes I know it's delayed but in a couple minutes you can find the proper level.


Quote:
Another smaller problem is Data Overrun errors from Darkice. I have reduced the overruns by running Darkice as a superuser - "sudo darkice -c /etc/darkice.cfg" but still get some.
-----------------
I haven't encountered this, but I run my PI's headless and it's possible that it's throwing errors I can't see because I'm not connected to it. I sent them to start darkice as a service on startup and they've never had a keyboard or monitor connected to them. I use the same SD card image for each install and tweak darkice.cfg to fit the individual feed. Works like a champ.
Justin
 

ProScan

Software Provider
Premium Subscriber
Joined
Jul 2, 2006
Messages
7,792
Location
Ontario, Calif.
I'm having a problem with one of my feeds that I can't find a fix for (other than switching to linux).

The feed source is TX audio into the repeater > Windows 7 machine > Radio Feed (also tried Scannercast).

The audio input to my soundcard is at a proper level, and the "slider" on the soundcard line in is set at a point where maximum deviation on the receiver just almost redlines the sound card input.

But,

When Scannercast or Radio Feed encodes the mp3 bitstream, the encoded level is at least -10db in level, making the sound way too low compared to other feeds - especially my other feed. I can't raise the input level of my line in without clipping the A/D. My other feed is provided by a Raspberry Pi using Darkice and LAME, which allows me to tweak the parameters of LAME to optimize the bitstream in various ways. The Raspberry PI feed is at the proper level and sounds great. However, the feed I'm having trouble with (Windows 7/Radio Feed) does not seem to have provisions for optimizing the mp3 stream.

Can anybody help me with this low audio problem, or am I going to have to buy another Raspberry PI?

I know there has to be lots of working examples of Windows / Radio Feed that have the proper level, so what is wrong in this particular case?

Thanks,
Justin
N0UJQ

One thing to try is if using my RadioFeed or Peter's ScannerCast is to turn up the Line-In to 100% and adjust the scanner volume until at distortion level and then back-off a bit. Also check that the RadioFeed left or right channel slider is at 100% on the capture side located in the Source Client tab. Mp3 encoding /decoding does not attenuate the audio at all regardless of the mp3 bitrate. Attenuation occurs before the mp3 encoding, usually the Windows Mixer.

However, the feed I'm having trouble with (Windows 7/Radio Feed) does not seem to have provisions for optimizing the mp3 stream.

What do you mean by "optimizing the mp3 stream"? Mp3 Bitrate or Samples Per Sec.
 

celltech161

Member
Joined
Mar 22, 2009
Messages
7
Location
Minneapolis, Ks
I'm not driving this with a scanner, the audio is coming from a spare port on the repeater controller which is a 600 ohm line level source. The input level at the sound card is at a proper level that the sound card can handle without being overdriven. The windows slider was set so that an incoming signal at maximum deviation would just hit the -0dbFS level when viewed with any utility in Windows, including the Radio Feed software. Even Echolink was showing it as being the proper level. However, once Radio Feed encoded the mp3 stream and sent it to the internet, the level was about -15db compared to the original source audio. In other words, Radio Feed or some hidden config file for the Lame encoder was scaling the source audio down during the mp3 conversion. No amount of fiddling with the incoming audio level would change this. I could even crank everything to mind-blowing maximum and the decoded stream would still show way less than maximum level on Winamp or any other mp3 player.

I suspect a problem with a hidden .dll file, although I replaced lame_enc.dll and the problem still existed.
I switched from the Windows computer to the Raspberry Pi/Linux/DarkICE and everything works great using the same levels coming in. I think it's probably a problem with my Windows 7 installation and likely doesn't affect many other feed providers or you would have heard about this before now. Uninstalling and re-installing Radio Feed and/or Scannercast didn't help either. I even tried the same USB sound card that the PI uses and it didn't help. The only common denominator was Windows 7 and possibly the installation of Lame on that system.

What I meant by optimizing the mp3 stream involves parameters like scaling (positive or negative gain), low pass filtering, and other little tweaks that are available in the Lame configuration - IF we users are allowed access to those parameters. I've been using Lame to encode WAVs to MP3s for years, and have always been able to tweak Lame using command line arguments to get the best "bang for the bandwidth" buck.

Justin
 

ProScan

Software Provider
Premium Subscriber
Joined
Jul 2, 2006
Messages
7,792
Location
Ontario, Calif.
A test to help diagnose the attenuation is to use the RadioFeed loopback function and check for attenuation at the speakers. Loopback audio is strickly PCM audio and not converted to mp3. I still believe the attenuation is before the audio arrives at RadioFeed. Also I believe the mp3 encoding and decoding process does not attenuate the signal as the audio from input jack to the internet and out of the speaker has been tested with a TIMS (Transmission Impairment Measurement Set) and the test show attenuation fluctuates at 0 to .5 dB. RadioFeed sets the config of the lame_enc.dll Emphasis at 0, Preset at normal quality, and VBR off.
 
Last edited:
Status
Not open for further replies.
Top