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

I have a web application in which i want the users to see the pre-recorded video in synchronisation as it is a live stream.

So please tell me that how can i convert the pre-recorded videos into the live feed and send it as a live feed by using a code not by the s/w Wirecast.

Take a look at this scheduler example:

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

Richard

You don’t really need to do anything with the code because the scheduler is include in the Wowza Modules Collection, which is noted in the article. Download the collection, unzip, copy the .jar file from the package /lib folder to Wowza /lib folder, then configure /conf/Server.xml as shown, make sure there is an application with StreamType “live”, then re-start Wowza.

Richard

This is a way to create a live stream using a file as a source. The live stream will start exactly when it is set to start in the .smil file. If the date/time to start is in the past, then the live stream will start when the schedule is parsed which happens when the server re-starts. Make sure you have formatted the date correctly.

Richard

Putting the scheduler aside, does that video play as vod stream in Wowza example Flash player?

Richard

Restart Wowza and test playback of the scheduled stream in Wowza example player, then zip up and send /conf and /logs folder and the streamschedule.smil file

Richard

It doesn’t start because you have the start value is set to “-2” in the schedule. Change that to “0” or a positive number that is less than the duration of the video. Use “-2” if the stream is a live stream.

Richard

No, that won’t work. The schedule is read once when the server starts. For dynamic changes in a running Stream class stream, take a look at this example:

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

Richard

Amit,

Wowza has to be running, then enter the URL to a Wowza application (default is rtmp://localhost/live) then click the connnect button. Then the other buttons are enabled.

This application is a bare-bones example, a starting place. It is not a finished application. You can control running streams, but it is not going to tell you anything about what streams are running or whether the change you made was successful, or validating your input.

Richard

Amit,

Unzip StreamClassController.zip, then open LiveStudio.html from that package, then connect to a running application. All you need is the collection jar. I just tested it.

What ex

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:

Schedule streaming

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…