Cannot Access VPU

Which system do you use? Android, Ubuntu, OOWOW or others?

Linux shade 5.4.180 #1.4.2 SMP PREEMPT Wed Jan 4 17:20:58 CST 2023 aarch64 aarch64 aarch64 GNU/Linux

Which version of system do you use? Khadas official images, self built images, or others?

Khadas Ubuntu 5.4.180

Please describe your issue below:

I’m running Khadas Ubuntu 5.4.180 as a headless server and would like to access the VPU to encode files or use Hardware Encoding / Transcoding, but without GPU (framebuffer drivers) installed I cannot access the VPU. Aside from installing a DE, what is the best way to access and use the VPU?

Post a console log of your issue below:

$ aml_enc_test /media/ssd/Media/Testing/test.264 /media/ssd/Media/Testing/test.mp4 1920 1080 30 30 6000000 100 1 0 2 5
src_url is : /media/ssd/Media/Testing/test.264 ;
out_url is : /media/ssd/Media/Testing/test.mp4 ;
width is : 1920 ;
height is : 1080 ;
gop is : 30 ;
frmrate is : 30 ;
bitrate is : 6000000 ;
frm_num is : 100 ;
fmt is : 1 ;
buf_type is : 0 ;
num_planes is : 2 ;
codec is : 5 ;
codec is H265
Set log level to 4
[initEncParams:190] enc_feature_opts is 0x0 , GopPresetis 0x0

[vdi_sys_sync_inst_param:675] [VDI] fail to deliver sync instance param inst_idx=0

[AML_MultiEncInitialize:1389] VPU instance param sync with open param failed

[SetSequenceInfo:990] Required buffer fb_num=3, src_num=1, actual src=3 1920x1080

Encode End!width:1920

The following documentation describes how to use hardware encoding on VIM4.
https://docs.khadas.com/products/sbc/vim4/applications/hardware-encoding