Multicast can be very complex, its sometimes handy to be able to just test multicast yourself between two machines on the network. VLC Media Player allows you to do this quite easily.
Configure Server (Sender)
Firstly get yourself a video file you wish to multicast stream out across your network and place it on the “Sender” server machine.
Open VLC Media Player.
Click “Media”->”Stream”.
Click “File” tab, then select the file you wish to multicast using “Add”, then click “Stream”.
Click “Next”.
Specify the destination as: “RTP / MPEG Transport Stream”, tick the box for “Display Locally” and then click on “Add”.
Under “Add” specify the multicast address and port, you wish to use, in my example I’m using 239.1.1.1 and port 5004. Click “Next”.
You may wish to activate transcoding by ticking the box, otherwise ensure that “Video – H.265 + MP3 (MP4) is selected from the drop down, then click on the spanner button.
Depending on the video, you can leave things as the defaults here, in my case I first clicked on “Video Codec” tab, then ticked the box for “Keep original video track”, then on “Audio Codec” tab ticked the box for “Keep original audio track”. Once you are done click on Save.
Once you are back on the “Transcoding Options” screen (above), now click on “Next”.
You’ll see a string of configuration, you’d probably want to tick the box for “Stream all elementary streams”, and then as per the screen shot below add a “ttl” value. You’ll need this because each “hop” i.e. network switch/router that the stream passes through will drop the TTL down by one. Setting this to 50 is probably a good place to start.
Once you are done, click “Stream”, your video should start playing on the Sender (Server) machine screen, if it is you’re all set to set up the client.
Configure Client (Receiver)
Open VLC Media Player.
Click “Media”, then “Open Network Stream”.
Click on the “Network” tab, and then enter the multicast stream IP address and port number in the format shown below:
That’s it, click on “Play” and you should now be able to see the multicast stream playing from the Sender (Server).
If you have any problems, verify that any local firewalls or network firewalls (in between) are allowing both the Sender and Receiver. Ideally you should try this when both Sender and Receiver are connected to the same network subnet, if not you start to need more elaborate methods like PIM, which is beyond the scope of this document. Also check you are not being stymied by this common issue with the interfaces on Microsoft Windows machines: https://geekmungus.co.uk/?p=4115.
Hopefully that has given you a quick and useful overview of how to use VLC for multicast so you can test connectivity and also test any network configuration that is required to facilitate multicast.