Wowza Community

Record and Segment Live Streams by Default

Running Wowza 4. I created a live streaming application. I checked “Record all incoming streams”, and set the segmentation type in the application properties.

The live streams record fine, but they do not segment. I’ve tried size, duration, and schedule. None of them seem to work.

Is there something else I need to do to make the live streams segment by default? Thanks!

Hi there, checking the “Record all incoming streams” is the same as using a StreamType of “live-record” this StreamType is very limited, it will record all incoming live streams from start to finish.

The “segmentation” options are part of the LiveStreamRecord API, which gives you more control over what streams are recorded, and how.

To use this API:

1: Use a StreamType of “live”, leave “record all streams” unchecked.

2: In the left side bar of the Engine Manger window, (with the live stream being published) choose “Incoming Streams” and select the incoming stream to record

3: Click on the red “record” button(circle) to see the recording options, click on the “Segmentation” tab to choose a “Segmentation Option” and click record.

You can read more about the LiveStreamRecord API here:

Recording Live Streams

Salvadore

I will forward this as a request. At present, the “StreamRecorder Defaults” settings in Application Property tab are used to set the Defaults for the recording options in Application > Incoming Streams. You can only configure an application to record all streams, but you cannot define segmentation and other settings for all streams.

Richard

I added a request to the backlog about this, because it does make sense to check that box then make those settings and get segmented recordings for all stream without a module. I don’t know when or if that will be considered

Richard

I don’t think this has changed. The Record All Incoming Streams option sets the Application.xml StreamType to “live-record”, which records all streams but is a different a mechanism than the HTTPLiveStreamRecord that is used to record per stream and with these segmentation options.

Richard

Yes, you can set the segmentation rules at the application level instead of per stream. To do this, choose the application properties tab and edit the StreamRecorder Defaults.

And you can use this module to Start the recording process automatically:

How to start and stop live stream recordings programmatically (LiveStreamRecordAutoRecord example)

Salvadore

Richmond, have you compiled this code in Eclipse and moved the jar file to the [install-dir]/lib/ folder?

How to start and stop live stream recordings programmatically (IMediaStreamActionNotify3)

Again, a StreamType of “live-record” is not going to allow you any control, so you will need to use a StreamType of “live” along with this module.

Please let us know if you are still having issues after implementing this code.

Regards,

Salvadore

Thanks for the explanation Salvadore.

Is there any way to make this behavior the default? I will have hundreds of streams, so manually doing each one is not a viable option, and going the URL route looks like it would take a lot of development. Thanks!

Is there any way to do this without writing code? It seems like a very simple/common use case to automatically record/segment live streams

Thank you! I was able accomplish what I wanted by making a simple module that automatically starts recording. Essentially, it does the same thing as checking the box for “record all incoming streams”. The rest of the recording/segmentation can be configured via properties. One would think you could simply check that box and then configure the properties, but using a module and leaving the box unchecked is the only way to make it work.

I used the example given here - https://www.wowza.com/docs/how-to-start-and-stop-live-stream-recordings-programmatically-livestreamrecordautorecord-example - and all of my streams get recorded with the stream name of whichever stream gets through first. So if the first stream has a stream key of “example”, any other stream will get recorded as example_date_time.mp4

How can I make the recorder automatically start and make each stream unique?

Okay I have this solved finally. Don’t use the articles mentioned above. They will only work if you have a single stream. Using the code found here - https://www.wowza.com/docs/how-to-start-and-stop-live-stream-recordings-programmatically-imediastreamactionnotify3 - you can create a module that works.

I think this should be noted in the article so that people don’t waste weeks trying to get it to work like I did

rrlanham, is there any updates with this? I build a lot of Wowza applications and this problem comes up with every single one, so it would be really sweet to be able to just use configuration over writing a module that serves the same purpose. Thanks!

Stratus,

I’m trying to record multiple incoming streams too, but AutoRecord is giving them all the same name. You apparently figured out how to do a workaround, where you said that using IMediaStreamActionNotify3 was the way to do it. Would you mind posting the sourcecode you used for the java file? I just can’t figure it out.