Packager configuration

Both the packagers should have the same stream module replicated. You configure this stream module to push the packaged HDS content to each origin server in both the data centers. Set the value of <SkipBadFragment> to true so that a fragment that contains corrupted or missing data is dropped. In addition, a duplicate fragment is generated at another packager and served and cached downstream. For example, set Fragment-duration to 6 seconds. This should be equal to the key-frame-interval or a small multiple of it when the encoder generates video stream with a fixed key-frame interval. If you do not set the value of <TargetDuration>, the system assumes the default value to be about twice the Fragment-duration while creating M3U8 just-in-time at origin.

stream.xml

<Stream>
	<FragmentDuration>6000</FragmentDuration>
	<TargetDuration>10000</TargetDuration>
	<Input>
		<TSMulticast>
			<MulticastAddress>multicast_add</MulticastAddress>
			<MulticastPort>multicast_port</MulticastPort>
		</TSMulticast>
	</Input>

	<OutputPipeline>
		<OutputType>HDS</OutputType>
		<DiskManagementDuration>3.0</DiskManagementDuration>
		<SkipBadFragments>true</SkipBadFragments>

	<Output>
		<HttpPush> 
		  <TargetURL>http://primary-origin1:port/eventX/bitrate_1</TargetURL> 
		</HttpPush> 

		<HttpPush> 
		  <TargetURL>http://primary-origin2:port/eventX/bitrate_1</TargetURL> 
		</HttpPush> 
	
		<HttpPush> 
		  <TargetURL>http://backup-origin1:port/eventX/bitrate_1</TargetURL> 
		</HttpPush> 
  
		<HttpPush> 
		  <TargetURL>http://backup-origin2:port/eventX/bitrate_1</TargetURL> 
		</HttpPush> 
	</Output>
	</OutputPipeline>
</Stream>