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:
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)
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.
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.
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:
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:
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?
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.
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.