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/04 04:25] gray update by using AI |
products:sbc:edge-2l:applications:hardware-decoding [2026/05/11 02:46] (current) nick |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== Edge-2L | + | ====== Edge-2L |
| - | ===== 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 H.264 File ** | + | |
| - | + | ||
| - | Decode a raw H.264 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 H.264 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 Decoding Performance: | + | |
| - | + | ||
| - | 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 | + | |
| - | ``` | + | |
| - | + | ||
| - | <WRAP tip > | + | |
| - | Remember to replace '' | + | |
| - | </ | + | |