Skip to content

IP cameras in RTSP mode, ONVIF cameras and other streaming protocols

IP cameras in RTSP mode

The Datastead RTSP filter decodes the RTSP stream, and can also save the received native H264/AAC frames to .MP4, .FLV, .AVI, .MKV or .MOV containers without transcoding. If a new file name is specified during the recording, the filter closes the previous file and opens the new file without losing frames.

To open an RTSP URL as video source:

  1. Set VideoSource = vs_IPCamera.
  2. Set IPCameraURL = the RTSP URL of the IP camera (the URL to use depends on the manufacturer; contact us if the URL to use is unknown).
  3. Invoke SetAuthentication (at_IPCamera, ".username..", "..password...") if needed.
  4. Set the RecordingMethod property.
  5. Invoke StartPreview () or StartRecording ().

E.g.:

VideoGrabber.VideoSource = vs_IPCamera;
VideoGrabber.IPCameraURL = "rtsp://192.168.0.25/axis-media/media.amp?videocodec=h264&audio=1";
VideoGrabber.SetAuthentication (at_IPCamera, "root", "admin");
VideoGrabber.RecordingInNativeFormat = true;
VideoGrabber.RecordingMethod = rm_MP4;
VideoGrabber.AudioRecording = true;
VideoGrabber.StartRecording ();

To close the current file and start recording to a new file while the recording is running, invoke VideoGrabber.RecordToNewFileNow (): the new file is generated on the fly, without losing frames.

Alternatively, enable the RecordingTimer to periodically close the current file and generate a new file. In this case, the file name is generated automatically; however, the files can be renamed on the fly from the OnRecordingCompleted event.