OnvifStandard 1.5.0
dotnet add package OnvifStandard --version 1.5.0
NuGet\Install-Package OnvifStandard -Version 1.5.0
<PackageReference Include="OnvifStandard" Version="1.5.0" />
<PackageVersion Include="OnvifStandard" Version="1.5.0" />
<PackageReference Include="OnvifStandard" />
paket add OnvifStandard --version 1.5.0
#r "nuget: OnvifStandard, 1.5.0"
#:package OnvifStandard@1.5.0
#addin nuget:?package=OnvifStandard&version=1.5.0
#tool nuget:?package=OnvifStandard&version=1.5.0
<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 HTTP — without 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
// 1. Get device information
var deviceClient = new DeviceClient
{
//SoapClient = new SoapClient(new YourHttpClientFactory()), <== Optional: Use a custom HttpClientFactory if needed
ServiceUri = new Uri("http://camera-ip/onvif/device_service"),
User = "username",
Password = "password"
};
var deviceInfo = await deviceClient.GetDeviceInformation();
// 2. Create Media client
var mediaClient = new MediaClient
{
ServiceUri = new Uri("http://camera-ip/onvif/media_service"),
User = "username",
Password = "password"
};
// 3. Get available media profiles
var profilesResponse = await 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 mediaClient.GetStreamUri(streamSetup, profile.Token);
Console.WriteLine($"RTSP URI: {streamUriResponse.MediaUri.Uri}");
// 5. Use PTZ client to pan and zoom the camera
var ptzClient = new PtzClient
{
ServiceUri = new Uri("http://camera-ip/onvif/ptz_service"),
User = "username",
Password = "password"
};
var velocity = new PTZSpeed
{
PanTilt = new Vector2D { X = 0.5f, Y = 0 }, // pan right
Zoom = new Vector1D { X = 0.2f } // zoom in
};
await 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 | Versions 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. |
-
.NETStandard 2.0
- SoapHttpClient (>= 3.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.