diff --git a/mappers/kubeedge-v1.16.0/onvif-mapper/README.md b/mappers/kubeedge-v1.16.0/onvif-mapper/README.md new file mode 100644 index 00000000..77a7c6cc --- /dev/null +++ b/mappers/kubeedge-v1.16.0/onvif-mapper/README.md @@ -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 --config-file + ``` +- 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 + ``` + An example device-model and device-instance configuration file for onvif device is provided in the resource directory.