How to integrate live video into your application
Use the Body Worn Live Self-hosted SDK to integrate live video from Axis body worn cameras into your VMS or monitoring application. The SDK connects your application to the AXIS Body Worn Live Self-hosted Server app and provides events and media streams.
Before you start
You need a working AXIS Body Worn Live Self-hosted deployment with at least one camera profile that enables live streaming. The deployment includes a supported server device running the AXIS Body Worn Live Self-hosted Server app, connected to your body worn system (BWS) through AXIS Body Worn Manager.
Configure the network and certificates before developing your client. For the deployment requirements, see the AXIS Body Worn Live Self-hosted user manual.
Choose an SDK binding
The SDK provides bindings for C# and Go:
- C# uses a connector bundled with the NuGet package. The connector runs on 64-bit Windows.
- Go uses the connector in a Docker image.
The connector manages the supported connection to the self-hosted server. Your application uses the language binding instead of implementing the WebRTC signaling protocol.
Connect and receive events
Create a self-hosted live-streaming client with the server address, TLS options, and server credentials. In the C# binding, create an ILiveStreamer instance with SelfHosted.Create(...).
Subscribe to events with GetEventsAsync(...). The SDK reports:
StreamActiveEventwhen a wearer starts a live stream.StreamAvailableEventwhen a stream is available for remote activation.StreamUnavailableEventwhen a stream is no longer available.PositionEventwhen the wearer's GNSS position changes.
Each event identifies the associated body worn camera and wearer when that information is available.
Retrieve live video
When you receive a StreamActiveEvent, attach to the stream with the SDK. Choose one of these media formats:
- Call
GetMkvStreamAsync(...)to receive a Matroska stream with H.264 video and AAC or Opus audio. - Call
GetFramesAsync(...)to receive raw H.264 video and AAC or Opus audio frames.
Render, process, or record the media in your application. The SDK manages the connection to the server and the underlying encrypted WebRTC media path.
Activate a stream remotely
When you receive a StreamAvailableEvent, your application can start the stream with ActivateStreamingAsync(...). Whether this is available depends on the camera profile configuration in AXIS Body Worn Manager.
Embed the built-in web client instead
For a single viewer, you can embed the server's built-in player as a web tile. It manages the connection and rendering, but does not support multiple concurrent viewers for the same camera.
https://<server-ip>/local/BodyWornLiveSelfHosted/index.html#/targets/<camera-mac-address>?compact
Replace <server-ip> with the server device address and <camera-mac-address> with the camera's lowercase, colon-separated MAC address.