-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Raspberry 4 poor performance when play FullHd video with Wpe + Hight CPU % #127
Comments
Can you try playing the video directly with gstreamer?
If the performance is as bad as with WPE, then its an issue with gstreamer (perhaps the hardware decoder plugin (OMX) is not working as expected). If the performance with gst-play-1.0 is good, then it can be an issue with WPE, let us know. |
i try gstreamer but i got the same performance the video (1080 dpi ) play but slowly. and the cpu is height ~50 %. https://drive.google.com/file/d/1Lp7IPQeqJ3M37WvEi2B9CAivoNUsM9_F/view?usp=sharing |
Ok, then its an issue with the gstreamer drivers. I don't know if the gstreamer component that accelerates hardware decoding on the RPi (in theory is gstreamer-v4l2) already supports wayland and the open source stack and its working as expected. Maybe you are also missing some kernel driver. The last time I checked this (like 2 years ago) this stuff didn't worked at all with the open source stack. You had to use the vc4/dispmanx userland driver stack to get HW acceleration video decoding and use the gstreamer plugin for OMX. If you can't get this working properly with the current stack, then I suggest you to try a new build using the vc4/dispmanx userland driver stack (it would be option 1 at https://github.com/Igalia/meta-webkit/wiki/RPi). Another thing to take into account is 64 bit support. I don't think vc4/dispmanx userland driver stack supports 64-bit. You will have to select |
I'm digging into this issue, and I'm trying to understand if I will hit the same issue - AFAIK,
the content plays with low CPU usage (although playback isn't as smooth as |
So v4l2h264dec is the gstreamer component that is hardware accelerated on the RPi (with the open source stack, right?). In theory WPE should also use the v4l2 gstreamer component for hardware-accelerated playback without issue (AFAIK) ... One question ... is the @philn any idea of what could be wrong here? Can it be related with this |
this property means the decoder outputs DMABufs. I don't know how well this is supposed to work currently on that platform. I've created this wiki page, I would specially need logs and .dot dumps of the WebKit pipeline... https://github.com/Igalia/meta-webkit/wiki/Providing-useful-GStreamer-Zero-copy-issue-reports |
This is on Raspbian's Debian Buster HardwareRaspberry Pi 4 GPU Driver
Mesa Version: 1.4 ( gstreamer
Command
I'm also seeing issues where a video will play fine in gst-play but refuse to start in
|
There's a typo in the wiki page, add this env var and the log should no longer be empty: |
There's only one .dot file? Please attach all here (no copy/pasta). |
I'll update again, but there was only one dep file. I'll also try again with another video. |
Ok; I'm at a bit of a loss for words. So when I don't include the Here are the logs and the dot file: Seeing it work, I think the issue may be unrelated to HW acceleration and just
Edit: Edit 2: Quickly browsing the logs, webkit does seem to be using gstv4l2videodec; I'm now having a seperate issue where the video doesn't reliably play. |
Instead of |
The color conversion in WebKit's pipeline might be a bottleneck though... Recently we've been working on adding YUV support in our video sink, which might help. But it won't be shipped until the 2.28 release. |
The In any case I'm not sure if anything can be done about the video playback, AFAIK the cpu usage is mostly from |
I think this is a gstreamer issue on Pi 4. I tried a 60fps video like OP, and gstreamer crawls, while the video plays fine in OMX. https://github.com/bower-media-samples/big-buck-bunny-1080p-30s/blob/master/video.mp4
v4l2h264dec is a hardware decoder (it uses less cpu libav's |
I'm a bit confused when you say that the video play fine in OMX. Do you mean when running the omxplayer from the same image/sdcard where you are running WPE (built with yocto) ... or are you using another image/sdcard for testing with omxplayer? |
Running omxplayer from Raspbian plays fine. Using gstreamer (which webkit uses internally) to play the same video is slow. I believe the issue lies in the v4l drivers on p4 but I'm not sure. In general it looks like v4l has poorer performance than openmax/mmal. |
Ok. Then you are comparing apples to oranges. For the RaspberryPi there are two stacks available:
The proprietary one is the one used by raspbian. And it seems you have chosen here to build an image with Yocto/meta-webkit using the open source one (since you mentioned that you run Weston and v4l2h264dec plugin). I don't know in the RPi4, but at least on the RPi3 the last time I tried it performed much better the propietary one. So I suggest you to try to build an image with Yocto and meta-webkit but using the propietary stack. How can you build that image? It is documented here. It would be |
|
BTW, recently an issue with video playback on the RPi3 using the open source stack (Mesa VC4/wayland) was troubleshooted in #140 |
Forget it, sorry for the noise. I think the issue its not related. #140 is about video not playing, which is different than this one (playing; but not accelerated) |
firstly i want to explain that i'm a beginer in yocto and in compiling linux system. so after few month i try to re-Build an image with Mesa VC4 driver, weston and wpebackend-fdo for Raspberry pi 4 with Zeus Branch now the cpu is arround 11% but i have a issue with HD and Full-HD video i have a red layer on video with Gstreamer or With Webkit ( COG ). also a video with FullHd (1080 p) play a bit slowly. ##local.conf |
Add |
I'm not sure how that would help, it doesn't provide any hardware decoder. |
yes, i added gstreamer1.0-libav, but nothing is change.
|
close issue because new version work perfectly for video playing but open a new issue #185 for the red label issue on video. |
Hi,
When i build Wpe ( following the wiki ) with FDO platform and i launch WPE (cog -P fdo "url of the Video") the video play slowly and hight CPU %.
any one have an idea, i'm noive with yocto.
------ BEGIN local.conf--------
MACHINE ?= "raspberrypi4-64"
GPU_MEM = "256"
EXTRA_IMAGE_FEATURES = "debug-tweaks"
IMAGE_FEATURES_append = " ssh-server-dropbear hwcodecs"
PREFERRED_PROVIDER_virtual/wpebackend = "wpebackend-fdo"
IMAGE_INSTALL_append = " wpewebkit cog"
IMAGE_INSTALL_append = " gstreamer1.0-omx gstreamer1.0-plugins-base gstreamer1.0-plugins-bad gstreamer1.0-plugins-base-meta gstreamer1.0-plugins-bad-meta gstreamer1.0-plugins-good-meta "
IMAGE_INSTALL_append = " gstreamer1.0-libav"
LICENSE_FLAGS_WHITELIST_append = " commercial"
------ END local.conf--------
+Cap 1: Yocto Build Config
https://drive.google.com/file/d/1Ot8WgMxKMznFCFI7NY-0B7VjNmdxTmpU/view?usp=sharing
+Cap2: launch Cog
https://drive.google.com/file/d/1N5Vh2JpX3CJ55W4mz43LdqS3vHNIH5pj/view?usp=sharing
+Cap3: Top
https://drive.google.com/file/d/1CQPeW1vQYbjOYoVOmXTDnaZlM4ymB5vX/view?usp=sharing
+Cap4: Screen Capture
https://drive.google.com/file/d/1u5RT6-AtPisRYy9YE91B9qpbYg3t041N/view?usp=sharing
The text was updated successfully, but these errors were encountered: