I started to explore multicast network technology and talk about it from previous post. Mostly working with WowzaStreamingEngine, I wish to show principles and milestones configuration there.
All described here is a list of simple instructions. When this post was done, the latest Wowza version was a 4.4.1. For the future XML configuration can be altered.
1. Configure virtual host instance.
Dig up RTP block at the [wowza_dir]/conf/VHosts.xml file and comment out multicast configuration variables.
You can configure both directions, but usually for stream reception Wowza needs only incoming one. You might to set up UDP buffer size, but it would be much more reliable to customize OS settings for this point.
Now your RTP block should look like this.
<DatagramConfiguration> <Incoming> <ReuseAddress>true</ReuseAddress> <ReceiveBufferSize>2048000</ReceiveBufferSize> <SendBufferSize>65000</SendBufferSize> <MulticastBindToAddress>true</MulticastBindToAddress> <MulticastInterfaceAddress>172.18.0.15</MulticastInterfaceAddress> <TrafficClass>0</TrafficClass> <MulticastTimeout>50</MulticastTimeout> <DatagramMaximumPacketSize>4096</DatagramMaximumPacketSize> </Incoming> <Outgoing> <ReuseAddress>true</ReuseAddress> <ReceiveBufferSize>65000</ReceiveBufferSize> <SendBufferSize>256000</SendBufferSize> <!-- <MulticastBindToAddress>true</MulticastBindToAddress> --> <!-- <MulticastInterfaceAddress>192.168.1.22</MulticastInterfaceAddress> --> <!-- <TrafficClass>0</TrafficClass> --> <MulticastTimeout>50</MulticastTimeout> <DatagramMaximumPacketSize>4096</DatagramMaximumPacketSize> </Outgoing> </DatagramConfiguration>
2 Configure streaming application
Find out an RTP block at the [wowza_dir]/conf/[app_name]/Application.xml file and put there some properties. The sense there is to customize a multicast stream packetization by different protocols.
There is a one milestone: in some cases Wowza can’t packetize input stream and reject this. For problem solution I use a rtpDePacketizerWrapper which works like a syncing jitter buffer.
Here is my result of configuration:
<!-- Properties defined here will override any properties defined in conf/RTP.xml for any depacketizers loaded by this application --> <Properties> <Property> <Name>multicastInterfaceAddress</Name> <Value>172.18.0.15</Value> </Property> <Property> <Name>rtpDePacketizerWrapper</Name> <Value>com.wowza.wms.rtp.depacketizer.RTPDePacketizerWrapperReChunkMPEGTS</Value> </Property> </Properties>
3. Restart WowzaStreamingEngine to refresh your configuration
4. Check the Wowza multicast stream packetization. You would be better to look at access log or try to playback this stream from Wowza server. When it doesn’t actually work, Wowza logs info messages like “Stream not healthy”.
This issue is definitely cleared up as needed. It looks like a simple “how-to” solution. But in fact there is a lot of big opportunities to optimize source stream processing. And unfortunately it’s also easy to get stuck with multicast reception by Wowza. Hope I’ll continue research about pointed network field and make more articles with mechanisms explanation.