Some time ago I found a way to stream audio from my laptop to my headless LMS server, using vlc. This was useful for playing audio on my hifi from the now-defunct 'Gramophone Player' website. I found I could send the audio from the website to a 'null' device on my (linux) laptop and mionitor this 'null' device with vlc to stream it over my wireless network. At the time I only managed to get mp3 to work, so all streams were transcoded to mp3, albeit at best (320kbps) quality. A 'favourite' on my server played this stream.
The limitation on mp3 niggled, but since my purpose in using this had gone with the Gramophone Player I forgot about it.
Then the BBC decided to crate mayhem with their Internet Radio changes. Many people, especially some of the expert stalwarts on this forum, are still beavering away getting back to an ideal set of solutions. Meanwhile I started to worry, as is my wont. What if it all changes again and some of these experts aren't able to help?
Time to resurrect my laptop solution. Use the BBC's own iPlayer in a browser, playing to my laptop 'null' device and use vlc to stream to my music server. Sure enough, that works, but the niggle returned. 320kbps aac is superior to mp3, so I tried to see if anything else would work. I could only get ogg vorbis to work in the same way as mp3. Not flac, nor wav. Resurrecting my Touch, when playing a wav or flac directly from the laptop (e.g. with a Tune In to http://192.168.x.y:8081/laptop.flac) the Touch said the playlist was empty. Odd, I thought, I see no playlist. Maybe it doesn't recognise wav or flac at this level and needs a playlist (which is in itself odd since I've never got an LMS playlist to work with a radio station).
To keep my ramble brief(ish), I installed apache on my linux server (about 1 minute's work - some things are easy, some are hard!). In /var/www/html (created by apache) I created a folder called playlists containing file StreamLaptop.m3u which contains:
I then created a favourite to point to this local file:
And it works. LMS sees the wav stream, although the GUI says '0, MP3 Radio', when viewing the 'song' details it says it is wav. The vlc command on my laptop is:
CPU load is well within my laptop's capability, and my wireless LAN is up to it.
I tried the same trick with flac and it didn't work. I know aac should work but I can't get vlc to stream this from my laptop (probably an ffmpeg, avconv, aac library conflict somewhere).
Still, I now have a system that doesn't transcode the source more than once, and then only to pcm/wav, and it should survive provided the BBC keeps radio available via a browser. It's not as convenient as the BBCiPlayer plugin plus the Extras plugin (thanks so much Triode and bpa), but it is an alternative should the wotsit hit the fan.
I would like to know if there is a definitive list anywhere of codecs & muxes that LMS will support directly as incoming streams, and which as streams via m3u playlists. Is this documented anywhere, even in the source?
Finally, I hope this technique might be helpful to others, possibly to solve quite different problems.
The limitation on mp3 niggled, but since my purpose in using this had gone with the Gramophone Player I forgot about it.
Then the BBC decided to crate mayhem with their Internet Radio changes. Many people, especially some of the expert stalwarts on this forum, are still beavering away getting back to an ideal set of solutions. Meanwhile I started to worry, as is my wont. What if it all changes again and some of these experts aren't able to help?
Time to resurrect my laptop solution. Use the BBC's own iPlayer in a browser, playing to my laptop 'null' device and use vlc to stream to my music server. Sure enough, that works, but the niggle returned. 320kbps aac is superior to mp3, so I tried to see if anything else would work. I could only get ogg vorbis to work in the same way as mp3. Not flac, nor wav. Resurrecting my Touch, when playing a wav or flac directly from the laptop (e.g. with a Tune In to http://192.168.x.y:8081/laptop.flac) the Touch said the playlist was empty. Odd, I thought, I see no playlist. Maybe it doesn't recognise wav or flac at this level and needs a playlist (which is in itself odd since I've never got an LMS playlist to work with a radio station).
To keep my ramble brief(ish), I installed apache on my linux server (about 1 minute's work - some things are easy, some are hard!). In /var/www/html (created by apache) I created a folder called playlists containing file StreamLaptop.m3u which contains:
Code:
#EXTM3U
#EXTINF:-1, Laptop
http://192.168.x.y:8081/laptop.wav
Code:
http://127.0.0.1/playlists/StreamLaptop.m3u
Code:
cvlc pulse://null.monitor :sout='#transcode{vcodec=none,acodec=s16le,channels=2,samplerate=48000}:http{mux=wav,dst=:8081/laptop.wav}' :no-sout-rtp-sap :no-sout-standard-sap
I tried the same trick with flac and it didn't work. I know aac should work but I can't get vlc to stream this from my laptop (probably an ffmpeg, avconv, aac library conflict somewhere).
Still, I now have a system that doesn't transcode the source more than once, and then only to pcm/wav, and it should survive provided the BBC keeps radio available via a browser. It's not as convenient as the BBCiPlayer plugin plus the Extras plugin (thanks so much Triode and bpa), but it is an alternative should the wotsit hit the fan.
I would like to know if there is a definitive list anywhere of codecs & muxes that LMS will support directly as incoming streams, and which as streams via m3u playlists. Is this documented anywhere, even in the source?
Finally, I hope this technique might be helpful to others, possibly to solve quite different problems.