MPP¶
MPP (Media Process Platform) is the hardware encoding and decoding framework for Rockchip platforms, providing 4K ultra‑HD hardware encoding and decoding capabilities. It is suitable for Debian / Ubuntu systems.
Specifications Overview¶
Hardware Decoding¶
| Codec Format | Specification | Max Resolution / Frame Rate |
|---|---|---|
| H.265 HEVC | Main10 L5.1 yuv444 | 4K@120fps |
| H.264 AVC | High10 L5.1 yuv422 | 4K@60fps |
| H.264 MVC | — | 1080P@60fps |
| VP9 | Profile 0/2 L5.1 | 4K@120fps |
| AVS2 | Profile 0/2 L10.2.6 | 4K@120fps |
| AV1 | Main10 L5.3 | 4K@120fps |
Hardware Encoding¶
| Codec Format | Max Resolution / Frame Rate |
|---|---|
| H.264 AVC | 4K@60fps |
| H.265 HEVC | 4K@60fps |
Debugging¶
Enable debugging:
After enabling, when hardware codec is called, dmesg will output the time taken for each frame:
[ 893.134037] rk_vcodec: 27b00100.rkvdec:0 session 3705:19 time: 1333 us hw 1312 us
[ 893.167444] rk_vcodec: 27b00100.rkvdec:0 session 3705:19 time: 1381 us hw 1313 us
[ 893.200503] rk_vcodec: 27b00100.rkvdec:0 session 3705:19 time: 1420 us hw 1313 us
Note
time: total software + hardware time; hw: pure hardware time
Disable debugging:
Hardware Encoding Test¶
Use the mpi_enc_test tool to test hardware encoding. Check results with tail -f /var/log/syslog.
H.264 Encoding — 4K 100 frames:
Example output:
kickpi mpp[3557]: mpi_enc_test: chn 0 encode 100 frames time 3763 ms delay 27 ms fps 26.57 bps 10605252
H.265 Encoding — 4K 100 frames:
Example output:
kickpi mpp[3560]: mpi_enc_test: chn 0 encode 100 frames time 4086 ms delay 36 ms fps 24.47 bps 19594276
Hardware Decoding Test¶
Use the mpi_dec_test tool to test hardware decoding. Check results with tail -f /var/log/syslog.
H.264 Decoding — 4K 100 frames:
Example output:
H.265 Decoding — 4K 100 frames:
Example output:
Browser Video Test (Chromium)¶
Connect a display to the board and run the following command to launch the Chromium video test:
If Chromium does not use hardware decoding, run the fix script:
Note
After configuration, Chromium will use hardware decoding by default.
GStreamer Video Test¶
The presence of mpp in the logs indicates that hardware decoding has been successfully invoked.
sudo GST_DEBUG=2 gst-launch-1.0 playbin uri=file:///usr/local/test.mp4 video-sink="autovideosink" audio-sink=fakesink
To enable hardware decoding in GStreamer, run the fix script (network connection required):
Compatibility Note: On Ubuntu systems, hardware decoding configurations for Rockchip Chromium and GStreamer are mutually exclusive. Chromium hardware decoding is prioritised by default. To switch to GStreamer, run the fix script above.