Starting a Video Stream Cloud Phone
You can set parameters in the cfct_config file to start video stream cloud phone instances with different resolution and frame rates, and set the initial video encoding parameters in the default.prop file. If WebRTC is used for data transmission, you can modify the default.prop file to change the snapshot resolution; and if you use an APK to access the video stream cloud phone, you can configure the snapshot resolution in the APK settings.
- (Optional) To start video stream cloud phone instances with different frame rates, modify the frame rate property in the cfct_config file. The default frame rate is 30 fps. 60 fps is also supported when the resolution is 720p or 1080p.
BUILD_FPS=30
- To start video stream cloud phone instances with different initial encoding parameters, snapshot resolution, and audio and video output formats over WebRTC, perform the following operations:
- Decompress DemoVideoEngine.tar.gz to obtain the vendor folder and copy the default.prop file in the folder to the current directory.
1 2 3
cd /home/kbox_video/ tar -xvf DemoVideoEngine.tar.gz vendor cp vendor/default.prop .
- Set initial encoding parameters by configuring property fields started with vmi.video.encode in default.prop. For details about the property fields, see "Configurable Non-commercial Module Properties of the Video Stream Engine" > "Video Stream Engine Property Configuration Items" in Video Stream Engine Developer Guide.
- Set the snapshot resolution.Configure property fields started with vmi.video.frame in default.prop. For details about the property fields, see "Configurable Non-commercial Module Properties of the Video Stream Engine" > "Video Stream Engine Property Configuration Items" in Video Stream Engine Developer Guide. After changing the resolution, you are advised to change the screen pixel density in the cfct_config file as well to achieve the optimal display effect. Table 1 lists the recommended configurations.
Table 1 Recommended configurations for different resolutions Screen Width (BUILD_WIDTH)
Screen Density (BUILD_DENSITY)
720
320
1080
480
1440
640
After you change the video output resolution (to a resolution different from the configuration at the last startup), the rendering resolution of the AOSP system and apps is changed. In this case, a compatibility issue or rendering problem may occur in some apps. Generally, this problem can be solved by restarting the app. It is recommended that you return to the home screen and clear background apps before changing the resolution.
- Set the audio and video output formats.
- If you access a video stream cloud phone instance over WebRTC, configure property fields in default.prop within the allowed value range to set video and audio output formats. For details, see "Configurable Non-commercial Module Properties of the Video Stream Engine" > "WebRTC Configuration Items" in Video Stream Engine Developer Guide.
- If you access a video stream cloud phone instance using an APK, configure property fields in default.prop to set video and audio output formats. For details, see "Configurable Non-commercial Module Properties of the Video Stream Engine" > "Video Stream Engine Property Configuration Items" in Video Stream Engine Developer Guide.
- Enable the adaptive resolution function.
If you access the video stream cloud phone instance using an APK, you can enable the adaptive resolution function on the APK settings page. For details, see Using an APK. If adaptive resolution is disabled, configure property fields started with vmi.video.frame in default.prop to change the snapshot resolution. For details about the property fields, see "Configurable Non-commercial Module Properties of the Video Stream Engine" > "Video Stream Engine Property Configuration Items" in Video Stream Engine Developer Guide. After changing the resolution, you are advised to change the screen pixel density in the cfct_config file as well to achieve the optimal display effect. Table 1 lists the recommended configurations.
- If you use the WebRTC method, configure the IP address and start UDP port.
In default.prop, configure property fields vmi.webrtc.connection.serverip (IP address of the cloud phone server) and vmi.webrtc.connection.udpbeginport (available UDP start port). For details, see "Configurable Non-commercial Module Properties of the Video Stream Engine" > "WebRTC Configuration Items" in Video Stream Engine Developer Guide.
- Decompress DemoVideoEngine.tar.gz to obtain the vendor folder and copy the default.prop file in the folder to the current directory.
- Start a video stream cloud phone.
1 2
cd /home/kbox_video/ ./cfct_video start ${index1} ${index2}
In the preceding command, ${index1} and ${index2} indicate instance IDs, and ${index2} can be left blank.
Example: ./cfct_video start 2 (Start instance 2.)
./cfct_video start 2 5 (Start instances 2 to 5)
- Query video stream cloud phones.
- Video stream cloud phone with Docker:
1docker ps -a
Example command output:

- Video stream cloud phone with containerd:
1nerdctl ps -a
Example command output:

Make sure that the started container can be found and is in normal state.
- Video stream cloud phone with Docker:
- Check whether the video stream cloud phone is successfully started. ${index} indicates the ID of the instance to be started. For example, in the last column in the command output of 4, the ${index} of android_35 is 35.
- Video stream cloud phone with Docker:
1docker exec -it android_${index} sh
- Video stream cloud phone with containerd:
1nerdctl exec -it android_${index} sh
1getprop sys.boot_completed
If the value of sys.boot_completed in the output is 1, the startup is successful.
- Video stream cloud phone with Docker: