Deploying the Video Stream Image
Create a video stream image on a worker node, import the image to all worker nodes, and deploy the image.
- Place the DemoVideoEngine.tar.gz software package in a specified directory. Assume that this package is placed in /home/k8s.
mkdir -p /home/k8s/tmp cd /home/k8s/tmp tar -xvf ../DemoVideoEngine.tar.gz
- Change the encoder type and re-create a DemoVideoEngine.tar.gz software package.
In the default.prop file, the default encoder type is 1. However, the encoder type required by DaoCloud is 2. Therefore, you need to repack the package after modifying the value. In addition, you can modify the resolution, bit rate, and frame rate in the default.prop file. After the modification, you need to rebuild an image. Ensure that the image can run a cloud phone properly with Docker.
- Open the default.prop file.
vi vendor/default.prop
- Press i to enter the insert mode and change the value of vmi.video.encodertype to 2.
- Press Esc, type :wq!, and press Enter to save the file and exit.
- Re-create a DemoVideoEngine.tar.gz software package.
tar -zcvf DemoVideoEngine.tar.gz *
- Open the default.prop file.
- Use DemoVideoEngine.tar.gz created in 2 to re-create a video stream image based on Creating Images. Assume that the name of the created image is video:version.
- Run docker to export the video stream image.
docker save video:version -o video.tar
- Copy the video stream image to all worker nodes and import the image.
ctr -n k8s.io images import video.tar
You can run the crictl images command to view the image name and tag. For example: docker.io/library/video:version.
Parent topic: Deploying Images