Stream live camera from plugin

I’m writing a MIPS plugin in C#. It does several things, but one of my tasks is to get a live camera stream and stream it to our own application’s server. We need the stream in RTSP format. I need some advice as to how to tackle it.

I have looked at the Protocol sample TcpVideoViewer, and I see how it gets a stream. But it appears to me that you can only get MJPEG or the camera’s raw stream that way. (Could the raw stream be transcoded on the fly, before sending it on?)

I have looked at the component sample MediaLiveServiceJPEG_cpp. It too gets a live stream, and I see how the stream is configured with xml ( …). I can see that it’s encoded as jpeg, but I haven’t found any documentation for the config XML to see if it allows encoding as RTSP. (I don’t mind adding a C++ DLL to the mix.)

And just now, I noticed a post asking about getting RTSP streams using the ONVIF bridge, implying that it is possible there too.

So what’s the recommended way to attack this?

I would recommend that build service that retrieves the streams from the Recording Servers using RawLiveSource.

This would not be a MIP plug-in in the it would not run within a Milestone Management Client, Smart Client or Event Server.

The sample MediaLiveViewer uses JPEGLiveSource which has some similarities with RawLiveStream.

If working with raw video data you need to see “The GenericByteData format” in the MIP Documentation, it explains how a header is added to the data, if the header is stripped away you have the raw data exactly as it came from the camera.

Milestone ONVIF Bridge is capable of giving a RTSP stream of cameras that are streaming H264 to the recording server. Maybe you can use this instead of developing you own RTSP server.

The Milestone clients does not use RTSP streaming but get the data in other fashions. The samples naturally reflects this.