ChristopheJacquet / PiFmRds

FM-RDS transmitter using the Raspberry Pi's PWM
GNU General Public License v3.0
1.43k stars 325 forks source link

REQ: Play shoutcast stream #102

Open dterweij opened 6 years ago

dterweij commented 6 years ago

Hi,

Would be nice to play a shoutcast stream (Streaming my own mp3's). I tried sox but that can't handle http://server:8000/;stream.mp3 urls. Or is there another way?

Great experimenting tool! Keep up the good work.

dterweij commented 6 years ago

Tried this code but wont work. What do i do wrong :)

mkfifo fifo
sleep 5
mplayer -ao pcm:file=fifo -playlist http://192.168.0.91:8000/listen.pls &
sleep 5
sox -t fifo /tmp/out.wav -t wav - | sudo ./pi_fm_rds -freq 107.8 -rt 'Live: RaspBerryPI 10mW expirimental' -ps RPI -audio -
sleep 5
rm fifo

The range on a 20cm wire is realy outstanding (reached about 1000 meter on car radio). Almost better then on a old PCI MAX 2006 set at 100mW output :)

altima commented 6 years ago

I tested with sox to play a mp3 stream and figured out to install additional package on the rpi:

apt install libsox-fmt-mp3

then I can play a mp3 stream to PiFmRds

sox -t mp3 http://myfancy.stream.url/mp3 -t wav - | pi_fm_rds -freq 106.0 -audio -

May be this could help