QuickNV.HikvisionNetSDK.Api
2026.2.309
dotnet add package QuickNV.HikvisionNetSDK.Api --version 2026.2.309
NuGet\Install-Package QuickNV.HikvisionNetSDK.Api -Version 2026.2.309
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="QuickNV.HikvisionNetSDK.Api" Version="2026.2.309" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="QuickNV.HikvisionNetSDK.Api" Version="2026.2.309" />
<PackageReference Include="QuickNV.HikvisionNetSDK.Api" />
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 QuickNV.HikvisionNetSDK.Api --version 2026.2.309
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: QuickNV.HikvisionNetSDK.Api, 2026.2.309"
#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 QuickNV.HikvisionNetSDK.Api@2026.2.309
#: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=QuickNV.HikvisionNetSDK.Api&version=2026.2.309
#tool nuget:?package=QuickNV.HikvisionNetSDK.Api&version=2026.2.309
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
QuickNV.HikvisionNetSDK.Api
Avaliable as nuget
Api for Hikvision NetSDK.
示例
using QuickNV.HikvisionNetSDK.Api;
using Newtonsoft.Json;
using System.Text;
var host = "127.0.0.1";
var port = 8000;
var user = "admin";
var password = "123456";
var encoding = CodePagesEncodingProvider.Instance.GetEncoding("gb2312");
try
{
HvSession.Init();
Console.WriteLine("初始化成功!");
//登录
Console.WriteLine("正在登录...");
var session = HvSession.Login(host, port, user, password, encoding);
Console.WriteLine("登录成功!");
Console.WriteLine("设备时间: " + session.ConfigService.GetTime());
Console.WriteLine("设备配置: " + JsonConvert.SerializeObject(session.ConfigService.GetDeviceConfig(), Formatting.Indented));
Console.WriteLine("网络配置: " + JsonConvert.SerializeObject(session.ConfigService.GetNetworkConfig(), Formatting.Indented));
Console.WriteLine("硬盘配置: " + JsonConvert.SerializeObject(session.ConfigService.GetHdConfig(), Formatting.Indented));
Console.WriteLine("正在读取通道名称...");
session.ChannelService.RefreshChannelsName();
Console.WriteLine("模拟通道:" + string.Join(",", session.ChannelService.AnalogChannels.Select(t => $"通道{t.Id}_{t.Name}")));
Console.WriteLine("IP通道:" + string.Join(",", session.ChannelService.IpChannels.Select(t => $"通道{t.Id}_{t.Name}")));
//如果存在IP通道
if (session.ChannelService.IpChannels.Count > 0)
{
Console.WriteLine("开始下载...");
var channel = session.ChannelService.IpChannels.First();
var stopTime = DateTime.Now;
var startTime = stopTime.AddMinutes(-1);
var localFileName = $"{channel.Name}_{startTime.ToString("yyyyMMddHHmmss")}_{stopTime.ToString("yyyyMMddHHmmss")}.mp4";
var fileHandle = session.VideoFileService.StartDownloadFile(channel.Id, startTime, stopTime, localFileName);
while (true)
{
Thread.Sleep(1000);
var progress = session.VideoFileService.GetDownloadPosition(fileHandle);
if (progress < 0 || progress > 100)
throw new Exception("Download error.Progress: " + progress);
Console.CursorLeft = 0;
Console.Write($"进度:{progress}%");
if (progress == 100)
break;
}
Console.WriteLine();
session.VideoFileService.StopDownloadFile(fileHandle);
Console.WriteLine("下载完成。文件:" + localFileName);
}
//退出登录
session.Logout();
Console.WriteLine("退出登录完成");
//清理
HvSession.Cleanup();
Console.WriteLine("清理完成");
}
catch (Exception ex)
{
Console.WriteLine(ex.ToString());
}
| 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
.NETStandard 2.0
- QuickNV.HikvisionNetSDK (>= 2025.4.1212)
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 |
|---|---|---|
| 2026.2.309 | 129 | 3/9/2026 |
| 2026.1.302 | 115 | 3/2/2026 |
| 2025.4.1212 | 196 | 12/12/2025 |
| 2025.3.1212 | 168 | 12/12/2025 |
| 2025.1.1211 | 467 | 12/11/2025 |
| 1.0.8 | 403 | 1/22/2025 |
| 1.0.7 | 217 | 1/21/2025 |
| 1.0.6 | 243 | 1/20/2025 |
| 1.0.5 | 225 | 1/19/2025 |
| 1.0.4 | 1,000 | 9/28/2023 |
| 1.0.3 | 802 | 9/28/2023 |
| 1.0.2 | 811 | 9/21/2023 |
| 1.0.1 | 872 | 9/13/2023 |
| 1.0.0 | 827 | 8/30/2023 |