Wowza Community

LiveStreamRecord VS MediaCasterStreamManger VS 'rtp-live-record' stream type

In researching for the most suitable recording method for my needs (scheduled recording of multiple rtp-live stream from Axis H.264 cameras), I found three recording methods and some of their pros & cons:

  1. MediaCasterStreamManager
  • works without user interruption (not like ‘rtp-live-record’)

  • start & stop recording can be controlled from flash client via API call

  • pulls stream from video source (aside from the live publishing stream)

  1. Stream Type ‘rtp-live-record’
  • easiest to setup (just change stream type in Appliation.xml)

  • recording starts on the first stream pull and stops on the last stream pull

  • doesn’t need to pull additional stream for recording (saves bandwidth on camera)

  1. LiveStreamRecording
  • haven’t been able to get it to work (got it to work finally)

  • pros & cons are same as MediaCasterStreamManager with the following additions

  • the recording file is written in append mode rather than over-write mode

With MediaCasterStreamManager and ‘rtp-live-record’, the recording file name is the stream name and cannot be changed. The file will get overwritten unless prior recording file names are renamed manually.

What are other pros & cons? How can I get the LiveStreamRecording to work in my case? (resolved)

Thanks,

Bruce

This analysis seems correct. Where are you stuck with LiveStreamRecord?

Charlie

The Flash application that comes with the LiveStreamRecord package is a little strange. Since you are connecting to a rtsp camera just ignore the fact that is it trying to connect to your local camera. Yes, you do need to use the rtp-live stream type. Here is what I would do:

  • Install the livestreamrecord application and edit [install-dir]/conf/livestreamrecord/Application.xml and change the Streams/StreamType to rtp-live
  • Open the player that comes with the LiveStreamRecord package, click Connect (just ignore the fact that it is connecting to your local web camera) and enter the RTSP url to camera in both the Publish and Play text entry fields.
  • Click the Play button and wait for the camera to start playback.
  • Now you should be able to record the stream by clicking the Start Recording button. Let it record for a while and click the Stop Recording button. The file will be recorded in the [install-dir]/content folder.

It goes through a different path. When using this API you need to use the full stream name. The alias will not work.

Charlie

I need to start and stop recording a live stream whether or not someone is actually viewing it, at certain times, which are specified by a timestamp in a field in a mysql database.

how can i accomplish this?

i am using php and mysql.

You have two choices:

  • When you play or start the stream prepend mp4: to the stream name

  • If you take a look at the API you will see that you can force the container that is to be used. If you look at the livestreamrecord.fla ActionScript you can see where the line that specifies the container in commeted out (line 209). Change this line to:

    recordOptions.format = "mp4"; 
    
    

    Charlie

What is the source of the stream (RTMP encoder, RTSP/RTP ANNOUNCE encoder, native RTP encoder (with .sdp file), MPEG-TS)? If it is a MediaCaster type of stream then you will need to lock the stream using the MediaCaster stream manager so that it is always running. Then you can use the LiveStreamRecord package to record it:

https://www.wowza.com/docs/how-to-record-live-streams-httplivestreamrecord

Charlie

Is there a way to force recording to a mp4 container using the livestreamrecord application?

These instruction work recording an Axis ip cam, but the result is H264/AAC in a flv container:

rtsp___IP-ADDR_axis-media_media.amp.flv

Cheers!

Changed my stream alias entry to:

ipcam.sdp=mp4:rtsp://ip-addr/axis-media/media.amp

Resulting in a mp4 container when recording.

Yes, use “rtp-live” StreamType. Follow these instructions

For Axis rtsp streams, the MediaCasterStreamManager works very well.

Richard

You have to add the Module for StreamNameAlias to /conf/livestreamrecord/Application.xml /Modules

I think it is necessary to have it be the last Module to work correctly in this case.

ModuleStreamNameAlias

ModuleStreamNameAlias

com.wowza.wms.plugin.streamnamealias.ModuleStreamNameAlias

Richard

Hi Charlie,

I followed the installation instruction and ran the client\livestreamrecord.html. How do I tell it to pull the H.264 from my Axis camera? Do I need to change the stream type from ‘live’ to ‘rtp-live’ in the Application.xml?

-Bruce

Hi Richard,

In the client, do I need to change the “rtmp://localhost/livestreamrecord” to something else? When I clicked on ‘Connect’, Adobe Flash prompted me about using local camera & mic.

Thanks for your previous input, I’ve gotten the MediaCasterStreamManager working. It does work quite well. I just want to test the Live Stream Record method as it may become useful in my future application.

-Bruce

Thanks, Charlie. I got it to work with your instructions.

FYI, stream name alias does not work in the text field to the left of the ‘Publish’ button. I had to enter the full RTSP url. The ‘Play’ text field had no issue with alias.

-Bruce

I do have it the StreamNameAlias module and the properties set in the Application.xml.

It has no problem translating the alias value in the text box next to the Play button. The problem is with the text field next to the Publish button.

Thanks for the clarification.

h.264 axis ip camera over rtsp.