Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

internet radio support #100

Open
snizzleorg opened this issue Feb 14, 2013 · 15 comments
Open

internet radio support #100

snizzleorg opened this issue Feb 14, 2013 · 15 comments

Comments

@snizzleorg
Copy link

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: #87 but thought I raise the issue again cause this would be the icing on the cake of forked-daapd

Any suggestions?

@elwertk
Copy link

elwertk commented May 28, 2013

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
Copy link
Author

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
Copy link

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
Copy link
Author

@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
Copy link
Author

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
Copy link

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
Copy link
Author

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
Copy link

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 owntone/owntone-server@799fe9e) 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
Copy link
Author

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
Copy link

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
Copy link
Author

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
Copy link

jkiddo commented Oct 24, 2013

@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
Copy link

roblan commented Sep 14, 2014

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
Copy link

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

@roblan
Copy link

roblan commented Sep 16, 2014

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants