Khadas Docs

Amazing Khadas, always amazes you!

User Tools

Site Tools


Sidebar

products:sbc:vim1s:applications:hardware-decoding

VIM1S Hardware Decoding

Introduction

This page introduces how to use hardware decoding.

Only supoport Amlgoic 5.4/5.15 Kernel.

H264 Hardware Decoding

Here is an example to decode H264 file to NV12.

Decoding & encoding:

gst-launch-1.0 filesrc location=/home/khadas/bbb_sunflower_1080p_60fps_normal.mp4 num-buffers=100 ! qtdemux name=d d.video_0 ! h264parse ! v4l2h264dec ! video/x-raw,format=NV12 ! filesink location=/home/khadas/decode264.yuv

H265 Hardware Decoding

Here is an example to decode H265 file to NV12.

Decoding & encoding:

gst-launch-1.0 filesrc location=/home/khadas/4K_6.1_2012.mkv num-buffers=100 ! matroskademux name=demux demux. ! h265parse ! v4l2h265dec ! video/x-raw,format=NV12 ! filesink location=/home/khadas/decode265.yuv

MJPEG Hardware Decoding

An example to decode video from USB camera:

gst-launch-1.0 v4l2src device=/dev/video0 io-mode=mmap num-buffers=300 ! image/jpeg,width=1280,height=720,framerate=30/1 ! jpegdec ! video/x-raw,format=I420 ! filesink location=video_0.yuv
Last modified: 2024/09/13 02:30 by nick