Multicast Video Streaming with VLC (IT Tutorial)

Good afternoon POB community

It's @trippymane again with a crazy IT tech tutorial 😁

This guide was started 5 months ago when we were carrying a lot of different types of test on a newly installed network in my workplace, I then had some busy times in life and switched my focus over other things and other types of posts, you may have noticed that I stopped posting altogether (except for my Graffiti Lettering Contest) as I've been a bit blue lately, now I am trying to get back to post more often so I thought it could be a good idea to finish first my posts in progress, clear all the past clutter and then start fresh with nothing left behind! Thanks for reading and have fun with some IT madness! Cheers

If you read my last IT post you know that I do work in IT and I like to write down the stuff that I learn to memorise it better and since I joined Hive I decided to blog these entries here! Enjoy! 🤣

I will try to keep this entry shorter than the previous one.

Multicast Video Streaming with VLC over LAN

Today I will show you how to setup a streaming with VLC over a Multicast address (a particular class D address used to enable multiple addresses to connect to the same host at the same time *) in the same LAN (your home connection for example) . At work we use this tool that I'll show today to push Multicast streams over the whole network to check if certain security and QoS (quality of service) policies are configured correctly, if certain connections are allowed, etc...

* Imagine when you connect to an online stream of a youtuber of gamer on twitch, most likely your PC like the PCs of many other watchers will connect to the server streaming the video through a multicast address over the internet, over a specific port using a specific protocol

And in this guide I will show you a little bug/error that we found in the VLC software, we couldn't make it work and had to spend a bit of time around it to find the fixt eventually, I will make sure to highlight that part in the guide!

Lab Scenario

For today's tutorial I will set up a home lab with 2 devices, Windows and Linux, I will setup one as the server pushing the stream and use the other to connect to the server and receive the stream in real time. I will also try to connect to the same stream with my Android device to test the multi-connectivity.

I will set this up over my LAN connection at home so all machines will have a local address in range 192.168.1.x /24.

Quickly at the end I will recreate the same stream but this time with 2 devices connected to a LAN on a dumb subnet (no internet) and will also capture some packets with Wireshark to show what happens between the devices when a Multicast stream takes place!

What we need

  • 2-3 devices (any OS) in the same LAN
  • VLC installed on all the devices (can be found on their official website)
  • LAN connection (In this case I'll use my existing LAN connecting from my router, but we can create our own LAN with a switch+router setup or directly connecting the devices to a router)
  • A video for the test
    (I just downloaded one from herequicky, this one first download link on the page)

Let's start the test

Server device - Windows Machine

Because we will setup the stream over a Class D Multicast Address ( - (a special range of address reserved for multicast purposes) we don't really need to know the IP address of the server, we only need the Multicast address and the Port over which we want to send the stream. Let's start setting up the stream.

For this test I will stream the video over Multicast address, you can use any within the range)

First we need to open VLC and go to Media and then Stream (or simply Ctrl+S):


This will open the Stream settings:


Click on Add and select the Video source to stream:


Click on Stream at the bottom and this new window will pop up, here click Next:


In the next window we need to do a very important step!
At the bottom in New destination we need to select RTP/MPEG Transport Stream and click Add:


After clicking Add this windows will pop up:


At this stage we need to input our Multicast address and the Port over which we want to stream!
As we said previously we'll use and I'll leave the default port 5004*, then click Next:

stream6.png * It could be necessary for the test to work to disable the Firewall or allow the Port used for the stream on both devices

In the next window make sure to tick Active Transcoding and select the right profile for your file, in my case I used the MP4 standard - Video H.264+ MP3 (MP4), then click Next:


Previously I mentioned an error/bug, at this point is where we need to APPLY THE FIX in order for the Stream to work!
Check out the Next Step!

Make sure to tick Stream all elementary streams at this stage, this will change the config file (Generated stream output string)!

The bug is in the way the software creates the final configuration file (or Generated stream output string), it fails to define an important value: TTL (time to live), let me try to explain with the help of some pictures.
Basically VLC will take all the options we just defined and will make a config string out of it, let's have a look at what that means:


We can see within the string some of the options we defined such as the dst= value and the port=5004 value.

The error is in the fact that we have a value that is missing! TTL (Time to live) is not defined in the config, so in order to fix the issue we can simply add it ourselves manually, like I did here (you can see I added manually the value ttl=10 to the string, you can use any number really as long as it's higher than 1):


Now that the string is correct we can finally click on Stream and this will start our stream!

The server is now streaming and pushing the video to the network over Port 5004 and Multicast address (I will capture some packets with Wireshark to show you this later!):


We can also see at the top it says "converting file:///................"
I selected also Repeat 1 always so the stream will keep looping itself.

We can move on to the client devices!

Client devices - Linux & Android


Now we can jump over the other machines and try to connect to the Stream we created. Let's start with Linux. In the VLC software we need to go to Media and select Open Network Stream:

In the next window we'll need to input the network address of our stream:

If you remember our Stream is an RTP stream, in order to connect to the Stream we need to input the following string in VLC:


This will tell VLC to which address connect over port 5004 using RTP as a protocol:


Next click on play and we should be able to see our stream on the screen:

And here it is!



For the Android part the app is a bit more intuitive to use and on the home screen we can see a huge + NEW STREAM button which we can use to connect to a streaming address:


After clicking it it will prompt us to enter the address to where we want to connect (same as before):



And here is the stream working on our Android phone:


If you are wondering how I did manage to connect my Android to this LAN, I used a type C Ethernet Adapter, I recently found out that it works on Android and I use it with an app called WifiMan to get info about the connection, this is a game changer, now at work I test Ethernet lines with my phone and no need to bring a heavy laptop (LOL IT and Laziness... You know it ahahaha!)

And Andoid being based on Linux is just next level, I can pull out a terminal (like CMD for Windows we have bash for Linux and it works on Android, the app i use is called Termux) and ping stuff! Lovely 😎

In my next IT post maybe I can do a quick overview of how I use these particular tools with my Android phone and what I use them for!

Wireshark captures

I will hide my MAC address for security reasons!

As I previously mentioned now I want to quickly set up a LAN between the two devices and sniff some packets with Wireshark to show you the stream using the Multicast address and port 5004.

To set up a LAN I will use a Router and a Switch, router will be set in range 192.168.2.x so we should see devices in that IP range connecting to multicast address through port 5004 while streaming and connecting to the stream.

As always I want first to check the devices have all IP addresses and ping between them, Windows PC has and Linux has

Here's the screen of my Linux machine getting IP address able to ping Windows, this is enough to make sure we have connectivity.


Here are some captures from the Windows (SENDING STREAM) and you can see our Windows machine ( as the source, the Multicast address as the destination and port 5004 being used as the destination port:


If we look into the UDP field we can see more clearly port 5004 as the destination port:


And if we check the IPv4 field we can see more clearly our source and destination addresses, as well as the TTL=10 field we added manually when setting up the stream, remember?


For the last screenshot I wanted to show you the Linux packet capture (receiving machine):


As you can see we see pretty much the same thing as on the Windows machine, if you think about it we are sending a stream over and not directly to (Linux) and that's why we do not see any activity from our Linux machine in the capture, the machine is just listening and not sending anything over the network, the only machine that is sending packets over the network is (Windows).

In both captures we can see that the stream is being sent over Multicast address (and MAC address 01:00:5e:00:00:01 which is a multicast mac address) and this is exactly what I was expecting from this test!
If the test were carried over a live network and not just an empty LAN (no internet) we would have seen so much more stuff going on, also for clarity the multicast stream was the only process running on the PCs in order to have less clutter in our capture.

That's it for today, I hope you enjoyed my quick guide and learned a thing or two, are you ready to get some testing done? 😜

This particular kind of test was useful for us when we were setting up the new enterprise network and wanted to check if multicast streams were working over particular subnets and if the PPS policies were right and so on and so forth, IT gibberish LOL

If you have any question or need some help with anything related to this tutorial feel free to drop a comment and I will try to reply and help as soon as I can! Cheers


IT nerd 😆



3 columns
2 columns
1 column