Skip to content
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

Hardware Video Decoding #64

Open
petm5 opened this issue Sep 7, 2021 · 9 comments
Open

Hardware Video Decoding #64

petm5 opened this issue Sep 7, 2021 · 9 comments

Comments

@petm5
Copy link

petm5 commented Sep 7, 2021

Is it currently possible to get hardware video decoding working on the Asus C201 (Veyron Speedy)?

My kernel is compiled with the Hantro driver and video encode/decode nodes show up as /dev/video2 and /dev/video3.

I can't find any documentation on getting it working and FFMPEG compiled with v4l2 request support shows some error about a codec being unsupported.

@Wooty-B
Copy link

Wooty-B commented Apr 25, 2022

Is this still an issue? I have noticed choppy video VIA YouTube and local video files with bitrates over 3Mbps. Forcing sites to use H264 doesn't have any noticeable improvement either. I am getting a "glmark2" score of around 440pts and able to run OpenMW 0.48 with an average framerate of 10-15fps outdoors. Running Mesa 22.0

@petm5
Copy link
Author

petm5 commented Apr 25, 2022

Yes, it's currently still an issue.

I read that gstreamer can support the V4l2 request API with the v4l2h264dec plugin, but I couldn't figure out how to compile gstreamer with the plugin enaled.

@TheNathan0
Copy link

I read you might be able to build Chromium with support for Hantro. I wonder if Firefox has support, likely not? Firefox's Webrender engine just straight up broke.

I can't definitely tell if it's a Panfrost or a Firefox issue; it could be either of the two (or both). This issue exists under PrawnOS as well. This is actually a new issue. Webrender used to work. Chromium/Vivaldi acceleration is flakey at best and not great (imo).

@petm5
Copy link
Author

petm5 commented Nov 1, 2022

I got hardware h264 decoding to work with gstreamer on my C201 (Currently running Alpine Linux though so it may not work on PrawnOS.) However there's a strange issue where the video freezes every few seconds. I don't know the cause yet but it's almost as if gstreamer isn't piping h264 data to the video decoder early enough.

@TheNathan0
Copy link

I got hardware h264 decoding to work with gstreamer on my C201 (Currently running Alpine Linux though so it may not work on PrawnOS.) However there's a strange issue where the video freezes every few seconds. I don't know the cause yet but it's almost as if gstreamer isn't piping h264 data to the video decoder early enough.

Maybe a Gstreamer bug? Did you manage to get Firefox hardware accelerated Webrender working? or are you using that in software?

When you say Alpine, do you mean postmarketOS?

How did you get deciding on Gstreamer working on Alpine? It may work for Cadmium/PrawnOS.

@petm5
Copy link
Author

petm5 commented Nov 1, 2022

I'm using straight Alpine installed via the cloud tarball (for its small base size) with a custom kernel configured similarly to the default kernel in PrawnOS.

I tried getting hardware accelerated rendering with Panfrost in Firefox but it just refuses to work and turns into a choppy, laggy mess. However hardware acceleration works okay in chromium based browsers with scrolling being mostly smooth when the page loads in. (Still gets worse performance than ChromeOS but that might be a mesa bug.)

To get gstreamer working I just installed gst-plugins-good and gst-plugins-bad from the main repos. I'm running gst-play-1.0 filename to play media.

@TheNathan0
Copy link

TheNathan0 commented Nov 1, 2022

So I'm not the only one with this issue. I'm not sure where to report this bug to.

The only way I know to increase the performance and have modern Firefox hardware acceleration working would be the revert to the old Mali blobs, but I haven't accomplished that yet on the C100P. Last time I tried, it was with the 4.19 Rockchip kernel and a ChromeOS config. Let's say that didn't go well.

I have limited experience with Mali blobs on Linux though. I'd guess I'd have to have a properly working Rockchip kernel built for it, and install userspace drivers? Not 100% on usespace drivers. Xorg sounds like a pain, I'd likely want to just go straight into Wayland.

I wonder why Firefox just broke like that though.

@petm5
Copy link
Author

petm5 commented Nov 2, 2022

I never tried using the mali blobs mainly because of an outdated kernel being required for them to work at all. In addition, the blobs are likely not to support OpenGL features that are required by many desktop Linux apps and will probably be a pain to get working in general.

I think the Panfrost driver mostly suffers from the lack of a shader cache. It takes a good few seconds for certain glmark2 scenes to open, and webpages seem to lag or freeze for a moment when new content is being loaded. It seems that initial disk cache support for Panfrost was just added to Mesa a few hours ago, so hopefully this will be fixed soon.

I guess the best option for now is to wait patiently for the open source Panfrost driver to mature. Its development seems to have picked up speed recently with Vulkan and OpenCL support planned for the future.

@TheNathan0
Copy link

Panfrost is great until the machine straight up just freezes entirely and randomly with anything that you're doing. Wish that wasn't an issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants