Khadas Docs

Amazing Khadas, always amazes you!

User Tools

Site Tools


products:sbc:vim1s:applications:hardware-decoding

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
products:sbc:vim1s:applications:hardware-decoding [2022/07/17 21:31]
127.0.0.1 external edit
products:sbc:vim1s:applications:hardware-decoding [2024/09/13 02:30] (current)
nick
Line 1: Line 1:
-====== VIM4 Hardware Decoding ======+~~tag>VIM1S decoding~~ 
 +====== VIM1S Hardware Decoding ====== 
 + 
 +===== Introduction ===== 
 + 
 +This page introduces how to use hardware decoding. 
 + 
 + 
 +<WRAP important > 
 +Only supoport Amlgoic 5.4/5.15 Kernel. 
 +</WRAP> 
 + 
 + 
 +===== H264 Hardware Decoding  ===== 
 + 
 +Here is an example to decode H264 file to NV12. 
 + 
 + 
 +Decoding & encoding: 
 + 
 +```shell 
 +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: 
 + 
 + 
 +```shell 
 +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: 
 + 
 +```shell 
 +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: 2022/07/17 21:31 by 127.0.0.1