This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
products:sbc:edge-2l:applications:hardware-decoding [2026/02/26 01:09] gray Modify non-standard placese |
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& |
| - | + | ||
| - | This document explains how to utilize hardware-accelerated video decoding on the Edge-2L using the Rockchip MPP (Media Process Platform) framework. | + | |
| - | + | ||
| - | ===== Decoding ===== | + | |
| - | + | ||
| - | <WRAP important | + | |
| - | If you encounter a permission error, try prefixing the commands with '' | + | |
| - | </ | + | |
| - | + | ||
| - | 1. Verify available MPP decoders. | + | |
| - | + | ||
| - | First, check that the GStreamer MPP plugins are installed and recognized: | + | |
| - | + | ||
| - | ```shell | + | |
| - | khadas@Khadas:~$ gst-inspect-1.0 | grep mpp | + | |
| - | rockchipmpp: | + | |
| - | rockchipmpp: | + | |
| - | rockchipmpp: | + | |
| - | rockchipmpp: | + | |
| - | rockchipmpp: | + | |
| - | rockchipmpp: | + | |
| - | typefindfunctions: | + | |
| - | ``` | + | |
| - | + | ||
| - | 2. Decode a raw H264 file. | + | |
| - | + | ||
| - | Decode a raw H264 elementary stream file (test.h264) to a raw YUV file (test.yuv): | + | |
| - | + | ||
| - | ```shell | + | |
| - | khadas@Khadas: | + | |
| - | 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. | + | |
| - | + | ||
| - | Extract and decode the H264 video stream from an MP4 file: | + | |
| - | ```shell | + | |
| - | khadas@Khadas: | + | |
| - | 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 %) | + | |
| - | ``` | + | |
| - | + | ||
| - | You can play the resulting raw YUV file (test.yuv) using ffplay with the correct resolution and pixel format parameters. | + | |
| - | + | ||
| - | 4. Decode and preview an RTSP stream. | + | |
| - | + | ||
| - | * Preview on Wayland desktop: | + | |
| - | + | ||
| - | Use '' | + | |
| - | + | ||
| - | ```shell | + | |
| - | gst-launch-1.0 rtspsrc location=rtsp:// | + | |
| - | ``` | + | |
| - | + | ||
| - | * Monitor | + | |
| - | + | ||
| - | Add fpsdisplaysink to overlay the current frames-per-second on the video: | + | |
| - | + | ||
| - | ```shell | + | |
| - | gst-launch-1.0 -v rtspsrc location=rtsp:// | + | |
| - | ``` | + | |
| - | + | ||
| - | * Preview using FFmpeg: | + | |
| - | + | ||
| - | Alternatively, | + | |
| - | + | ||
| - | ```shell | + | |
| - | ffplay -vcodec h264_rkmpp rtsp:// | + | |
| - | ``` | + | |
| - | + | ||
| - | <WRAP tip > | + | |
| - | Remember to replace '' | + | |
| - | </ | + | |