Khadas Docs

Amazing Khadas, always amazes you!

User Tools

Site Tools


products:sbc:edge2: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:edge2:applications:hardware-decoding [2022/09/07 02:15]
nick created
products:sbc:edge2:applications:hardware-decoding [2024/01/17 03:54] (current)
jacobe [Decoding]
Line 1: Line 1:
 ====== Edge2 Hardware Decoding ====== ====== Edge2 Hardware Decoding ======
  
 +===== Introduction =====
 +
 +This document mainly introduces how to use hardware decoding on Edge2.
 +
 +===== Decoding =====
 +
 +<WRAP important >
 +If encounter error, please add sudo and try again.
 +</WRAP>
 +
 +1. Check decoder.
 +
 +```shell
 +khadas@Khadas:~$ gst-inspect-1.0 | grep mpp
 +rockchipmpp:  mpph264enc: Rockchip Mpp H264 Encoder
 +rockchipmpp:  mpph265enc: Rockchip Mpp H265 Encoder
 +rockchipmpp:  mppjpegdec: Rockchip's MPP JPEG image decoder
 +rockchipmpp:  mppjpegenc: Rockchip Mpp JPEG Encoder
 +rockchipmpp:  mppvideodec: Rockchip's MPP video decoder
 +rockchipmpp:  mppvp8enc: Rockchip Mpp VP8 Encoder
 +typefindfunctions: audio/x-musepack: mpc, mpp, mp+
 +
 +```
 +
 +2. Decoding with H264 file.
 +
 +```shell
 +khadas@Khadas:~$ gst-launch-1.0 filesrc location=./test.h264 ! h264parse ! mppvideodec ! video/x-raw,format=NV12 ! filesink location=test.yuv
 +Setting pipeline to PAUSED ...
 +Pipeline is PREROLLING ...
 +Pipeline is PREROLLED ...
 +Setting pipeline to PLAYING ...
 +Redistribute latency...
 +New clock: GstSystemClock
 +0:00:01.2 / 1:04:25.7 (0.0 %)
 +0:00:02.2 / 1:33:57.6 (0.0 %)
 +```
 +
 +3. Decoding with MP4 file.
 +
 +```shell
 +khadas@Khadas:~$ gst-launch-1.0 filesrc location=./test.mp4 ! qtdemux name=d d.video_0 ! h264parse ! mppvideodec ! video/x-raw,format=NV12 ! filesink location=test.yuv
 +Setting pipeline to PAUSED ...
 +Pipeline is PREROLLING ...
 +Pipeline is PREROLLED ...
 +Setting pipeline to PLAYING ...
 +Redistribute latency...
 +New clock: GstSystemClock
 +0:00:01.8 / 0:10:34.5 (0.3 %)
 +```
 +
 +If you want to play your decoded fileļ¼Œ you can play with ''ffpaly''.
Last modified: 2022/09/07 02:15 by nick