• How to configure MediaCache for Wowza nDVR

    This article describes how to use the MediaCache read-through caching mechanism to cache DVR chunks on edge servers in a multi-server configuration.

    Note: For use with Wowza Media Server™ software (version 3.1.2.16 or later).

    Prerequisites


    1. Set up your Wowza media server to stream DVR from origin to edge: How to set up live stream repeater for use with Wowza nDVR (origin/edge)

    2. Request the MediaCache Addon package: How to get MediaCache AddOn (scale video on demand streaming)

    3. Follow the "MediaCache User's Guide" that's included in the MediaCache AddOn package to install it on each edge server. The User's Guide provides basic setup instructions using an application named mediacache. Apply these instructions to the Application.xml file for your edge server, which may have a different name. If you followed the naming in the How to set up live stream repeater for use with Wowza nDVR article, your edge server will be named dvredge.


    Application.xml Configuration


    In your Application.xml file, add the following property under Application/DVR/Properties:
    <Properties>
         <Property>
              <Name>dvrMediaCacheEnabled</Name>
              <Value>true</Value>
              <Type>Boolean</Type>
         </Property>
    </Properties>

    MediaCache.xml Configuration


    Un-comment the sample MediaCacheSource named dvrorigin in the MediaCache.xml file:
    		<MediaCacheSource>
    			<Name>dvrorigin</Name>
    			<BasePath>http://</BasePath>
    			<Prefix>dvrorigin/</Prefix>
    			<BaseClass>com.wowza.wms.mediacache.impl.MediaCacheItemHTTPImpl</BaseClass>
    			<ReaderClass></ReaderClass>
    			<DefaultBlockSize>262144</DefaultBlockSize>
    			<MaxTimeToLive>1200000</MaxTimeToLive>
    			<MinTimeToLive>600000</MinTimeToLive>
    			<ReadAhead>true</ReadAhead>
    			<ReadAheadThreshold>50</ReadAheadThreshold>
    			<IsPassThru>false</IsPassThru>
    			<Properties>
    				<Property>
    					<Name>httpReadTimeout</Name>
    					<Value>3000</Value>
    					<Type>Integer</Type>
    				</Property>
    			</Properties>
    		</MediaCacheSource>
    For nDVR workflows, the Name property value must be dvrorigin. For most deployments, the default settings for DVR chunk caching should be adequate. For more information about the property values, see the "MediaCache User's Guide."

    If you're having problems or want to discuss this article, post in our forum.