Page 1 of 2 12 LastLast
Results 1 to 10 of 15

Thread: Startup Streams Monitor Module (monitor content folder for .sdp and .stream files)

  1. #1

    Default Startup Streams Monitor Module (monitor content folder for .sdp and .stream files)

    The following configuartion will add a server listener that will monitor an applications content folder for added and deleted .sdp and .stream files. When a new file is detected, the stream manager will be used to start the stream. When a file is removed the stream manager will be used to stop the stream. Below is the configuration.

    First, install this patch or newer build or patch: WowzaMediaServer2.1.2-patch1.zip

    Setup your application for live streaming following one of these tutorials:

    RTMP, RTSP/RTP:
    http://www.wowzamedia.com/forums/showthread.php?t=6467
    MPEG-TS:
    http://www.wowzamedia.com/forums/showthread.php?t=6468
    Native RTP (SDP file):
    http://www.wowzamedia.com/forums/showthread.php?t=6469
    IP Camera (RTSP/RTP re-streaming):
    http://www.wowzamedia.com/forums/showthread.php?t=6470

    Next:
    1. Edit [install-dir]/conf/Server.xml and make the following changes:
      1. Added the following <ServerListener> to the <ServerListeners> list:
        Code:
        <ServerListener>
        	<BaseClass>com.wowza.wms.serverlistener.ServerListenerStartupStreamsMonitor</BaseClass>
        </ServerListener>
      2. Add the following properties to the <Properties> container at the bottom of the file:
        Code:
        <!-- Pipe (|) delimited list of application names for which to monitor: [vhostName]:[application]/[appInstance] -->
        <!-- This can be shorted to [application] assuming using _defaultVHost_ and _definst_ as the vhost and appInstance names -->
        <Property>
        	<Name>startupStreamsMonitorApplicationList</Name>
        	<Value>live</Value>
        </Property>
        <!-- Stream prefix. Valid values are: flv and mp4 -->
        <Property>
        	<Name>startupStreamsMonitorStreamPrefix</Name>
        	<Value>mp4</Value>
        </Property>
        <!-- MediaCaster type. Valid values are: rtp, rtp-record, shoutcast, shoutcast-record, liverepeater -->
        <Property>
        	<Name>startupStreamsMonitorMediaCasterType</Name>
        	<Value>rtp</Value>
        </Property>
        <!-- Pipe  (|) delimited list of file extensions for which to search -->
        <Property>
        	<Name>startupStreamsMonitorExtensionFilter</Name>
        	<Value>.stream|.sdp</Value>
        </Property>
        Note: Modify the properties as needed for your streaming setup.

    2. Edit [install-dir]/conf/live/Application.xml and make the following changes:
      1. Create a non-shared content folder for the live application by setting the Streams/StorageDir as follows:
        Code:
        <StorageDir>${com.wowza.wms.context.VHostConfigHome}/applications/${com.wowza.wms.context.Application}/content</StorageDir>
      2. Add the following properties to the <Properties> container at the bottom of the Application.xml file (be sure to get the correct <Properties> container - there are several in the file):
        Code:
        <!-- Stream prefix. Valid values are: flv and mp4 -->
        <Property>
        	<Name>startupStreamsMonitorStreamPrefix</Name>
        	<Value>mp4</Value>
        </Property>
        <!-- MediaCaster type. Valid values are: rtp, rtp-record, shoutcast, shoutcast-record, liverepeater -->
        <Property>
        	<Name>startupStreamsMonitorMediaCasterType</Name>
        	<Value>rtp</Value>
        </Property>
        <!-- Pipe delimited list of file extensions for which to search -->
        <Property>
        	<Name>startupStreamsMonitorExtensionFilter</Name>
        	<Value>.stream|.sdp</Value>
        </Property>
        Note: Modify the properties as needed for your streaming setup.
        Note: The values specified here will override the values specified in [install-dir]/conf/Server.xml.

    3. Create the folder [install-dir]/applications/live/content. This folder is the folder that will be monitored for new .sdp and .stream files.
    4. Start Wowza Media Server


    With this in place streams will automatically be started and stopped as .stream and .sdp files are added and removed from the [install-dir]/applications/live/content folder.

    Note: This system can monitor more than one application at a time. Set the startupStreamsMonitorApplicationList to a pipe (|) delimited list of application for which you would like monitoring to occur. For example to monitor the applications live1 and live2 set startupStreamsMonitorApplicationList as follows:
    Code:
    <Property>
    	<Name>startupStreamsMonitorApplicationList</Name>
    	<Value>live1|live2</Value>
    </Property>


    Note: The application instances that are being monitored will be loaded and will not be unloaded. This is so the stream monitor can continue to start and stop streams while the Wowza Media Server is running.

    Charlie
    Last edited by charlie; 11-09-2010 at 01:47 PM.

  2. #2

    Default Bad Line?

    Seems to work as long as I do not change the StorageDir

    KEEP:
    <StorageDir>${com.wowza.wms.context.VHostConfigHom e}/content</StorageDir>

    DO NOT CHANGE TO:
    <StorageDir>${com.wowza.wms.context.VHostConfigHom e}/applications/${com.wowza.wms.context.Application}/content</StorageDir>-->


    Did I do something wrong?

  3. #3

    Default

    If you change the Streams/StorageDir value then you must then create the following folder (see step 3 of the instructions):

    Code:
    [install-dir]/applications/live/content
    You then put .sdp and .stream files in this new folder and not in the [install-dir]/content folder. The reason for this is so that the live application has its own content folder. Without this you could end up with multiple applications loading the same .sdp file which is not allowed.

    Charlie

  4. #4

    Default

    Charlie,

    Amazing feature!!!! thanks for continue working for improve the quality and the features day to day!

    Regards,
    Alejandro

  5. #5

    Default

    Thanks for the kind words.

    Charlie

  6. #6
    Join Date
    Nov 2008
    Posts
    4

    Default Additional Applications

    If I provision a new application in which I want to monitor for startup streams do I have to add this to the startupStreamsMonitorApplicationList hence requiring a server restart?

  7. #7
    Join Date
    Dec 2007
    Posts
    25,640

    Default

    Yes, because you would have to add the new application to the list in the /conf/Server.xml startupStreamsMonitorApplicationList Property. Any change to Server.xml will require restart of Wowza.

    Richard

  8. #8

    Default Exactly what I was looking for!

    Thanks. This is exactly what I need. Keep up the good work!

  9. #9

    Default Version Confusion

    The current release is 2.2.3 and I *think* this patch "WowzaMediaServer2.1.2-patch1.zip" is not necessary. True?

  10. #10
    Join Date
    Dec 2007
    Posts
    25,640

    Default

    If you have Wowza version 2.2.3, you do not need that patch.

    Richard

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •