View Full Version : Streaming to Squeezebox using VLC.

2008-06-05, 17:16
I want to watch a movie on my laptop, but listen to the audio on my SB3-based sound system.

I have figured out how to do this on my OSX machine using both VLC (to watch the movie) and NiceCast (to broadcast the audio coming from VLC as a shoutcast stream.) It works! And what's better, because VLC lets you set audio/video compensation (with the 'F' and 'G' keys), I can get everything perfectly in sync.

But NiceCast costs $40 and I know that VLC is quite capable of streaming all by itself. Unfortunately, it seems that the SlimCenter 7.0.1 and the SB3 have LOTS of trouble interpreting VLC's stream, even though I've configured it to be a simple shoutcast stream. Other software, like iTunes, has no problem listening to the exact same stream. But when I try and listen via my SB3, the device actually _crashes_! I'm serious, it reboots itself, which I've never seen before.

Here is how I'm invoking VLC. This sets up my laptop to broadcast _just the audio_ on port 8080, and it causes _only the video_ to display on my machine:

vlc movie.avi --sout "#transcode{acodec=mp3,ab=256,channels=2}:duplicate {dst=std{access=http,mux=raw,url=:8080}, select=novideo, dst=display, select=noaudio}"

The audio is transcoded to 256CBR MP3 audio -- good enough quality for my ears.

So, why is my SB3 crashing on this stream? I've tried other MUX types, and have had no luck getting the SB3 to "tune in." Like I said, I have no problem getting iTunes to "listen" -- even iTunes on a non-local machine.


2008-06-05, 17:43
Check out post #15 in this thread - it shows somebody using vlc.

I'm not sure what mime VLC will output. If there is no mime-type then you may need a name at the end of the http so that SC can use the suffix to identify an mp3 stream.

2008-06-05, 17:54
The problem appears to be that SB3 isn't happy with the URL, which has nothing after the port number (aka the url was http://foo:9000/).

Changing the VLC command line to this:

vlc movie.avi --sout "#transcode{acodec=mp3,ab=256,channels=2}:duplicate {dst=std{access=http,mux=raw,url=:9000/vlcstream.mp3},select=novideo, dst=display, select=noaudio}"

WORKS! The URL is now http://foo:9000/vlcstream.mp3 and the SB3 plays it without a problem.


PS: For those who are VLC heads, you might wonder why I have the transcode section at all. I've found it very useful, because then I always know exactly what audio/video delay compensation to use in VLC. If I don't transcode, the SB3 can of course play the stream, but potentially I have to find a new delay compensation value for each file I play back.

PPS: With this transcoding and my laptop/audio setup, it takes approximately 3.05 seconds for the streamed audio to reach my ears. So my compensation is set to -3050ms (using the F and G keys make it easy to play with this while watching.)

2008-09-22, 09:20
Hi, I am doing something similar using VLC to stream a radio signal from a PVR150 card on a linux box, I can get VLC to open the stream no problem but with any of my squeeze devices I just get the odd click coming through, nothing that sounds like music anyway.

this is my command line for VLC

vlc -vvv stream:/dev/video0 --file-caching=300 --sout "#transcode{acodec=mp3,ab=128}:standard{access=http ,mux=asf,url=:8080/vlcstream.mp3}"

any advice would be very much appreciated.


2008-10-08, 04:00
nobody have any ideas?

2008-10-08, 04:14
I don't think you can use mux=asf with stream.mp3. Also access=http

2008-10-23, 03:46
thanks, what should mux be, and what should the access be if not http.

2008-10-23, 06:57
based on the experience of previous posters
- the mux should be raw.
- access should be http - you had "htt p" which could be a typo causing a problem

If you have some coding skills you may eb able to update this plugin for 7.0.

I have a more general radio plugin planned but I need to resolve some Windows problems first.

2008-10-30, 04:18
Using VLC 8.6h on Debian, mp3 encoder should be replaced with "mpga". i.e., to stream a CD in your drive (in my case /dev/hda), you can use :

vlc -vvv cdda:///dev/hda --sout "#transcode{acodec=mpga,ab=128}:standard{access=htt p,mux=raw,url=:8080/vlcstream.mp3}"