Getting VLC to stream audio to LMS

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • PasTim
    Senior Member
    • Nov 2010
    • 3287

    Getting VLC to stream audio to LMS

    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.
    LMS 8.1 on PC, Xubuntu 20.04, FLACs 16->24 bit, 44.1->192kbps. 2 Touches & EDO.
    LMS plugin UPnP/DLNA Bridge to MF M1 CLiC (A308CR amp & ESLs) & Marantz CR603 UPnP renderers.
    Also Minimserver & Upplay to same & to upmpdcli/mpd PC renderers.
    Squeezelite to Meridian USB Explorer DAC to PC speakers/headphones.
    Wireless Xubuntu 20.04 laptop firefox/upplay or Android mobile with Squeeze-Ctrl/BubbleUPnP controls LMS/Minimserver.
  • bpa
    Senior Member
    • Oct 2005
    • 22718

    #2
    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.

    Comment

    • PasTim
      Senior Member
      • Nov 2010
      • 3287

      #3
      Originally posted by bpa
      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.
      LMS 8.1 on PC, Xubuntu 20.04, FLACs 16->24 bit, 44.1->192kbps. 2 Touches & EDO.
      LMS plugin UPnP/DLNA Bridge to MF M1 CLiC (A308CR amp & ESLs) & Marantz CR603 UPnP renderers.
      Also Minimserver & Upplay to same & to upmpdcli/mpd PC renderers.
      Squeezelite to Meridian USB Explorer DAC to PC speakers/headphones.
      Wireless Xubuntu 20.04 laptop firefox/upplay or Android mobile with Squeeze-Ctrl/BubbleUPnP controls LMS/Minimserver.

      Comment

      • bpa
        Senior Member
        • Oct 2005
        • 22718

        #4
        Originally posted by PasTim
        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.

        Comment

        • bluto99
          Junior Member
          • Feb 2012
          • 23

          #5
          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

          Comment

          • garym
            Senior Member
            • May 2008
            • 13450

            #6
            Originally posted by PasTim
            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
            Home: Pi4B-8GB/pCP8.2.x/4TB>LMS 8.5.x>Transporter, Touch, Boom, Radio (all ethernet)
            Cottage: rPi4B-4GB/pCP8.2.x/4TB>LMS 8.5.x>Touch>Benchmark DAC I, Boom, Radio w/Battery (Radio WIFI)
            Office: Win11(64)>foobar2000
            The Wild: rPi3B+/pCP7.x/4TB>LMS 8.1.x>hifiberry Dac+Pro (LMS & Squeezelite)
            Controllers: Material Skin, iPhone14Pro & iPadAir5 (iPeng), or CONTROLLER
            Files: Ripping: dBpoweramp > FLAC; Post-rip: mp3tag, PerfectTunes, TuneFusion; Streaming: Spotify

            Comment

            • bpa
              Senior Member
              • Oct 2005
              • 22718

              #7
              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.

              Comment

              • PasTim
                Senior Member
                • Nov 2010
                • 3287

                #8
                Originally posted by garym
                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.
                LMS 8.1 on PC, Xubuntu 20.04, FLACs 16->24 bit, 44.1->192kbps. 2 Touches & EDO.
                LMS plugin UPnP/DLNA Bridge to MF M1 CLiC (A308CR amp & ESLs) & Marantz CR603 UPnP renderers.
                Also Minimserver & Upplay to same & to upmpdcli/mpd PC renderers.
                Squeezelite to Meridian USB Explorer DAC to PC speakers/headphones.
                Wireless Xubuntu 20.04 laptop firefox/upplay or Android mobile with Squeeze-Ctrl/BubbleUPnP controls LMS/Minimserver.

                Comment

                • garym
                  Senior Member
                  • May 2008
                  • 13450

                  #9
                  Originally posted by PasTim
                  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,chan nels =2,samplerate=44100}:http{dst=:8079/st.mp3}" :no-sout-rtp-sap :no-sout-standard
                  Home: Pi4B-8GB/pCP8.2.x/4TB>LMS 8.5.x>Transporter, Touch, Boom, Radio (all ethernet)
                  Cottage: rPi4B-4GB/pCP8.2.x/4TB>LMS 8.5.x>Touch>Benchmark DAC I, Boom, Radio w/Battery (Radio WIFI)
                  Office: Win11(64)>foobar2000
                  The Wild: rPi3B+/pCP7.x/4TB>LMS 8.1.x>hifiberry Dac+Pro (LMS & Squeezelite)
                  Controllers: Material Skin, iPhone14Pro & iPadAir5 (iPeng), or CONTROLLER
                  Files: Ripping: dBpoweramp > FLAC; Post-rip: mp3tag, PerfectTunes, TuneFusion; Streaming: Spotify

                  Comment

                  • garym
                    Senior Member
                    • May 2008
                    • 13450

                    #10
                    Originally posted by garym
                    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,chan nels =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.
                    Home: Pi4B-8GB/pCP8.2.x/4TB>LMS 8.5.x>Transporter, Touch, Boom, Radio (all ethernet)
                    Cottage: rPi4B-4GB/pCP8.2.x/4TB>LMS 8.5.x>Touch>Benchmark DAC I, Boom, Radio w/Battery (Radio WIFI)
                    Office: Win11(64)>foobar2000
                    The Wild: rPi3B+/pCP7.x/4TB>LMS 8.1.x>hifiberry Dac+Pro (LMS & Squeezelite)
                    Controllers: Material Skin, iPhone14Pro & iPadAir5 (iPeng), or CONTROLLER
                    Files: Ripping: dBpoweramp > FLAC; Post-rip: mp3tag, PerfectTunes, TuneFusion; Streaming: Spotify

                    Comment

                    • PasTim
                      Senior Member
                      • Nov 2010
                      • 3287

                      #11
                      Originally posted by garym
                      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.
                      LMS 8.1 on PC, Xubuntu 20.04, FLACs 16->24 bit, 44.1->192kbps. 2 Touches & EDO.
                      LMS plugin UPnP/DLNA Bridge to MF M1 CLiC (A308CR amp & ESLs) & Marantz CR603 UPnP renderers.
                      Also Minimserver & Upplay to same & to upmpdcli/mpd PC renderers.
                      Squeezelite to Meridian USB Explorer DAC to PC speakers/headphones.
                      Wireless Xubuntu 20.04 laptop firefox/upplay or Android mobile with Squeeze-Ctrl/BubbleUPnP controls LMS/Minimserver.

                      Comment

                      • garym
                        Senior Member
                        • May 2008
                        • 13450

                        #12
                        Originally posted by PasTim
                        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.
                        Home: Pi4B-8GB/pCP8.2.x/4TB>LMS 8.5.x>Transporter, Touch, Boom, Radio (all ethernet)
                        Cottage: rPi4B-4GB/pCP8.2.x/4TB>LMS 8.5.x>Touch>Benchmark DAC I, Boom, Radio w/Battery (Radio WIFI)
                        Office: Win11(64)>foobar2000
                        The Wild: rPi3B+/pCP7.x/4TB>LMS 8.1.x>hifiberry Dac+Pro (LMS & Squeezelite)
                        Controllers: Material Skin, iPhone14Pro & iPadAir5 (iPeng), or CONTROLLER
                        Files: Ripping: dBpoweramp > FLAC; Post-rip: mp3tag, PerfectTunes, TuneFusion; Streaming: Spotify

                        Comment

                        • PasTim
                          Senior Member
                          • Nov 2010
                          • 3287

                          #13
                          Originally posted by garym
                          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.
                          LMS 8.1 on PC, Xubuntu 20.04, FLACs 16->24 bit, 44.1->192kbps. 2 Touches & EDO.
                          LMS plugin UPnP/DLNA Bridge to MF M1 CLiC (A308CR amp & ESLs) & Marantz CR603 UPnP renderers.
                          Also Minimserver & Upplay to same & to upmpdcli/mpd PC renderers.
                          Squeezelite to Meridian USB Explorer DAC to PC speakers/headphones.
                          Wireless Xubuntu 20.04 laptop firefox/upplay or Android mobile with Squeeze-Ctrl/BubbleUPnP controls LMS/Minimserver.

                          Comment

                          • garym
                            Senior Member
                            • May 2008
                            • 13450

                            #14
                            Originally posted by PasTim
                            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....
                            Home: Pi4B-8GB/pCP8.2.x/4TB>LMS 8.5.x>Transporter, Touch, Boom, Radio (all ethernet)
                            Cottage: rPi4B-4GB/pCP8.2.x/4TB>LMS 8.5.x>Touch>Benchmark DAC I, Boom, Radio w/Battery (Radio WIFI)
                            Office: Win11(64)>foobar2000
                            The Wild: rPi3B+/pCP7.x/4TB>LMS 8.1.x>hifiberry Dac+Pro (LMS & Squeezelite)
                            Controllers: Material Skin, iPhone14Pro & iPadAir5 (iPeng), or CONTROLLER
                            Files: Ripping: dBpoweramp > FLAC; Post-rip: mp3tag, PerfectTunes, TuneFusion; Streaming: Spotify

                            Comment

                            • PasTim
                              Senior Member
                              • Nov 2010
                              • 3287

                              #15
                              Originally posted by garym
                              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/showth...+linux&page=17.)
                              LMS 8.1 on PC, Xubuntu 20.04, FLACs 16->24 bit, 44.1->192kbps. 2 Touches & EDO.
                              LMS plugin UPnP/DLNA Bridge to MF M1 CLiC (A308CR amp & ESLs) & Marantz CR603 UPnP renderers.
                              Also Minimserver & Upplay to same & to upmpdcli/mpd PC renderers.
                              Squeezelite to Meridian USB Explorer DAC to PC speakers/headphones.
                              Wireless Xubuntu 20.04 laptop firefox/upplay or Android mobile with Squeeze-Ctrl/BubbleUPnP controls LMS/Minimserver.

                              Comment

                              Working...