Buca Bay - Always nice

Dua tiko noqu toa loaloa, na yacana ko… laga mai…

Watch streaming video over the LAN with VLC

October12

I have a large collection of videos on my Windows PC. Before today, in order to watch the videos on my computer somewhere else in the house, we’d have to copy the movie to a USB stick and transfer it to the other computer.

Since this is an almost daily occurrence, and copying videos  can take a while, I decided to look into streaming the videos  over the Local network.

My first thought was to create a virtual host on my local Apache server, and have the videos  streamed by Apache over HTTP. This worked reasonably well for a while, but after about 10 minutes or so  the video started to lag on the other side. This also happened when I tried streaming the file via FTP, using Filezilla FTP server.

I also tried using Nginx which has an FLV streaming module. The videos on my PC are mostly .avi or .divx, so I’d have to transcode to FLV before hand in order to stream. I didn’t want to have to transcode each file to FLV, since it was already taking up a huge amount of space on my hard disk.

This whole time I was using VLC to play the videos. I had totally overlooked the fact that VLC was also a video streaming server. It turns out, VLC can transcode and stream at the same time (using FFMpeg internally), so you don’t need to transcode files before hand, and keep around multiple copies of the same file in different encodings.

Here is the article on streaming video with VLC that I followed. Pretty soon I had VLC on my PC streaming movies to multiple PCs and laptops on the local network. The videos playback can also be controlled from the streaming server, so I could start and play movies for my 2 and a half year old daughter Joana while doing my work.

The only problems with streaming with VLC is that you’ll have to mix and match video encodings and streaming protocols to figure out which works. For me, streaming H264 streamed over RTP seemed to work best. Edit: I somehow missed their documentation on supported streaming protocols.

Step by step to setting up streaming a video with VLC over your LAN:

  1. Open VLC on your PC with the video
  2. Click on: Media -> Streaming…
  3. Choose the video file you want to stream (double click) A window opens with the streaming options.
  4. Choose RTP for the streaming protocol. For the address put in the IP* of the computer to stream to. You can leave the port number as is.
  5. Choose H264 from the “profiile” dropdown. This selects “MPEG-TS” for encapsulation, H264 for Video and MPEG-4 for audio.
  6. Click Stream.
  7. Then on the computer you want to watch from, Open VLC.
  8. Click on Media -> Open Network
  9. Choose RTP and the computers IP or localhost. Leave the port number as is.
  10. Click “Play”
Instead of using IPs, you can also use the computer names.
To list the computers on the Local network by going to: Start -> Network

You can also use the command line.

To open the command line on XP: Start -> Run -> type in “cmd” and click enter
On Vista: Start -> type “cmd” into the search box and click enter
In the command prompt, type: net view
For the list of IPs: arp -a
To get the IP of a computer given its name: ping <name>

To get the name of the current computer: hostname

Before trying out VLC, I was thinking of setting up Red5 to stream videos, since I have worked with it before to stream video and audio for XMPP (Instant Messaging), but since VLC does the job really well and is so easy to set up, I’m sticking to that for now.

 
posted under networking
3 Comments to

“Watch streaming video over the LAN with VLC”

  1. On October 15th, 2009 at 2:47 am Jay MAnoa MonsterID Icon Jay MAnoa Says:

    damn… errr…. yeah i think ill just wait till you get here to try that out. you kinda lost me at “I”. I as in first paragraph, first word “I”

    When all else fails…. i use Hulu.

  2. On October 15th, 2009 at 7:23 pm marika lorosio MonsterID Icon marika lorosio Says:

    very entertaining blog bro. vlp fdt tfp pvl fkz abc , man… im just at FOB. lmao.

  3. On October 15th, 2009 at 8:01 pm bucabay MonsterID Icon bucabay Says:

    Lol.. in short, we can now watch movies from all the PCs in the house. Say Vara is on her laptop, Joana on one PC, and me on mine. Before I go to sleep I usually take the laptop to the room and turn on a movie… The actual movies are on my work PC’s hard drive.

    The actual process of doing it is pretty simple. I think I’ll either post up a better guide. I’m seriously thinking of developing an application for this. One that downloads movies of torrents, allows you to watch and streams it at the same time.

    This all started when Jay showed me how to download torrents a few years ago. I couldn’t believe I’d been on the net for that long without knowing the torrent universe… Now I’m addicted…

    BTW, Jay, we can’t access hulu’s videos in Fiji. I tried proxying through a US server, but it was a bit slow since the proxy uses encryption and doing that for videos slows down the streaming quite a bit. I think I’ll set up a clear-text proxy for hulu when I get the time.

    What I do right now is watch them off watch-movies-links.net, http://www.watch-movies-online.tv/

Email will not be published

Website example

Your Comment:

 
Tag Cloud