Re: Shoutcast Streaming (to Allplay Wifi speakers)
Reply #2 – 2017-02-19 11:38:52
Sorry, yes, I meant source (it's a terminology thing, the source is also a client).. I don't think my usecase is that odd, I don't want to manage the playlist on the server, I pin a track in Google Music, and my other scripts download and copy it to my music pool. Anyway, I sort of cobbled something together using ezstream. It's not ideal, it will build a playlist from a directory of music, randomise it, and then feed it to exstream, which will play the entire list and exit back to the calling script when it's done (setting no repeat in the config file, and specifying the randomised playlist. It then loops this process, building the playlist each time around, adding any newly added tracks to the playlist. There are two downsides 1/ The new tracks are only in the playlist after a complete runthough of the playlist 2/ If you are listening whilst a playlist gets to the end, it's possible your client will pause as the stream stops. I was aware of the developer AllPlay SDK, but it's more to do with integrating into existing music services and apps, not creating the http music streams.staging=/usr/local/music/staging cd /usr/local/music/playlists musicdir=/mediatest while : do #remove old playlists rm -f /usr/local/music/staging/* #build new m3u of music find $musicdir -name "*.mp3" > $staging/songs.m3u #randomize songs sort -R $staging/songs.m3u > $staging/random-songs.m3u ezstream -c myconfig.xml done If anyone has any better suggestions on how to achieve this, that would be much appreciated!