# java-version-of-hikvision **Repository Path**: bashiwangzi/java-version-of-hikvision ## Basic Information - **Project Name**: java-version-of-hikvision - **Description**: 该项目是使用java开发的海康设备的SDK功能,主要用于解决实现C语言写的海康sdk在java中无法调用的问题,可以参考官网https://open.hikvision.com/download/5cda567cf47ae80dd41a54b3?type=10&id=5cda5902f47ae80dd41a54b7 - **Primary Language**: Java - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 2 - **Forks**: 0 - **Created**: 2025-08-07 - **Last Updated**: 2026-11-04 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # HaiKangUtil This is a Java utility library for interacting with Hikvision devices. It provides functions such as device login, real-time stream retrieval, video playback, and recording download. ## Features - **Device Login**: Supports login for devices of versions V40 and V30. - **Real-time Stream Retrieval**: Can retrieve real-time video streams from specified channels. - **Video Playback**: Supports video playback by time range or filename. - **Recording Download**: Allows downloading of recording files by time range or filename. - **File Information Management**: Provides a class to manage file information on Hikvision devices. ## Dependencies The project depends on several native libraries (e.g., HCNetSDK.dll, PlayCtrl.dll), which should be placed in the `lib` directory of the project. Additionally, the JNA library is required to support native calls. ## Usage Examples ### Login to Device ```java int userID = HKClient.loginDevice("192.168.1.64", (short) 8000, "admin", "password"); if (userID != -1) { System.out.println("Device login successful!"); } ``` ### Retrieve Real-time Stream ```java VideoDemo.getRealStreamData(userID, 1); ``` ### Video Playback ```java VideoDemo.playBackByfile(userID, 1); ``` ### Download Recording ```java HKDownloadVideo downloader = new HKDownloadVideo(); downloader.downloadRecordByFile(userID, 1, new Date(), new Date()); ``` ## License This project uses the MIT License. For details, please refer to the LICENSE file in the project. ## Contributors Code contributions and issue reports are welcome. Please follow the standard contribution process. ## Contact If you have any questions or suggestions, please contact the project maintainer.