Wowza Community

Streaming Live from the pre-recorded videos using Wowza media server

Amit,

This tool affects running streams. It does not make changes to the schedule smil file. There are 3 pages of questions and answers concerning this tool, please read those before proceeding. Try experimenting, see what it can do. Again, it is not a finished application.

Richard

Amit,

This tool works with Stream class streams, for example streams created by the scheduler, and it can create whole new Stream class streams then make changes to them. It does not work on other streams like live stream from a live encoder, unless it is wrapped in a stream class stream.

Here is the post with history of questions and answers:

https://www.wowza.com/docs/how-to-control-stream-class-streams-dynamically-modulestreamcontrol

Rihcard

Amit,

It’s a simple example, streams are started and ended on a schedule. If the date is in the past the stream starts when the server starts and the schedule starts. The values of start and length are documented in the article

https://www.wowza.com/docs/how-to-schedule-streaming-with-wowza-streaming-engine-streampublisher

Please read the post and other questions and answers.

Richard

If the video plays from the start at 9am but was scheduled to play at 5am then it is not setup correctly at all. That is video on demand behavior, this is live streaming. What is the Application.xml /StreamType? For playback are you using the file name or the stream name set in the schedule, e.g. “Stream1” or “Stream2”

Re-start Wowza, test playback in a Flash RTMP client like Wowza example player, then zip up /conf and /logs and send them to support@wowza.com. Include a link to this thread for reference.

Richard

But why are you not able to read the article? It would be a lot easier than asking so many questions.

Richard

The first playlist item that is played on Stream1 is set to play at 14:00 (2pm) today, but you started the server at 22:43, which is 10:43pm, so that starts right away because the scheduled start time is in the past. That item plays for 5 seconds, which is the length setting, and repeat is set to “false”, so you will have to be very quick to catch that. The next one starts at 15:00 (3pm) which is also in the past. That should start as soon as the first item is done (in 5 seconds) because it is also in the past.

12/5/2012 22:43:04 IST comment server INFO 200 - scheduled playlist: Stream1 on stream: Stream1 for:Wed Dec 05 14:00:00 IST 2012

It seems that Maula.mp4 is not in the content folder:

Stream.switch[live/_definst_/Stream2]: index: 0 name:mp4:Maula.mp4 start:0 length:-1
ServerListenerStreamPublisher Scheduled stream is now live: Stream2
ServerListenerStreamPublisher Get Item error: null
ServerListenerStreamPublisher Get Item error: null
ServerListenerStreamPublisher Get Item error: null

I would start very simply. Get it to work with sample.mp4 or another file you know is there. Set the schedule in the past and repeat=true with a single stream (Stream1) so you don’t have to race to play it back. Then try setting in the future, but not too far in the future. The scheduling is extremely precise, it will start the very second you set it to start per your server’s system clock.

The length attribute is seconds. “-1” means play the file to the end

Try this schedule:

<smil>
    <head>
    </head>
    <body>
        <stream name="Stream1"></stream>
		   
			  <playlist name="p1" playOnStream="Stream1" repeat="true" scheduled="2012-12-05 14:00:00">
        <video src="mp4:sample.mp4" start="0" length="-1"/> 
			</playlist>
					
    </body>
</smil>

Now playback in Flash example:

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

Stream: Stream1

Also, it is extremely helpful to run Wowza in stand-alone (/bin/startup.bat) mode so that you can see log output in the console.

Richard

There is no practical restriction on the number of playlists.

Again, if you schedule a stream in the past it will start when Wowza starts. It’s the way this example works, so it is predictable. It is documented at the top of the article:

If you set a schedule in the past the Playlist will play immediately.

You would have to modify and re-build the example to do it differently.

Richard

Only one playlist scheduled in the past on a Stream is going to play. There is no attempt to sequence multiple playlists that have a past schedule, one will win. You can make one playlist that is scheduled in past containing all the items you want to play.

For one playlist to play on a Stream, then another one to play on the same Stream, etc, you have to schedule in the future.

Richard

Take a look at this scheduler example:

https://www.wowza.com/docs/how-to-schedule-streaming-with-wowza-streaming-engine-streampublisher

Richard

can you please tell me that how can i use the code given there…and i don’t see any client folder in the [install-dir] after LiveVideoStreaming to play…

Basically i have two main issues :

1.In the link provided by Wowza support:

https://www.wowza.com/docs/how-to-schedule-streaming-with-wowza-streaming-engine-streampublisher

how to use the code and where to put the coed given at the beginning ??.

  1. At last To play open [install-dir]/examples/LiveVideoStreaming/client/live.html , I don’t see any client folder in my [install-dir] so that I can get to client.html.

Can you please help…

I have done all the changes that you asked me to do and the video is playing fine, but when i added the video file in the [install-dir]content folder and changed the video file name in the [install-dir]/content/streamschedule.smil,then its taking too long to play and infact it didn’t play at all.So please tell me the significance of scheduling the video files if they don’t play in time.

Richard, i don’t think that there is issue with the date/time format because earlier when i was doing this with the default video i.e sample.mp4 provided in the wowza i don’t see any issues but as i added a new video file of the same format(mp4) in the same folder where earlier sample.mp4 was present i am not able to stream live. So please suggest that why it is not working with the newly added video files.

Amit

Yes, the video is working fine as a vod stream in Wowza example Flash player.

Hi

I have restarted the wowza and again tested the playback of the scheduled stream in Wowza example player,but still the stream didn’t play .So i am sending you the /conf,/logs and schedule.smil file.

You can download the above files from here:

http://www.mediafire.com/?16z1cc1lhkd71td

Amit

One more thing i want to ask that if i make the changes in the smil file while the video is playing live, then how and when the changes are going to be reflected.

Amit

ok, now its playing fine, but can you please tell me that if i make the changes in the smil file while the video is playing live, then how and when the changes are going to be reflected.

Amit

I have replaced the jar file from the wowza module collection and added the code in Application.xml but not bale to get the buttons and textinput below the the video display.

Amit

From the below link given by Richard:

https://www.wowza.com/docs/how-to-control-stream-class-streams-dynamically-modulestreamcontrol

I have replaced the jar file from the wowza module collection and added the code in Application.xml but can anyone of you tell me that what i need to do with the StreamClassControl.zip folder as i am not able to get the buttons below the video display in the modified version of Wowza Live Player.

Please Suggest.

Amit

Richard

I have earlier mentioned also that after the changes and entering the URL , the video is playing fine but the buttons you are talking about in the link that has been given are not showing on the screen.

And Please tell me if i am mistaken coz i have just replaced the jar file and made changes in the application.xml but did nothing with the StreamClassControl.zip.

so do i need to do something more.if you need then i can send you the /conf and /logs folder also along with the schedule.smil file.

Amit

Richard

I am able to connect to a running stream, but not able to play a new item on the playlist not in the same stream which was running successfully to which i connected to and not with the new stream as well.

So you please tell me that when i add the stream and playlist then where do they get added as i am not seeing any changes in the schedule.smil file.

Amit