Welcome to RDK X5 Board repository
6.VPS scaling example
VPS scaling example
1. Environment preparation
This example implements the video scaling function based on the video processing module VPS, and users can preview the screen through the monitor.
- Environment preparation:
- Connect the development board and the monitor via an HDMI cable
- Power on the development board and log in through the command line
- Prepare images (NV12) and video files (H264) as input
2. How to run
The sample code is provided in source code form. You need to use the make command to compile and run it. The steps are as follows:
sunrise@ubuntu:~$ cd /app/cdev_demo/vpssunrise@ubuntu:/app/cdev_demo/vps$ sudo makesunrise@ubuntu:/app/cdev_demo/vps$ sudo ./vps -m 1 -i stream.h264 -o output.yuv --iheight 1080 --iwidth 1920 --oheight 720 --owidth 1280Parameter configuration:
- -i: file path to be operated
- -iheight: input height
- -iwidth: input width
- -m: input mode, 1: video stream; 2: NV12 image
- -o: output path
- -oheight: output height
- -width: output width
- -skip: (optional) for video stream input, skip the number of frames at the beginning
3. Expected results
After the program runs correctly, the processed image file outpu.yuv will be saved in the current directory. The running log is as follows:
x
sunrise@ubuntu:/app/cdev_demo/vps$ sudo ./vps -m 1 -i stream.h264 -o output.yuv --iheight 1080 --iwidth 1920 --oheight 720 --owidth 1280
... omission ...2000/01/01 18:57:31.330 !INFO [CamInitVseParam][0231]Setting VSE channel-0: input_width:1920, input_height:1080, dst_w:1280, dst_h:720... omission ...