-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: wbc6080 <[email protected]>
- Loading branch information
Showing
1 changed file
with
44 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |