PDA

View Full Version : Getting VLC to stream audio to LMS



PasTim
2012-02-13, 11:15
I have spent many hours trying to get VLC to stream audio from my Windows (64-bit) PC to LMS (and then to a Touch). I often use a website that does not provide a stream and must be run in a browser, and want to listen to it via my Touch.

I have seen that others have made it work, but I could not do so for quite a while.

To cut a long story short, what I didn't twig was that I might need to change the default port allocated by VLC. The default is 8080. That didn't work, and I failed to realise that was the problem for far too many hours. Changing to 8079 fixed it immediately. So, what worked was a Windows shortcut containing:

"C:\Program Files (x86)\VideoLAN\VLC\vlc.exe" dshow:// :dshow-adev="Monitor (M-Audio Delta Audiophi" :dshow-caching=200 --sout "#transcode{vcodec=none,acodec=mp3,ab=320,channels= 2,samplerate=44100}:http{dst=:8079/st.mp3}" :no-sout-rtp-sap :no-sout-standard

Entering http://192.168.1.9:8079/st.mp3 then runs the stream (the IP address being that of the PC running VLC).

Beware the shortcut parameter length is almost at the maximum allowed.

You would need to change your audio device (adev=) to whatever card you have with a monitor facility (the name has a maximum length as shown by the truncation of 'AudioPhile' in my card's name). Some cards may work, and some may not.

I won't bore you with all the things I tried (firewalls, other devices, many other VLC options and so on).

It was useful to check that VLC could see the audio signal by saving it to a local file first, and playing that, then trying to stream. I also tried using rtsp to another pc also running VLC, and that worked, but http on port 8080 to the other PC did not work.

I did this mainly in preparation for trying to do the same thing on my laptop. That's a different kettle of fish, running debian, and with pulse audio. I have not yet found out how to make that work, but at least I now know that I can in principle make LMS work with VLC.

bpa
2012-02-13, 11:58
Well done. VLC is a very versatile tools but a pain to get the right combination of options.


Some additional notes.

1. the dshow-adev parameters will depend on the user own hardware and drivers. It is what MS call "DirectShow". It can be many different audio sources including Tuner cards for FM or DVB-S/DVB-T.

2.If you add "#noslim=1" onto the end of the URL and you have a numeric IP address such as http://192.168.1.9:8079/st.mp3#noslim=1, and make this a favorite on mysb.com and you can play the stream on a mysb.com connected player without having to have a local LMS running.

3. You can get over the maximum length of a shortcut issue by putting the over length command in a bat file and make the shortcut execute the bat file.

PasTim
2012-02-13, 13:24
Well done. VLC is a very versatile tools but a pain to get the right combination of options.


Some additional notes.

1. the dshow-adev parameters will depend on the user own hardware and drivers. It is what MS call "DirectShow". It can be many different audio sources including Tuner cards for FM or DVB-S/DVB-T.

2.If you add "#noslim=1" onto the end of the URL and you have a numeric IP address such as http://192.168.1.9:8079/st.mp3#noslim=1, and make this a favorite on mysb.com and you can play the stream on a mysb.com connected player without having to have a local LMS running.

3. You can get over the maximum length of a shortcut issue by putting the over length command in a bat file and make the shortcut execute the bat file.
Thanks. I was in the bath when the solution to the command length problem occurred to me. I haven't written a bat file for a decade or more, so it took a while to recall it. I was just about to write one when you penned your response.

I'll try #noslim once I've got everything else up & running the way I want it.

Now to tackle 'pulse audio' on linux. I believe I need a newer version of vlc to support that, so some compilation may be in order.

bpa
2012-02-13, 13:43
Now to tackle 'pulse audio' on linux. I believe I need a newer version of vlc to support that, so some compilation may be in order.

I presume the VLC version you want to build can use a Pulseaudio source and not the emulated ALSA source. I got poor results with "arecord" and ALSA emulation so I think a Pulseaudio source is required.

bluto99
2012-02-21, 00:09
Thanks very much, this along with your related info in the linux waveinput thread enabled me to get VLC system audio streaming working using VLC 2.0 in Ubuntu Linux...spent many hours fooling with VLC streaming myself in OS X and Linux until now

garym
2012-03-01, 07:25
So, what worked was a Windows shortcut containing:

"C:\Program Files (x86)\VideoLAN\VLC\vlc.exe" dshow:// :dshow-adev="Monitor (M-Audio Delta Audiophi" :dshow-caching=200 --sout "#transcode{vcodec=none,acodec=mp3,ab=320,channels= 2,samplerate=44100}:http{dst=:8079/st.mp3}" :no-sout-rtp-sap :no-sout-standard

Entering http://192.168.1.9:8079/st.mp3 then runs the stream (the IP address being that of the PC running VLC).

Beware the shortcut parameter length is almost at the maximum allowed.

You would need to change your audio device (adev=) to whatever card you have with a monitor facility (the name has a maximum length as shown by the truncation of 'AudioPhile' in my card's name). Some cards may work, and some may not.


Without any knowledge of this approach (other than I have VLC on my laptop), I'm hoping to do the same thing (so I can play wolfgang's vault concerts on my SB). But I'm confused. My dell laptop has the following info regarding sound drivers. What would I enter in the adev= above, if it is even possible with the dell:

IDT High Definition Audio CODEC
NVIDIA High Definition Audio

bpa
2012-03-01, 07:43
Use the Recorder accessory to test if it is possible to record your audio. Then you can start testing with VLC - VLC is very picky and so it is better to use Recorder to make sure the audio source is set up correctly.

PasTim
2012-03-01, 07:51
Without any knowledge of this approach (other than I have VLC on my laptop), I'm hoping to do the same thing (so I can play wolfgang's vault concerts on my SB). But I'm confused. My dell laptop has the following info regarding sound drivers. What would I enter in the adev= above, if it is even possible with the dell:

IDT High Definition Audio CODEC
NVIDIA High Definition Audio
What devices show up as recording devices in the:

- Control Panel, Sound, Recording tab?

You need a device which monitors sound. Creative audio devices tend to have 'What U Hear'. Some others have 'Stereo Mix'. Under that heading you should find a device name. In my case, with an M-Audio card, under 'Monitor' is the M-Audio device that I use.

garym
2012-03-01, 08:27
What devices show up as recording devices in the:

- Control Panel, Sound, Recording tab?

You need a device which monitors sound. Creative audio devices tend to have 'What U Hear'. Some others have 'Stereo Mix'. Under that heading you should find a device name. In my case, with an M-Audio card, under 'Monitor' is the M-Audio device that I use.

recording tab has:

IDT High Definition Audio CODEC

I've set this as my default device, and just did a test using the simple windows sound recorder and it did capture the stream from the web player on wolfgang's vault and save it as a file (WMA file it seems was the only option in the windows recorder).

so would my windows shortcut be:

"C:\Program Files (x86)\VideoLAN\VLC\vlc.exe" dshow:// :dshow-adev="Monitor (IDT High Definition Au" :dshow-caching=200 --sout "#transcode{vcodec=none,acodec=mp3,ab=320,channels =2,samplerate=44100}:http{dst=:8079/st.mp3}" :no-sout-rtp-sap :no-sout-standard

garym
2012-03-01, 08:30
recording tab has:

IDT High Definition Audio CODEC

I've set this as my default device, and just did a test using the simple windows sound recorder and it did capture the stream from the web player on wolfgang's vault and save it as a file (WMA file it seems was the only option in the windows recorder).

so would my windows shortcut be:

"C:\Program Files (x86)\VideoLAN\VLC\vlc.exe" dshow:// :dshow-adev="Monitor (IDT High Definition Au" :dshow-caching=200 --sout "#transcode{vcodec=none,acodec=mp3,ab=320,channels =2,samplerate=44100}:http{dst=:8079/st.mp3}" :no-sout-rtp-sap :no-sout-standard

hmmm, when I use the above in a command prompt I get:

VLC cannot use the device "Monitor (IDT High Definition Au", because its type is not supported.

PasTim
2012-03-01, 09:02
hmmm, when I use the above in a command prompt I get:

VLC cannot use the device "Monitor (IDT High Definition Au", because its type is not supported.
I have struggled at times with audio cards, so I sympathise.

A few thoughts:

- I'm not clear whether you have the name IDT High... under 'Monitor' in your list of recording devices or not - Can you confirm?
- Double-check the device is enabled
- I think that name is 32 characters - I think the one I used was 31 - I have no idea if that makes a difference
- If it is very HD device (eg 24/192 or even better), bring the quality down a notch or two
- get more beer.

garym
2012-03-01, 09:06
I have struggled at times with audio cards, so I sympathise.

A few thoughts:

- I'm not clear whether you have the name IDT High... under 'Monitor' in your list of recording devices or not - Can you confirm?
- Double-check the device is enabled
- Try setting it as the default device
- I think that name is 32 characters - I think the one I used was 31 - I have no idea if that makes a difference
- If it is very HD device (eg 24/192 or even better), bring the quality down a notch or two
- get more beer.

Thanks! I'll play a bit later when I have more time. I did just install wavinput plugin and it actually works perfectly with one major (and silly) problem. For the life of me, I can't figure out how to turn off the sound from my laptop itself. If I mute or turn down volume on laptop, it also mutes playback to wavinput.... any thoughts on this.

PasTim
2012-03-01, 09:27
For the life of me, I can't figure out how to turn off the sound from my laptop itself. If I mute or turn down volume on laptop, it also mutes playback to wavinput.... any thoughts on this.
I use a mini-jack to 3.5 socket adaptor for just this purpose on my Linux-based laptop. Plug it in without the headphones, and this should turn off the sound. If it doesn't, fiddle with the sound settings - there should be one to turn off the sound when headphones are in use.

Cheap, but cheerful.

garym
2012-03-01, 10:56
I use a mini-jack to 3.5 socket adaptor for just this purpose on my Linux-based laptop. Plug it in without the headphones, and this should turn off the sound. If it doesn't, fiddle with the sound settings - there should be one to turn off the sound when headphones are in use.

Cheap, but cheerful.

yep, that's a good cheap & dirty approach....

PasTim
2012-03-01, 11:10
yep, that's a good cheap & dirty approach....
And reliable, and..... :)

I've been working out how to use vlc mainly because I failed to get wavin to work on linux, and I'm in the process of moving my LMS to linux. It seems wavin is hard to get to work on that platform (there's a thread on it here http://forums.slimdevices.com/showthread.php?t=49584&highlight=wave+input+linux&page=17.)

garym
2012-03-01, 11:42
And reliable, and..... :)

I've been working out how to use vlc mainly because I failed to get wavin to work on linux, and I'm in the process of moving my LMS to linux. It seems wavin is hard to get to work on that platform (there's a thread on it here http://forums.slimdevices.com/showthread.php?t=49584&highlight=wave+input+linux&page=17.)

i'd sorta like the vlc approach myself, because with wavein, I need to start the LMS server on my laptop and then use wavin. My main LMS is on my vortexbox, and I have no webbrowser on this to access the wolfgang's vault webplayer in any case. I was thinking the VLC approach would let me just click on an icon to create stream to my LMS as a favorite there.

PasTim
2012-03-01, 14:17
i'd sorta like the vlc approach myself, because with wavein, I need to start the LMS server on my laptop and then use wavin. My main LMS is on my vortexbox, and I have no webbrowser on this to access the wolfgang's vault webplayer in any case. I was thinking the VLC approach would let me just click on an icon to create stream to my LMS as a favorite there.
My new plot exactly. Vortexbox midi arrived today. 1TB copied over in ~5 hours. Just finishing scan. I want to keep the VortexBox dedicated to being a music server, so my laptop and/or desktop will need to do vlc duties. The Windows desktop was a lot easier to set up than the linux laptop, but eventually both work well.

bluto99
2012-04-18, 20:18
Thanks very much , I recently rearranged my electronics and now need to use VLC w/ Windows 7 to stream Pandora One rather than Linux (your other post made that work). FWIW I was able to identify the correct audio device for my system (an HP netbook) from VLC itself from the options in the stream menu and then modified your script to suit as shown below and saved the file as vlc.cmd on the desktop....works great though VLC turns the webcam on for some reason....also could NOT get this to work w/ VLC 1.0.5 but the recently released VLC 2 does work

"C:\Program Files\VideoLAN\VLC\vlc.exe" dshow:// :dshow-adev="Stereo Mix (IDT High Definition" :dshow-caching=200 --sout "#transcode{vcodec=none,acodec=mp3,ab=320,channels= 2,samplerate=44100}:http{dst=:8079/st.mp3}"