Standalone Client Computer

Status
Not open for further replies.

IredellMon

Member
Joined
Jan 23, 2012
Messages
90
Location
North Carolina
My Raspberry Pi scanner feed computer has been running very well here with file archiving and with an option to save recordings with all the dead air removed (and even sped up if you wish)...

Therefore I have posted the revisions:
https://sites.google.com/site/glyman3home/scannerfeed

Note: User "Uplink" is having some problems with buffer overflows using a similar but different setup on a RasPi. It might be related to the sound stick he is using. We are looking into it. My system does not have this problem.
==============================================
 

IredellMon

Member
Joined
Jan 23, 2012
Messages
90
Location
North Carolina
....

Note: User "Uplink" is having some problems with buffer overflows using a similar but different setup on a RasPi. It might be related to the sound stick he is using. We are looking into it. My system does not have this problem.
==============================================
Note update: The Darkice buffer overrun appears to be fixed and apparently was caused by using a different device setting than I was using.
==============================================


BROADCASTING A FEED TO RADIOREFERENCE.COM / BROADCASTIFY.COM
WITH A RASPBERRY PI MINI-COMPUTER:

https://sites.google.com/site/glyman3home/scannerfeed

Now with option to archive radio traffic with all dead air (silent periods) removed!
 
Last edited:

Uplink

Member
Joined
Feb 17, 2006
Messages
446
Location
Los Angeles County
Thanks IredellMon for your help on this! Between fighting a bad cold, and work, haven't much time to work on this.

Yes!, finally got the dang buffer overruns to stop by changing the DEVICE from hw:1,0 to plughw:1,0 You may not see this mentioned in Steffens and others postings on config settings so it a big gotcha. Also IredellMon suggested commenting out the dump file which is a great idea for those not interested in saving recordings.


Some other things that helped me:

-Use Putty and SSH into the Raspberry Pi, much easier than using a Keyboard/Mouse.
Just get the ip address of the Pi, from your device list on your router, or hit ifconfig on the Pi. Then dump the keyboard/mouse, and just Putty into the Pi. You can now copy/paste Steffens Darkice compile commands into the Pi.
-Chinese C-Media USB sound cards will default to AGC ON, this will blast the audio. You can turn it off by tabbing to AGC in Alsamixer and hitting the "M" key.
-"LameLibEncoder.cpp:75: lame lib opening underlying sink error [0] is Darkice's funny way of telling you it's not connecting to the server! Nice.
-Don't use a leading slash in your mountpoint like the Windows encoder, Linux doesn't need it.
-Excellent link found by IredellMon here on the Alsa device settings.
-You shouldn't need to overclock, but you can do it to speed up the compiling process.
I know this stuff is obvious to you smart guys, just throwing that out there for newbies from going through the fist pounding and forehead slapping that I went through ;)

I am using one of those chinese C-Media USB dongles. My next hurtle is to get it to sound as good as it did on the windows machine. before allowing this thing to go on-air. Tinkering with levels and quality settings don't seem to help. My co-worker has been tinkering with this R-pi project too, and got better audio by going to a better quality unit know as the Griffin Imic These can average about $30 bucks on Amazon so this will obviously bump up the cost of a low cost streaming setup.
 
Last edited:

IredellMon

Member
Joined
Jan 23, 2012
Messages
90
Location
North Carolina
Good to hear it's working for you now.
I tried to change the AGC setting as you told me.. and I actually had better luck with AGC ON. So my advice is to try it both ways. (It's probably dependent on the consistency of the level of your scanner output)
 
Last edited:

Uplink

Member
Joined
Feb 17, 2006
Messages
446
Location
Los Angeles County
Just received my Griffin iMic and plugged it into the R-Pi, man what a difference in audio quality! The feed is actually useable now. I tried 2 difference versions of those little Chinese USB sound cards (translucent plastic C-Media type, and the black 7.1 audio with the buttons on them) both sounded terrible on the R-Pi, although they sound fine on a Windows machine. The Pi just doesn't like them for some reason, audio has tick sounds, raspy, and distorted peaks. Plugged in the iMic and instantly had beautiful audio, and it even has a line level input. :D Note: the iMic does not loop back the input audio for listening back to the output, the fader insn't even there on the GUI. I had to split the audio output of the scanner into 2 for my own local monitoring.
It was a pain, but happy that I finally am streaming with a tiny 1amp PC. The next challenge, getting 2 feeds streaming on 1 R-Pi, and getting alpha tagging capability.
Any takers? :D
 

Attachments

  • 2013-04-07 RPI DARKICE setup 001 (Medium).JPG
    2013-04-07 RPI DARKICE setup 001 (Medium).JPG
    67 KB · Views: 1,047
Last edited:

IredellMon

Member
Joined
Jan 23, 2012
Messages
90
Location
North Carolina
How interesting that you had such bad luck with the C-Media sound stick. What worked fine for me did not with your set-up it seems. There are so many variables with input, output levels, cable effects, and Linux audio it’s hard to know why you had a problem where I did not. (See: How it works: Linux audio explained | TuxRadar Linux)
Good to see a solution for those who need it.. thanks for posting.

As for getting two streaming feeds on one “pi” it should be fairly simple and was something I was going to work on before something big in my life took over.

I understand that people do run two instances of Darkice on one Linux system, so doing that with two USB Sound sticks, each feeding a separate instance of Darkice should be easy. I wanted to see if I could split the stereo inputs using only one sound stick however, so that the left channel would feed Darkice instance #1 and right would feed Darkice instance #2. But like I said, I suddenly found I had no free time for this hobby, at least for a while.

So go to it and let us know how it goes. I will get some time to work on this sooner or later and can use a head start.

Alpha Tagging I have no info on.
 
Last edited:

scanmorgan

Member
Joined
Apr 7, 2006
Messages
29
Location
Lake of the Ozarks
Just wanted to say thanks for all the info in this thread. Got my RPi up and running last week without too much trouble and put it to work feeding the scanner a few days ago.

The worst issue I had was the garbled audio which dropping to usb 1.1 fixed. The other problem I'm having is that in darkice.cfg I cant match sample rates(maybe not possible?). Input is currently 22050Hz and icecast2 is 11025Hz. But if both are set to 22050 the audio slows way down to about 10 times under regular playback speed. Has anybody noticed this? 11025 seems to low, definitely has the low bitrate "tinny" sound.
 

IredellMon

Member
Joined
Jan 23, 2012
Messages
90
Location
North Carolina
.....The other problem I'm having is that in darkice.cfg I cant match sample rates(maybe not possible?). Input is currently 22050Hz and icecast2 is 11025Hz. But if both are set to 22050 the audio slows way down to about 10 times under regular playback speed. Has anybody noticed this? 11025 seems to low, definitely has the low bitrate "tinny" sound.

I got something that sounded like that, and echo-y also, when I used a "device" setting in darkice.cfg DIFFERENT than this:

[input]
device = plughw:1,0

What is your device setting?
 

scanmorgan

Member
Joined
Apr 7, 2006
Messages
29
Location
Lake of the Ozarks
I got something that sounded like that, and echo-y also, when I used a "device" setting in darkice.cfg DIFFERENT than this:

[input]
device = plughw:1,0

What is your device setting?

I got it figured out finally. Found out if I didnt use a sample rate at all in the settings for icecast2 it just passed through.

Here's my darkice configuration if anybody's interested...
Code:
[general]
duration        = 0        # duration of encoding, in seconds. 0 means forever
bufferSecs      = 2         # size of internal slip buffer, in seconds
reconnect       = yes       # reconnect to the server(s) if disconnected

[input]
device          = plughw:1,0  # soundcard device for the audio input
sampleRate      = 22050     # sample rate in Hz. try 11025, 22050 or 44100
bitsPerSample   = 16        # bits per sample. try 16
channel         = 1         # channels. 1 = mono, 2 = stereo

[icecast2-0]
bitrateMode = cbr
format = mp3
bitrate = 16
channel = 1
lowpass = 5000
#sampleRate = 11025
server = xxxxxx.radioreference.com
port = ##
password = xxxxxx
mountPoint = xxxxxxxx
name = Feed name

[icecast2-1]
# This is for LAN access
bitrateMode = cbr
format = mp3
bitrate = 16
channel = 1
#lowpass = 5000
#sampleRate = 11025
server = localhost
port = 8000
password = xxxxxx
mountPoint = scanner1 # Stream location: 192.168.2.XXX:8000/scanner1.m3u
name = *LAN*Feed Name
 
Last edited:
Status
Not open for further replies.
Top