Khadas Docs

Amazing Khadas, always amazes you!

User Tools

Site Tools


products:sbc:edge-2l: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:edge-2l:applications:hardware-decoding [2025/11/25 05:18]
gray created
products:sbc:edge-2l:applications:hardware-decoding [2026/05/11 02:46] (current)
nick
Line 1: Line 1:
-====== Edge-2L Hardware Decoding ======+====== Edge-2L hardware decoding ======
  
-===== Introduction ===== +{{page>products:sbc:edge2:applications:hardware-decoding&noheader}}
- +
-This document mainly introduces how to use hardware decoding on Edge-2L. +
- +
-===== 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 mpph264encRockchip 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''+
- +
-4. Decoding from RTSP stream and preview. +
- +
- +
-<tabbox Ubuntu 24.04> +
- +
-You can use gstreamer ''waylandsink'' to preview the video on Ubuntu Wayland desktop: +
- +
-```shell +
-gst-launch-1.0 rtspsrc location=rtsp://USERNAME:PASSWD@192.168.xxx.xxx/snl/live/1/1 ! rtph264depay ! h264parse ! mppvideodec ! video/x-raw,format=NV12 ! waylandsink +
-``` +
- +
-You can use the command below to check display fps: +
- +
-```shell +
-gst-launch-1.0 -v rtspsrc location=rtsp://USERNAME:PASSWD@192.168.xxx.xxx/snl/live/1/1 ! rtph264depay ! h264parse ! mppvideodec ! video/x-raw,format=NV12 ! fpsdisplaysink video-sink=waylandsink sync=false text-overlay=false +
- +
-``` +
- +
-Display with ''ffmpeg'': +
- +
-```shell +
-ffplay -vcodec h264_rkmpp rtsp://USERNAME:PASSWD@192.168.xxx.xxx/snl/live/1/+
-``` +
- +
-<tabbox Ubuntu 22.04> +
- +
-You can use gstreamer ''clutterautovideosink'' to preview the video on Ubuntu Wayland desktop: +
- +
-```shell +
-gst-launch-1.0 rtspsrc location=rtsp://USERNAME:PASSWD@192.168.xxx.xxx/snl/live/1/1 ! rtph264depay ! h264parse ! mppvideodec ! video/x-raw,format=NV12 ! clutterautovideosink +
-``` +
- +
-You can use the command below to check display fps: +
- +
-```shell +
-gst-launch-1.0 -v rtspsrc location=rtsp://USERNAME:PASSWD@192.168.xxx.xxx/snl/live/1/1 ! rtph264depay ! h264parse ! mppvideodec ! video/x-raw,format=NV12 ! fpsdisplaysink video-sink=clutterautovideosink sync=false text-overlay=false +
-``` +
- +
-You press ''Alt + F7'' and then move mouse to move the windown. +
- +
-</tabbox> +
- +
-<WRAP tip > +
-Please replace the RTSP stream with yours. +
-</WRAP>+
  
  
  
Last modified: 2025/11/25 05:18 by gray