Audio stream to an Icecast server


I'm trying to stream an audio feed to an Icecast server.

Best for me would be doing this on the Beagleboard itself, but I think there couldn't be enough CPU left for audio encoding.

So, i tried to do it on a raspberry PI from the same local network, using the kiwi_nc utility, shell piping to an MP3 or OGG encoder, and than to Ezstream (a shell Icecast source client), but I've got no success (broken pipes).

Am I on the right path ? Is kiwi_nc actually outputting a raw audio feed ?

Any help would be apreciated.

Thanks a lot :)


  • edited August 2022

    what string do you feed to kiwi_nc

    cli args that is

  • Hi Jim,

    thanks for replying.

    These are the switches i used for kiwi_nc:

    -s -p 8073 -f 28122 -m usb -L100 -H2700 --ncomp

    Regarding the app from Chris: I need something I can run from a linux shell and it looks like his app runs on Win/MacOs only.


  • jksjks
    edited August 2022

    I used kiwi_nc successfully to stream IQ samples to dumphfdl while developing the Kiwi HFDL extension. Take a look at the "dumphfdl" target in kiwiclient/Makefile

    What you're doing looks okay to get a single channel (mono) without compression (IQ mode never has any compression, so --ncomp is not specified in the Makefile example)

    Note the argument to dumphfdl: --sample-format CS16 So kiwi_nc is outputting 16-bit signed integer values. The "C" means complex because of IQ, but that won't be true in your case.

    You might try redirecting the kiwi_nc output to a file. Then process it with sox into a .wav file. Something like this maybe:

    sox -r 12000 -b 16 -e signed-integer -c 1 -t raw CS16.raw -b 16 -e signed-integer -c 1 CS16.wav

    Where CS16.raw is the name of the file captured from kiwi_nc. Then play the .wav with a simple player (i.e. not Icecast) and see if it sounds right.

    Not 100% sure about the sox stuff. It's been a year or so since I did this.

  • Thank you for your help!

    After a thousand tries, I successfully made it run on the BB itself piping to

    lame -r -s 12 -V0 -m mono -p -x -b 16 --cbr --resample 22.050 --lowpass 4 - -

    and then to ezstream.

Sign In or Register to comment.