Integration using .NET 6

Dear Community,

we are using .NET 6 WebAPI (NET Core, not .NET Framework) as the backend and Vue.js (JavaScript) as the frontend. The implementation should be able to handle multiple connections to multiple VMS installations simultaneously. Authentication should be handled via the backend.

We require basic live and playback functionality, with the ability to request sequences at a specific timestamp. The frontend should only need to consume the provided video stream (h264 if possible) in an HTML video tag. What would you consider the best way to achieve this? Until now, our product has also been compatible with Linux, and we would like to maintain this capability.

What we have tried so far:

TCPVideoViewer

Written in .NET Framework, so we would need to put this in a separate Windows service on the server where XProtect is installed and use it as a proxy to stream video to the backend.

Other options:

JavaScript

The VideoStream sample requires an Expert or Corporate installation, and the video sample offers very basic playback and requires client-side authentication.

ONVIF Bridge

This has not been tested yet, but according to the log it is not available on free or professional products.

Attached log:

29-10-2023 20-32-00.436: Error - GlobalInit: error, System.Exception: Open Network Bridge not allowed with free surveillance or Professional products

bei VideoOS.OnvifGateway.OnvifMipLibrary.OnvifMipLibraryClass.GlobalInit(String aServerAddr, String aAdminUsername, String aAdminPassword, Boolean masterOnly, String& aErrorLog)

29-10-2023 20-32-00.436: Info - Initializing VMS components failed

Have we missed something?

Best Regards

Hi Dietmar,

The question is too generic in order to provide a specific answer.

Recently similar topic were discussed in this thread.

So you could look there to see all the possible integration methods.

It is important to know the version of the VMS, as well as possibilities for upgrade. This could change a little bit integration options.

Some thoughts based on your comments:

  • I believe MIP SDK supports .NET (6), although is a more limited than Framework. Namely not everything available in .NET Framework is available in .NET 6. Fetching media however should be supported. Edit: MIP SDK doesn’t support officially .NET 6
  • MIP SDK Mobile (JS or .NET standard) provides possibility for integration toward the MoS. Transcoded streams (to series of JPEGs) is available on all the products (Video sample). Fragmented MP4 (direct streaming) is available only on higher licenses (as you mentioned about VideoStream sample).
  • Open Network Bridge (former ONVIF Bridge) is not available for Professional products (again license wise).

If you aim for doing no authN/authZ front-end, you should definitely create you own back-end. There is not support for such a scenario across Milestone services (except DLNA server, which is out of support). And this is manly for security reasons. I personally wouldn’t recommend hardcoding authN only in the back-end, but I don’t know your workflow and scenario.

For direct in JS video integration you could focus on:

  • JPEG streaming (Mobile server or your own via MIP SDK (.NET Framework))
  • Direct Streaming (fMP4 streaming - Mobile server, your own proxy, or your own via MIP SDK (.NET Framework) and multiplex)
  • WebRTC (API or MIP SDK integration in latest 2-3 releases)

As for the codec (preferred H.264 as you mentioned) if the camera doesn’t provide you with a such, you don’t have much of an options, except the transcoding (to JPEG for ex).

KR

Petar

It seems my initial comment had some wrong statements, so I edited it. Namely because MIP SDK doesn’t have official .NET 6 support.

Hi Petar,

thank you for your answer.

The integration should work from Essential+ to Professional+.

So we will either have to deal with JPEG Streaming or building our own .NET Framework Proxy on Top of TCPVideoViewer Sample.

BR

Dietmar