Rate This Document
Findability
Accuracy
Completeness
Readability

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.

  1. Place the DemoVideoEngine.tar.gz software package in a specified directory. Assume that this package is placed in /home/k8s.
    1
    2
    3
    mkdir -p /home/k8s/tmp 
    cd /home/k8s/tmp 
    tar -xvf  ../DemoVideoEngine.tar.gz
    
  2. 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 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.

    1. Open the default.prop file.
      1
      vi vendor/default.prop
      
    2. Press i to enter the insert mode and change vmi.video.encodertype to 2 and vmi.video.encode.rcmode to 2.
    3. Press Esc, type :wq!, and press Enter to save the file and exit.
    4. Re-create a DemoVideoEngine.tar.gz software package.
      1
      tar -zcvf DemoVideoEngine.tar.gz  *
      
  3. Use DemoVideoEngine.tar.gz created in 2 to re-create a video stream image based on Creating an Image. Assume that the name of the created image is video:version.
  4. Run docker to export the video stream image.
    1
    docker save video:version -o video.tar
    
  5. Copy the video stream image to all worker nodes and import the image.
    1
    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.