jasonmc / forked-daapd

A re-write of the firefly media server (mt-daapd). It's released under GPLv2+. Please note that this git repository is a mirror of the official one at git://git.debian.org/~jblache/forked-daapd.git
http://blog.technologeek.org/2009/06/12/217
GNU General Public License v2.0
328 stars 45 forks source link

internet radio support #100

Open snizzleorg opened 11 years ago

snizzleorg commented 11 years ago

I would like to be able to stream internet radio through forked-daapd. Unfortunately putting http://... locations into playlists does not do the trick.

I already brought this up here: https://github.com/jasonmc/forked-daapd/issues/87 but thought I raise the issue again cause this would be the icing on the cake of forked-daapd

Any suggestions?

elwertk commented 11 years ago

Internet radio in this is a legacy soundbrigde feature. It never worked for anything else.

Yet there is a patch/fork to this claiming to add exactly what you are looking for: https://github.com/Impakt/forked-daapd/commits/master

Haven't tested it though

snizzleorg commented 11 years ago

yeah... that's the thing. I tried to compile it but no success.

internet radio worked quite well on the original mt-daapd and it was actually the one feature I used every morning to get up-to date during breakfast.

ejurgensen commented 10 years ago

I was missing internet radio support too, so I had a look at the patch @elwertk mentioned. It's a difficult patch, because it contains a lot of stuff which seems irrelevant, and also it doesn't actually add support for http locations in m3u playlists. So instead I hacked together my own solution, and now I have it working at home. If you're interested you can find it here: https://github.com/ejurgensen/forked-daapd (or if you just want the streaming part, here: https://github.com/ejurgensen/forked-daapd/tree/streaming). Note that it doesn't support showing which artist is currently playing.

snizzleorg commented 10 years ago

@ejurgensen thanks for that. however I cannot get it to compile. this is the error:

evhttp/http.c:28:26: fatal error: event-config.h: No such file or directory

any idea what went wrong?

ok. got it right. libevent had some version problems

sudo apt-get install libevent1-dev

solved the issue

snizzleorg commented 10 years ago

Playlists are showing up however with zero items in them. I used m3u formatted lists for the internet radio stations. Something that I'm missing here?

ejurgensen commented 10 years ago

Do you have a link to the m3u? Then I can try it here. Also, are you using ffmpeg or libav? And which version? It depends on ffmpeg/libav to detect the stream format, and if that doesn't succeed the stream won't be added to the playlist.

snizzleorg commented 10 years ago

this is the content of the .m3u:

EXTM3U

EXTINF:-1,Deutschlandfunk - MP3 -

http://dradio.ic.llnwd.net/stream/dradio_dlf_m_a

EXTINF:-1,Deutschlandradio Wissen - MP3 -

http://dradio.ic.llnwd.net/stream/dradio_dwissen_m_a

I'm using ffmpeg

ejurgensen commented 10 years ago

I've got forked-daapd running on OpenWrt with ffmpeg 0.11 and on Ubuntu with libav 0.8, and I tried adding the m3u in both. It don't work at first, but that was because cutting and pasting the m3u from here produced some hidden characters which the scanner didn't like. So now I added two commits (latest is this https://github.com/ejurgensen/forked-daapd/commit/799fe9e6845bed51e280f93593defcfa4c48b52d) taking care of that. Then it worked as it should, the playlist was added with two entries. I could also play the music.

However, I have a feeling the trouble you are having might be something else. You could try setting the loglevel to debug and then finding the line "Playlist contains URL entry". Then check the lines following that line (post them here if you want to). Anything suspicious? Ignore any lines where ffmpeg says Header missing, that's ok.

snizzleorg commented 10 years ago

hm..

now the station shows up but in itunes an exclamation amrk shows beside it when I try to play it.

this is the log:

[2013-08-27 23:25:11] scan: Processing static playlist: /mnt/tank0/iTunes/Music/InternetRadio.m3u [2013-08-27 23:25:11] db: Running query 'SELECT p.* FROM playlists p WHERE p.path = '/mnt/tank0/iTunes/Music/InternetRadio.m3u';' [2013-08-27 23:25:11] db: Running query 'SELECT COUNT(*) FROM playlistitems pi JOIN files f ON pi.filepath = f.path WHERE f.disabled = 0 AND pi.playlistid = 7;' [2013-08-27 23:25:11] scan: Playlist found, updating [2013-08-27 23:25:11] db: Running query 'UPDATE playlists SET db_timestamp = 1377638711, disabled = 0 WHERE id = 7;' [2013-08-27 23:25:11] db: Running query 'DELETE FROM playlistitems WHERE playlistid = 7;' [2013-08-27 23:25:11] scan: Playlist contains URL entry [2013-08-27 23:25:11] db: Running query 'SELECT f.id, f.db_timestamp FROM files f WHERE f.path = 'http://dradio.ic.llnwd.net/stream/dradio_dlf_m_a';' [2013-08-27 23:25:11] db: Running query 'UPDATE files SET db_timestamp = 1377638711, disabled = 0 WHERE id = 12241;' [2013-08-27 23:25:11] db: Running query 'INSERT INTO playlistitems (playlistid, filepath) VALUES (7, 'http://dradio.ic.llnwd.net/stream/dradio_dlf_m_a');' [2013-08-27 23:25:11] scan: Done processing playlist [2013-08-27 23:25:11] scan: Purging old database content [2013-08-27 23:25:11] db: Running purge query 'DELETE FROM playlistitems WHERE playlistid IN (SELECT id FROM playlists p WHERE p.type <> 1 AND p.db_timestamp < 1377638657);' [2013-08-27 23:25:11] db: Purged 0 rows [2013-08-27 23:25:11] db: Running purge query 'DELETE FROM playlists WHERE type <> 1 AND db_timestamp < 1377638657;' [2013-08-27 23:25:11] db: Purged 0 rows [2013-08-27 23:25:11] db: Running purge query 'DELETE FROM files WHERE db_timestamp < 1377638657;' [2013-08-27 23:25:11] db: Purged 1 rows [2013-08-27 23:25:11] db: Running post-scan DB maintenance tasks... [2013-08-27 23:25:11] db: Running query 'ANALYZE;' [2013-08-27 23:25:12] db: Done with post-scan DB maintenance

ejurgensen commented 10 years ago

Yes, I get that too. It only works if you use Remote. If you use iTunes I don't understand why you don't stream directly?

snizzleorg commented 10 years ago

Yeah! its working! of course I normally use the remote. But since I was using the computer now I tried with iTunes. Anyways normally ITunes is working more reliable than Remote. So I figured I first try iTunes.

Thanks very much. that's great now working internet radio!

jkiddo commented 10 years ago

@ejurgensen - could you please contact me regarding forked-daapd. I think I have some information regarding the DMAP protocol that could be beneficial for both of us. My mail is at my profile.

roblan commented 9 years ago

m3u file with content

#EXTM3U
#EXTINF:-1,Indie - 
http://in.icy1.abacast.com/entravision-indieaac-48

results with empty playlist. Nothing 'extraordinary' in logs...

ejurgensen commented 9 years ago

Jasonmc's version is no longer maintained, consider using my fork (where your m3u should work).

roblan commented 9 years ago

uh, sorry, wrong repo - I am using Your fork (on raspi) ;) and still get empty playlist.