Page 1 of 4 123 ... LastLast
Results 1 to 10 of 34

Thread: Live and mp4 streaming schedule

  1. #1

    Default Live and mp4 streaming schedule

    Hi,

    I have a requirement to have around 50 applications broadcasting live for most of the day, but then at midnight for a few hours for it to play some form of recording (either mp4 or even to display a simple jpg) and then at a later time to return to the live stream. My preferred option would be a tiny jpg file as it will just sit on the users screen instead of a 6 hour video of a black screen with text saying 'back later...'

    I am currently using the type of 'live' for the main part but am not sure how I would switch each application to be type 'none' (I think) in order to play an mp4 or flv file.

    My idea was to have a seperate .stream file somehow to have a url to the mp4 but I cant seem to get that working im thinking because of the 'live' stream type. I am happy and have already got working a method using the command line java code to stop and start streams which will enable me to do that if it is needed and cant be done within the server. But to be honest I dont want to have 50 (possibly more in the future) application configurations that I then have to go round to change the type.

    What other options do I have to this ?

    On a side note the web application uses http streaming to the wowza server using manifest.f4m files if that has any relevance or could help?

  2. #2
    Join Date
    Dec 2007
    Posts
    21,962

    Default

    Kris,

    Take a look at this scheduler example:

    http://www.wowza.com/forums/content....-class-streams

    Richard

  3. #3

    Default

    Thanks I had seen that but was wondering if there was a simpler way or not. If not then I will dig deeper into it ! Thanks for now !

  4. #4

    Default

    The instructions for the scheduler are fairly straightforward apart from the terminology...

    My current setup I have 50 applications with 50 xxxx.stream files which run on 1 vhost broadcasting to a html page with osmf player streaming over http (not rtmp or rtsp even though they can)

    The smil file will have 1 stream in it with a single file set on repeat to somehow last 6 hours (not quite sure how to do that yet)

    The Server.xml file has a listener added which waits for a trigger of some sort to do something (hopefully play my smil file) and it has PublishToApplication set to be live (I know its default but want it in there just so I know where it should be if I want to change it in the future)

    First question : What connects my smil file to anything (an application, a content/xxxx.stream file, or the server) to make it happen as nowhere have I even told it the name of the smil file?

    Second : As I said above in the Server.xml file I have added the property to publish to application live. As I have 50 applications I guess I need to set 50 of these properties to apply to each application?

    Third : Once I have worked out what start and length are in the smil file to make it play at midnight on one day I would then want the same to happen every day. Therefore am I right in saying I would need to add 365 playlist chunks in the xml for each day of the year? or is there a way to just say 'daily' at a specific time (I want to be like BBC 3 where virtually the same schedule happens every day of the week hahaha)

    Maybe my understanding of the logic is wrong if someone can advise?

    Thanks !

  5. #5

    Default

    I have just cleared my logs and started Wowza with the config below :

    The wms-plugin-collection.jar file is in the wowza lib directory

    Server.xml :

    <ServerListeners>
    <!--
    <ServerListener>
    <BaseClass>com.wowza.wms.plugin.loadbalancer.ServerListenerLoadBalancerListener</BaseClass>
    </ServerListener>
    -->
    <!--
    <ServerListener>
    <BaseClass>com.wowza.wms.plugin.loadbalancer.ServerListenerLoadBalancerSender</BaseClass>
    </ServerListener>
    -->
    <ServerListener>
    <BaseClass>com.wowza.wms.plugin.collection.serverlistener.ServerListenerStreamPublisher</BaseClass>
    </ServerListener>

    </ServerListeners>

    and...

    <Properties>
    <Property>
    <Name>PublishToApplication</Name>
    <Value>live</Value>
    </Property>
    <Property>
    <Name>PassthruMetaData</Name>
    <Value>false</Value>
    <Type>Boolean</Type>
    </Property>
    </Properties>


    conf/live/Application.xml :

    <Streams>
    <StreamType>live</StreamType>
    <StorageDir>${com.wowza.wms.context.VHostConfigHome}/content</StorageDir>
    <KeyDir>${com.wowza.wms.context.VHostConfigHome}/keys</KeyDir>
    <!-- LiveStreamPacketizers (separate with commas): cupertinostreamingpacketizer, smoothstreamingpacketizer, sanj
    osestreamingpacketizer, cupertinostreamingrepeater, smoothstreamingrepeater, sanjosestreamingrepeater -->
    <LiveStreamPacketizers>cupertinostreamingpacketizer,smoothstreamingpacketizer,sanjosestreamingpacket izer</LiveSt
    reamPacketizers>
    <!-- Properties defined here will override any properties defined in conf/Streams.xml for any streams types load
    ed by this application -->
    <Properties>
    </Properties>
    </Streams>

    content/closed.smil :

    more closed.smil
    <smil>
    <head>
    </head>
    <body>

    <stream name="Stream1"></stream>

    <playlist name="pl1" playOnStream="Stream1" repeat="true" scheduled="2012-07-12 17:00:00">
    <video src="mp4:sample.mp4"/>
    </playlist>

    </body>
    </smil>

    I adjusted the schedule time so it was in the future at the time.

    So my regular webcam stream is on application live and through VLC I would normally watch it using this url :

    rtsp://<wowza address>:1935/live/camera-live.stream

    or to see the http stream i would use http://www.osmf.org/configurator/fmp/ and put in url :

    http://<wowza address>:1935/live/camera-live.stream/manifest.f4m

    and select Are you using HTTP Streaming or Flash Access 2.0? yes

    What url would I then use to watch my stream 'with closed.smil' through http?

    Server.xml .... There is just 1 of these files for the Wowza server as I understand and not per application therefore how do I decide which applications will use my smil file schedule and which dont?

    Anyway the server starts and i search the error and access logs for my smil file but it is not there suggesting it doesnt know to read it (because nowhere apart from creating the smil file itself) is it referenced.

    Do I need to use streammanager / StartupStreams.xml to connect the smil file to the application? or continue as I am to use StartupStreams.xml to connect the camera-live.stream to the application live ?

    Last thing (for now) thats bugging me is for the last point about linking the smil file to the application... if the smil file is started in streammanager or StartupStreams.xml then presumably that means my normal camera-live.stream also needs to be in there somewhere to make it play most of the time?
    Last edited by krisisdnbdjmx; 07-12-2012 at 08:00 AM. Reason: add note at top stating that the wms-plugin-collection.jar file is in the lib directory

  6. #6

    Default

    Just found following post :


    rrlanham - 03-01-2011, 10:30 PM

    This type playlist is involved with scheduler example, which is a server listener. It has to be named streamschedule.smil and be located in the content folder

    So i have renamed my smil file but see this in my logs :

    [root@srv001 logs]# grep streamschedule wowzamediaserver_access.log
    2012-07-12 18:22:51 GET comment server INFO 200 - ServerListenerStreamPublisher: Could not find playlist file: /usr/local/WowzaMediaServer/content/streamschedule.smil - - - 6.62 - - - - - -- - - - - - - - - - - - - - - - - - -
    [root@srv001 logs]# ls -l /usr/local/WowzaMediaServer/content/streamschedule.smil
    -rw-r--r-- 1 root root 274 Jul 12 15:56 /usr/local/WowzaMediaServer/content/streamschedule.smil

    Im still looking around to see if there are any other posts that can help me understand the process but any advice appreciated !!

  7. #7

    Default

    rrlanham - 09-29-2011, 12:50 AM

    What are you trying to do?

    This one schedule.smil file could be used to define and schedule many sets of streams to be used in any number of multi-bitrate smil files. The scheduler is limited to one application, but as many streams as you want to schedule.

    Richard


    Dont think this is going to be what I need as I have 50 applications (possibly more in the future) where I would want all of them to start playing the mp4 file at midnight. Is there any other way or am in interpreting the above message wrong?

  8. #8
    Join Date
    Dec 2007
    Posts
    21,962

    Default

    What is in /content/closed.smil?

    The Scheduler's schedule.smil is run when Wowza starts. Use the schedule.smil file that is in the example, modify that to your needs.

    The stream that you playback, referring to the schedule.smil that is included in the package, is "Stream1" (and "Stream2")

    <smil>
        <head>
        </head>
        <body>
    
            <stream name="Stream1"></stream>
            <stream name="Stream2"></stream>
    ...
    You can playback in Wowza example LiveVideoStreaming player:

    Server: rtmp://[wowza-address]:1935/live
    Stream:Stream1

    If any of the Playlist items contain MediaCaster streams, as yours will, you have to start those streams using the .stream file names in /conf/StartUpStreams.xml for this to work. Those sources should be available when Wowza starts, though Wowza will keep trying to connect if any are not indefinitely. You do not have to do anything with schedule.smil itself in StartUpStreams.xml, it is just parsed by Wowza on server start to start the streams you define.

    For testing, adjust the schedule so the first Playlist you play is scheduled in the past so it starts right away. You can schedule the ad for the near future for testing.

    Richard

  9. #9

    Default

    closed.smil contains this (now renamed to streamschedule.smil) as per your other post so it gets picked up :

    <smil>
    <head>
    </head>
    <body>

    <stream name="Stream1"></stream>

    <playlist name="pl1" playOnStream="Stream1" repeat="true" scheduled="2012-07-12 17:00:00">
    <video src="mp4:sample.mp4"/>
    </playlist>

    </body>
    </smil>


    Also I have had a thought after a previous post said 'only 1 application can have a schedule'.... currently I have 50 applications and 50 .stream files all set to auto start using StartupStreams.xml, but I have now tried manually and i can have 1 application with all 50 .stream files attached to it which I didnt know before which (apart from a lot of code changes my end to change how I have it all set up from an administration point of view) means this should be possible in the 1 'live' application. That sound about right?

    I dont understand your point 'The stream that you playback, referring to the schedule.smil that is included in the package, is "Stream1" (and "Stream2")' - Package? I am ok with the basics of the smil file I think apart from the link between what '<stream name="Stream1"></stream>' is and how it links to anything else (for example my xxxxx.stream files?).

    Are you saying that the stream names in the smil file refer to the content files xxxx.stream ? In which case I think thats the link I didnt understand.

    So in summary i think my questions now are )

    1) For 50 live streams all doing the same thing should I have 1 application and 50 .stream files (1 for each different source camera) instead of 50 apps and 50 .stream files?
    2) wheres the link between the stream name in the smil file and where I want them to go (maybe the stream files in content)?
    3) where can I find a definition for the parameters in the smil file for start and length and any others that are available?

    And lastly (i think) is would I still use the following url to connect over http to each camera (if i changed to use the single app with multiple inputs) :

    http://<wowza address>:1935/live/camera.stream/manifest.f4m
    http://<wowza address>:1935/live/camera2.stream/manifest.f4m
    http://<wowza address>:1935/live/camera3.stream/manifest.f4m
    etc

  10. #10

    Default

    Hi krisisdnbdjmx,

    On point for you: The .smil file is opened by the client in the context of a single application. So, stream names, or .stream files mentioned in the .smil will be in relation to that Wowza application. Therefore, if you have 50 .stream files referenced in one smil, all the .stream files would need to be started in stream manager under that one application.

Page 1 of 4 123 ... LastLast

Similar Threads

  1. Doing Live Streaming using Schedule file, but rtmp won't play at all
    By stormsec in forum Wowza Media Server 3 for Amazon EC2 Discussion
    Replies: 1
    Last Post: 01-20-2014, 05:08 AM

Posting Permissions

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