Roger's woze

July 30, 2010

how to use VLC to stream your desktop live (windows) with audio (or stream a DVD)

Filed under: Uncategorized — rogerdpack @ 12:38 pm

Turns out that you can…I think so anyway.

Basically you setup VLC to stream from your desktop+audio.

Sound easy? It does take a few steps to get setup.  I should make it easy and market it :)

To stream desktop:

VLC by default comes with a “screen input” option, to capture the desktop.  Unfortunately it appears there’s a bug and currently it cannot use that option to capture along with audio (it is video only).

So we will have to use an alternative input, called DirectShow.  With Directshow, you can choose your video and your audio input device separately, and they do work together out of the box.

So first go and download a direct show screen capture input filter: http://betterlogic.com/roger/?p=3059

Next setup your sound card to be able to “capture” wave out.  If it is not there as an option then you may find some helpful notes here: http://betterlogic.com/roger/?p=3073

Now open VLC, choose Media [menu] -> Streaming -> Capture Device tab -> Set video device name as “screen capture” (may need to hit “refresh list” button first), and set audio device name as whatever device is capturing your wave out (probably your default sound card name, maybe something else).

Now to click on “stream” at the bottom.

To stream DVD:

Go to Media [menu] -> Streaming -> Disc (make sure right drive is listed), hit Stream.

Now for both:

Click on “Destinations”, change destination to http, click add, change url to “/go.mpg”

Now you’ll want to stream it using mp3 audio output, so click the wrench to edit the output options -> audio codec tab -> change it to mp3, hit save.

Now hit “Stream”

It should now say “streaming” on the bottom.

Now to test your stream, let’s watch the stream by viewing it within another VLC instance (as client this time).

open up another instance of VLC, and open up that very stream, like

Media [menu] -> Open Network Stream -> type in http://localhost:8080/go.mpg

If this works, you are half way there.

Now let’s discover our more public IP address:

First find out your IP by running the “ipconfig” program.  Open the “run” box by hitting windows + r key, now type in “cmd /c ipconfig && pause”

Looks for a line like “IP Address …… 1.2.3.4″ (your IP address if the 1.2.3.4). (in vista it will say IPv4 Address).

now open it with a new instance of VLC, like

Media [menu] -> Open Network Stream -> type in http://1.2.3.4:8080/go.mpg (replace 1.2.3.4 with your IP Address).

And you’re live.  At least you could theoretically go to other computers on your local network and they can see that stream of your  ”screen share” your desktop and audio now.

If you wanted to watch it live from “anywhere on the internet” you’d probably have to setup appropriate port forwarding, which is a topic for another day.

Comments welcome.

6 Comments »

  1. [...] http://betterlogic.com/roger/?p=3058 [...]

    Pingback by How to use VLC as a free open source alternative to playon.tv « Roger's woze — July 30, 2010 @ 1:19 pm

  2. [...] http://betterlogic.com/roger/?p=3058 Comments [...]

    Pingback by vlc cannot see stream of desktop « Roger's woze — August 3, 2010 @ 7:14 pm

  3. you might get away with using VLC’s “mosaic” feature to combine audio with the screen:// format

    But I haven’t tried it…

    Comment by rogerdpack — August 30, 2010 @ 10:43 pm

  4. [...] http://betterlogic.com/roger/?p=3058 Comments (27) [...]

    Pingback by how to stream from pc to tv using vlc « Roger's woze — August 30, 2010 @ 10:43 pm

  5. if yours skips, here are some ideas to make it faster:

    change screen resolution (size, bits)
    change fps (of both encoder, the input)
    write your own speedier screen capturer (directshow filter et al): http://betterlogic.com/roger/?p=3037
    change what you “encode” it into
    get a faster cpu/more cores
    possibly getting a quality GPU/graphics card (might help) and/or enable it in VLC so that it can use it.

    use ffdshow or another encoder? http://forum.videolan.org/viewtopic.php?f=14&t=81373

    Comment by rogerdpack — August 31, 2010 @ 7:35 pm

  6. even more aggressive would be: save it “raw” to a file, let it buffer for awhile, writing that file, then stream from that file, or transcode from that file to an “encoded” file, then stream from the encoded file. triple buffer!

    Comment by rogerdpack — August 31, 2010 @ 7:36 pm

RSS feed for comments on this post. TrackBack URL

Leave a comment

Powered by WordPress