Sunday, February 27, 2011

Stream your Webcam over IPv6 using VLC

It's quite easy to stream your Webcam over IPv6. Here's the recipe for doing it on Ubuntu Linux:

  1. Make sure VLC is installed ("sudo apt-get install vlc")
  2. Make sure your webcam is connected
  3. Make sure VLC can see your webcam: "vlc v4l2:///dev/video0" should show what your webcam sees.
  4. Now start VLC as a streamer on port 4444 (or choose another free port above 1024) with this one command: 

    cvlc -vvv v4l2:///dev/video0  --sout '#transcode{vcodec=mp4v,acodec=mpga,vb=800,ab=128}:standard{access=http,mux=ogg,dst=[::]:4444}'

  5. Find out the IPv6 address of your streaming machine, for example with ifconfig or via http://test-ipv6.com/ . Let's say it's 2001:888:aaa::1.
  6. Still on the same machine, make sure you can watch the stream locally:

    vlc http://[ip6-localhost]:4444/

    vlc http://[2001:888:aaa::1]:4444/


  7. Now, on another machine with IPv6 and VLC, you can watch your webcam stream with the same command above, so 

    vlc http://[2001:888:aaa::1]:4444/

    If you're more a GUI person, you can open VLC, and put the URL in Media -> Open Network Stream -> Network.
  8. That's it.

No comments: