- Notifications
You must be signed in to change notification settings - Fork40
A rockchip-mpp V4L2 wrapper plugin for chromium V4L2 VDA/VEA
License
JeffyCN/libv4l-rkmpp
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
A V4L2 plugin that wrapsrockchip-mpp for the chromium's V4L2 video decoder/VEA (requires custom patches to enable those features).
The original idea comes fromv4l-gst.
- v4l-utils - with this patch:
0001-libv4l2-Support-mmap-to-libv4l-plugin.patch - rockchip-mpp
$ meson build $ meson compile -C buildInstall libv4l-rkmpp.so into /usr/lib/libv4l/plugins/
Create dummy V4L2 device files for chromium V4L2 video decoder/VEA in boot service:
# echo dec > /dev/video-dec0 # chmod 666 /dev/video-dec0 # echo enc > /dev/video-enc0 # chmod 666 /dev/video-enc0Configure codec capabilities
The codec capabilities (depends on chip spec) are configurable in device files:
# cat /dev/video-dec0 log-fps=1 log-level=2 type=dec codecs=VP8:VP9:H.264:H.265:AV1 max-height=1920 max-width=1080- Run with chromium browser:
export XDG_RUNTIME_DIR=/run/user/0 chromium --no-sandbox --gpu-sandbox-start-early --ignore-gpu-blacklistThis plugin is tested withcustom chromium on rk3588 EVB.
- There're a lot of chromium related hacks in it, might not work for other apps.
MPP reports errors?
Try the newestMPP release branch or develop branch or the commit with the closest commit date.
Also test with thempi_dec_test to check if the MPP works:
# mpi_dec_test -t 7 -i test-25fps.h264How to get more verbose logs?
For chromium, use these command line flags to change the log level:--enable-logging --vmodule=/media/gpu=4
For libv4l-rkmpp, set the "LIBV4L_RKMPP_LOG_LEVEL" environment variable to change the log level. And set "LIBV4L_RKMPP_LOG_FPS" to enable logging fps.
For MPP, set the environment variable "mpp_debug", "rkv_h264d_debug", "mpp_dec_debug", "mpi_debug", etc. to change the modules' log levels.
For vpu driver, write verbose log level to "/sys/module/rk_vcodec/parameters/debug".
What about the performance?
The performance should be much the same as other MPP based decoders/encoders (e.g. mpi_dec_test and gstreamer MPP plugin).
And the performance would mostly related to the video's attributes (e.g. resolution and bitrate) and the vpu clock rates.
- Jeffy Chen
<jeffy.chen@rock-chips.com>
About
A rockchip-mpp V4L2 wrapper plugin for chromium V4L2 VDA/VEA
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Contributors2
Uh oh!
There was an error while loading.Please reload this page.