OnvifStandard 1.8.0

dotnet add package OnvifStandard --version 1.8.0
                    
NuGet\Install-Package OnvifStandard -Version 1.8.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="OnvifStandard" Version="1.8.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="OnvifStandard" Version="1.8.0" />
                    
Directory.Packages.props
<PackageReference Include="OnvifStandard" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add OnvifStandard --version 1.8.0
                    
#r "nuget: OnvifStandard, 1.8.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package OnvifStandard@1.8.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=OnvifStandard&version=1.8.0
                    
Install as a Cake Addin
#tool nuget:?package=OnvifStandard&version=1.8.0
                    
Install as a Cake Tool

License NuGet

<img src="Icon.png" width="300">

🌐 OnvifStandard — Modern ONVIF for .NET (No WCF)

A .NET Standard 2.0 library for interacting with ONVIF‑compliant devices (IP cameras, NVRs, encoders) using SOAP over HTTPwithout WCF bindings.
Built for modern .NET, lightweight, and easy to extend.


✨ Features

  • Pure .NET Standard 2.0 implementation
  • No WCF, no generated bindings
  • Uses the excellent SoapHttpClient
  • Supports:
    • Device Service
    • Media Service
    • Imaging Service
    • PTZ Service
    • Events Service

📘 Short Example — Get RTSP Stream + PTZ Control

using OnvifStandard;
using OnvifStandard.Media;
using OnvifStandard.Ptz;

// 1. Connect to the device. Init synchronizes device time, reads capabilities,
//    and creates clients for the services advertised by the device.
var device = new OnvifDevice(
    new Uri("http://camera-ip/onvif/device_service"),
    "username",
    "password");

await device.Init();

// 2. Use the initialized Device client.
var deviceInfo = await device.DeviceClient.GetDeviceInformation();
Console.WriteLine($"{deviceInfo.Manufacturer} {deviceInfo.Model}");

// 3. Get an available media profile.
if (!device.MediaAvailable)
{
    throw new InvalidOperationException("The device does not advertise the Media service.");
}

var profilesResponse = await device.MediaClient.GetProfiles();
var profile = profilesResponse.Profiles.First();

// 4. Get the RTSP stream URI
var streamSetup = new StreamSetup
{
    Stream = StreamType.RTPUnicast,
    Transport = new Transport { Protocol = TransportProtocol.RTSP }
};
var streamUriResponse = await device.MediaClient.GetStreamUri(streamSetup, profile.Token);
Console.WriteLine($"RTSP URI: {streamUriResponse.MediaUri.Uri}");

// 5. Use the initialized PTZ client when the service is available.
if (device.PtzAvailable)
{
    var velocity = new PTZSpeed
    {
        PanTilt = new Vector2D { X = 0.5f, Y = 0 }, // pan right
        Zoom = new Vector1D { X = 0.2f }            // zoom in
    };

    await device.PtzClient.ContinuousMove(profile.Token, velocity);
}


💡 Why This Library Exists

I couldn’t find a modern, lightweight ONVIF library for .NET that didn’t rely on WCF. Most ONVIF libraries rely on WCF bindings generated via svcutil or dotnet-svcutil.
With modern tooling (including AI-assisted code generation), ONVIF services can be implemented cleanly, manually, and without WCF.
This project aims to be a modern, lightweight alternative for developers who want ONVIF support without legacy baggage.


🛠️ Support & Compatibility

ONVIF devices vary widely — many implement only parts of the spec, and some behave… creatively.

If your device:

  • fails on a specific call
  • returns unexpected SOAP responses
  • needs a custom quirk or extension

👉 Open an issue!
I’ll help add support, and contributions are very welcome.

Most of the code is AI‑generated, and only the features I needed are fully tested.
If something doesn’t work, report it — or send a PR.


⚠️ Known Limitations

  • Not a video streaming library.
    ONVIF provides RTSP URLs; you’ll need another library to decode or display video.
  • Some devices use non‑standard ONVIF implementations, which may require special handling.

🙏 Acknowledgements

  • Inspired by the ONVIF standard and existing ONVIF libraries.
  • SOAP communication powered by SoapHttpClient.
    Go give that project a star — it deserves it.

🤝 Want to Contribute?

This project is intentionally simple and approachable — perfect for contributors.

Ways you can help:

  • Add support for more ONVIF services
  • Improve device compatibility
  • Fix or refine AI‑generated DTOs
  • Add tests
  • Improve documentation
  • Share device logs or quirks

A CONTRIBUTING.md will be added soon, but until then feel free to open issues or PRs.


🚀 Coming Soon (Community Roadmap)

  • More ONVIF services
  • Discovery
Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.8.0 75 7/28/2026
1.7.0 124 7/27/2026
1.6.0 141 7/23/2026
1.5.0 108 7/2/2026
1.4.0 106 6/28/2026
1.3.0 102 6/28/2026
1.2.0 107 6/28/2026
1.1.0 96 6/27/2026
1.0.0 104 6/27/2026