While working on studying multicast, I had to find a way to test the multicast traffic. I had read that others accomplished this by just by doing manual ‘joins’ on the routers/switches and that seemed to be sufficient for basic tests. However, I was hoping for a little bit more so I could really see multicast in action.
After a little goggling I came across the VLC player…
http://www.videolan.org/vlc/index.html
I determined that it supported multicast RTP streams. However, after installation, I was having a hard time getting a computer to actually stream a video clip. I’m sure I was just missing a setting somewhere in the GUI but I found a different way to do it that fit my needs a little better. You can load a video through VLC with all of your required settings by passing the settings to the VLC.exe on load. I ended up hacking together this command to load my video for the multicast stream…
C:\Program Files (x86)\VideoLAN\VLC\vlc -vvv “D:\\MVI_3716.avi” –sout=#transcode{vcodec=h264,vb=0,scale=0,acodec=mpga,ab=128,channels=2,samplerate=44100}:rtp{dst=239.1.2.3,port=5004,mux=ts,ttl=10} :sout-all :sout-keep –loop
That looks awful, but if you paste it into notepad without word wrap you’ll get a straight line out of it. Basically, this just loads the VLC EXE (change your path if required) and tells it to load the specified AVI file into a multicast stream on the multicast IP address of 239.1.2.3 port 5004. It also tells VLC to loop the video so it keeps playing.
I was fortunate enough to have an old PC laying around so between that, my desktop, and my wife’s new laptop I had three PCs that I could test the multicast streaming on. I’d fire up the command above on one of the PCs, and then I could connect through the lab with a VLC player on the two other PCs.
Connecting to the stream through VLC is pretty easy, you just open the VLC player and select the ‘Open Network Stream’ option from the Media menu…
In the ‘Open Media’ box that appears, enter the IP of the multicast stream using the syntax of…
rtp://@<Multicast IP address>
Then hit play and wait for the IGMP joins and the PIM grafting to take place and with any luck you’ll see the stream you are generating from the other PC…
Which in my case, if a man spinning flaming things around (it was the only AVI I could find).
Hope this makes it a little easier for anyone else trying to do this, for some reason all of the guides I found online for using VLS for multicast streaming were old and the command syntax must have changed significantly.
Tags: Multicast

No comments
Comments feed for this article
Trackback link: http://www.dasblinkenlichten.com/setting-up-a-multicast-lab-using-vlc-2-0-5/trackback/