web developer & system programmer

coder . cl

ramblings and thoughts on programming...

wowza timeshifter

published: 14-02-2011 / updated: 14-02-2011
by Daniel Molina Wegener

table of contents


overview

This is a Wowza Media Server module. The StreamTimeShifter module is made to create time shifted streams, based upon existing streams on the StorageDirectory of the given Wowza Media Server. It allows you to schedule stream transmission based on parametric timeshift in minutes on the Server.xml file. Also it this module provides a recording module, that enhances the time shifted transmission, and has more parameters than the live-record module. You can configure the shifted streams along the site through a single Application, and you can configure which streams will be recorded along Applications on the Wowza Media Server.


installing the module

The module must be installed on the library directory. For example if the Wowza Media Server is installed on the /usr/local/WowzaMediaServer directory, the JAR file must be installed on the /usr/local/WowzaMediaServer/lib directory.

gunzip WowzaTimeShifter.jar.gz
cp WowzaTimeShifter.jar /usr/local/WowzaMediaServer/lib


time shifter configuration

You must add the server listener, on the ServerListeners on the Server.xml section as follows:

<ServerListeners>
        <ServerListener>
                <BaseClass>cl.coder.wowza.scheduler.StreamTimeShifter</BaseClass>
        </ServerListener>
</ServerListeners>

Then you must configure the Scheduler using the Properties section:

<Properties>
        <Property>
                <Name>PublishToVHost</Name>
                <Value>_defaultVHost_</Value>
        </Property>
        <Property>
                <Name>PublishToApplication</Name>
                <Value>MTV</Value>
        </Property>
        <Property>
                <Name>StreamsToAdd</Name>
                <Value>ROCK,CLASSIC_ROCK,GRUNGE</Value>
        </Property>
        <Property>
                <Name>MinutesToShift</Name>
                <Value>30</Value>
        </Property>
</Properties>

The parameters are as follows:

PublishToVHost
WowzaMediaServer VHost where is published the Schduled Stream
PublishToApplication
WowzaMediaServer Application where is published the Schduled Stream
StreamsToAdd
WowzaMediaServer Stream Names patterns to add. Are separated by , chars.
MinutesToShift
Minutes to shift the Stream.


recording module configuration

The recording module is configured per Application that runs on the Wowza Media Server. On the <Modules/> section for each Application.xml file you must add the ShifterStreamRecorder module as follows:

<Module>
    <Name>ShifterStreamRecorder</Name>
    <Description>ShifterStreamRecorder</Description>
    <Class>cl.coder.wowza.recorder.ShifterStreamRecorder</Class>
</Module>

Once the module is added, you must add the proper properties to the <Properties> section as follows:

<Property>
        <Name>MediaFormat</Name>
        <Value>1</Value>
</Property>
<Property>
        <Name>RecordStreams</Name>
        <Value>ROCK,CLASSIC_ROCK,GRUNGE</Value>
</Property>
<Property>
        <Name>OnUnPublishCommand</Name>
        <Value>/usr/local/WowzaMediaServer/event_publish.sh</Value>
</Property>
<Property>
        <Name>OnPublishCommand</Name>
        <Value>/usr/local/WowzaMediaServer/event_unpublish.sh</Value>
</Property>
<Property>
        <Name>MaxRecordTime</Name>
        <Value>60</Value>
</Property>

The parameters are as follows:

    MediaFormat
    1 to record flv files and 2 to record mp4 files.
    RecordStreams
    Streams to record, separated by the “,” character.
    OnUnPublishCommand
    Command executed once one of the listed streams are unpublished.
    OnPublishCommand
    Command executed once one of the listed streams are published.
    MaxRecordTime
    Stream Record duration in minutes, once this time is elapsed, a new file is recorded.


about this module

This module was developed by Daniel Molina Wegener <dmw@coder.cl>. You can contact him through electronic mail.


download demo


SHA1(WowzaTimeShifterShareware-bin.jar) = 3cd0b04058e2fa0dfe167cde2e5463a8e506ce20


pricing

You must contact me directly using the contact form, or write me an email to dmw at coder dot cl to know the pricing information.