AlbrechtL / rtl_fm_streamer

Software to turn the RTL2832U into an SDR
GNU General Public License v2.0
68 stars 23 forks source link

Playback stream in mpd #2

Open yglodt opened 7 years ago

yglodt commented 7 years ago

Hi,

I created a playlist for an mpd instance with the following content:

#EXTM3U
#EXTINF:-1,RTL Radio Lëtzebuerg
http://localhost:12345/88900000/0
#EXTINF:-1,Radio 100.7
http://localhost:12345/100700000/0
#EXTINF:-1,EldoRadio
http://localhost:12345/105000000/0

Mpd is running on the same host than rtl_fm_streamer.

When I try to play it back in mpd, I get:

Failed to decode http://localhost:12345/88900000/0

Maybe it's related to the fact that (I guess) mpd expects the stream to be in another format than PCM. Any idea what I could do to make mpd happy?

This is an example (mpeg) stream which mpd plays back without complaining:

http://sc-rtllive.newmedia.lu

AlbrechtL commented 7 years ago

It is a while that I tried it the last time. As I remember I ran into a similar problem. But I didn't have the time to fix it. If you found a solution please post it here.

yglodt commented 7 years ago

I am currently looking into creating a kind of proxy which I will use as mpd url. This proxy will start rtl_fm and pipe its stream into ffmpeg or vlc to encode it in an mpd-compatible format.

Since I have a java web application which is the client (frontend) to mpd, my first idea is to have an url in my application which I can call with the desired frequency and it would return the stream. And in my mpd playlist I would have the stream urls from my proxy url containing the frequency.

The disadvantage of this is that when I want to change the frequency, I have to stop those processes and restart them. But this can probably be handled in the servlet/controller. I asked for help on SO about that here: http://stackoverflow.com/questions/42226074/start-rtl-fm-and-ffmpeg-when-connecting-to-a-controller-and-return-the-stream

The actual beauty of rtl_fm_streamer is that you can change the frequency on the fly... :-) If only it would be able to encode it, it would be perfect. So I don't even consider this issue a bug, but more like a feature request :) Thanks for the good work you've done!