Skip to content

Commit

Permalink
add README file
Browse files Browse the repository at this point in the history
Signed-off-by: wbc6080 <[email protected]>
  • Loading branch information
wbc6080 committed Apr 12, 2024
1 parent ce545e3 commit 145d90c
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions mappers/kubeedge-v1.16.0/onvif-mapper/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
This mapper is for the ONVIF IP camera. For resource-limited, it's only be tested with the HIKVISION camera.

Supported functions:
- Save frame. You can define it in device-instance.yaml and save the rtsp stream as video frame files.
- Save video. You can define it in device-instance.yaml and save the rtsp stream as video files.

steps:

- Install the dependences:
```
sudo apt-get update &&
sudo apt-get install -y upx-ucl gcc-aarch64-linux-gnu libc6-dev-arm64-cross gcc-arm-linux-gnueabi libc6-dev-armel-cross libva-dev libva-drm2 libx11-dev libvdpau-dev libxext-dev libsdl1.2-dev libxcb1-dev libxau-dev libxdmcp-dev yasm
```
and install ffmpeg with commond:
```
sudo curl -sLO https://ffmpeg.org/releases/ffmpeg-4.1.6.tar.bz2 &&
tar -jx --strip-components=1 -f ffmpeg-4.1.6.tar.bz2 &&
./configure && make &&
sudo make install
```
This may take about 5 minutes to download and build all dependencies
- Compile mapper project:
There are currently two ways to compile and run the mapper project, namely building the mapper image or locally compile.

1. Build onvif mapper image
```
docker build -t [YOUR MAPPER IMAGE NAME] .
```
After successfully building the onvif mapper image, you can deploy the mapper in the cluster through deployment or other methods.
A sample configuration file for mapper deployment is provided in the **resource** directory.
2. locally compile

If you want to debug locally first, you can also compile and run the mapper code directly:
```
go run -tags stream cmd/main.go --v <log level,like 3> --config-file <path to config yaml>
```
- Build and submit the device yaml file:

Build the device-instance and device-model configuration files according to the characteristics of the user
edge onvif device, and execute the following commands to submit to the kubeedge cluster:
```
kubectl apply -f <path to device model or device instance yaml>
```
An example device-model and device-instance configuration file for onvif device is provided in the resource directory.

0 comments on commit 145d90c

Please sign in to comment.