Wowza Community

How to do live streamng and recording simultaneously.

Hello,

My requirement is to do the video recording while doing the live streaming. But I didn’t find any player in the example that is given by wowza media server to do so. Is there any player or a way to do the live streaming along with the recording at once. At present I am doing the live streaming and recording separately. Please visit to this URL to see how I am trying to do.

http://la.oneg.tv/client/iframe.html

Regards

ifyndev

The live-record stream type will do live streaming with video recording.

Charlie

This is done by changing the streamType in Application.xml

Use “live-record” or “live-record-lowlatency”

Open this file:

wowza_install/conf/[yourapp]/Application.xml

Edit StreamType:

<Streams>
	<StreamType>live-record-lowlatency</StreamType>
	<StorageDir></StorageDir>
</Streams>

on the client:

netstream.publish("userstream", "record");

Take a look at this package. It will let you record a live stream on demand (without using stream types).

LiveStreamRecord.zip

So you would set the stream type to live, always publish the stream to the server, the module above would control recording and playback wouuld be controlled by turning on and off NetStream.play. Make sense?

Charlie

I set the live-record stream type on the server, and the Server records the video and audio stream in a .flv file when publishes the stream.

I use the method in my conference application, the Wowza server records every client’s stream to be some specified name flv , and I also get every client’s time of publishing their stream, but later I code a conference review program to review their recorded flv files,in the program I play their recorded flv files on time according to their publishing time , but the result seems not simultaneous.

I check the recorded flv file, it seems the Wowza server recording the stream only begins from the time of real stream raised , not begins from the stream.publish command runned.

So I need the advice for how could I make the recorded flv files playback simultaneously.

There are at least a couple of threads on this forum about synchronizing playback of videos that were recorded at the same time. – It’s kind of a quest.

I tried a couple of things myself. You can play the exact same video in several players in the same application if you have them all start at the same time. I opened up 5 or 6 streamplayers in the same app then broadcast an event to make them start in synch, and it worked perfectly…

But, having said that, they were not really sychronized. And to emulate that success with different streams would be very difficult. I think all the streams will probably have to be encoded identically, but the hard part would be synchronizing the start. Maybe inserting a time marker, then truncating streams to that point somehow. I can think of some possible solutions that involve netstream.send to insert a marker, and a complicated bank-shot to get all clients to mark the stream at the same time. It’s not out of the box.

In a conference or chat app, where different clients are publishing and subsribing to various streams, any one user might see several streams at once, and it looks like one event, and the idea of playing that back seems logical, but it’s not really supported by the technology.

The livestreamrecord package might be another place to look for doing this. Maybe a controller could start start recording all the streams at the same time.

Charlie,

How can we do this with out declarative way of doing things?

For example: If we have 2 buttons, BROADCAST, RECORD

When BROADCAST button is clicked it will just do BROADCAST

When RECORD button is clicked it will just do RECORD but not broadcast

When Both are clicked then both BROADCAST AND RECORD should happen at the same time.

We are looking for a solution where we want to handle it with in the code and use only one application, instead of 3 applications.

Say if we pass parameter during the connection say connecttype=BROADCAST or RECORD or BOTH, then automatically it should open that streamtype with in that application.

How can this approach be implemented, what are the classes we need to extend?

If you have example code it will helpus probably others as well.

Thanks,

Take a look at this package. It will let you record a live stream on demand (without using stream types).

LiveStreamRecord.zip

So you would set the stream type to live, always publish the stream to the server, the module above would control recording and playback wouuld be controlled by turning on and off NetStream.play. Make sense?

Charlie

Thanks Charlie for your prompt response…we are testing at our end and will get back to you if we need any …

Thanks for the reply. I am done with that. Thank you very much again. Can you please help me again in solving another problem. Here is the link of my New Thread.

http://www.wowza.com/forums/showthread.php?p=4767#post4767