m1k1o / neko

A self hosted virtual browser that runs in docker and uses WebRTC.
https://neko.m1k1o.net/
Apache License 2.0
5.94k stars 449 forks source link

is there any way to use onboard display card for hardware acceleration? #385

Open beyondzvincent opened 2 months ago

beyondzvincent commented 2 months ago

my setup is intel 13600, no discrete display card, running ubuntu server, i dont have anything in /dev/dri. I want to use the onboard display card for hardware acceleration for video, i tried use image: "m1k1o/neko:brave" and ghcr.io/m1k1o/neko/intel-brave, both failed, also tried with or without "NEKO_HWENC: vaapi", either the browser cant open when connect or when i open youtube, it just use pure cpu, not sure if my setting is incorrect, please advise, my docker-compose.yaml is:

`version: "3.4" services: neko: image: "m1k1o/neko:brave" restart: "unless-stopped" shm_size: "2gb" volumes:

bsmithio commented 2 months ago

Do you have anything in /dev/dri on your Docker host? If not you may need to install Intel drivers.

beyondzvincent commented 2 months ago

Do you have anything in /dev/dri on your Docker host? If not you may need to install Intel drivers.

thanks for the advise, i will try that, also is it support hardware acceleration in windows docker host? if so, is it also pass the same /dev/dri to docker is ok?

yesBad commented 2 months ago

thanks for the advise, i will try that, also is it support hardware acceleration in windows docker host? if so, is it also pass the same /dev/dri to docker is ok?

Neko has not been tested with Windows and I doubt its the same for Windows. I suggest reading up on that.

beyondzvincent commented 2 months ago

Do you have anything in /dev/dri on your Docker host? If not you may need to install Intel drivers.

Hi, i tested with my other pc that is using intel 1260p, in this device with ubuntu 22, /dev/dri have card0 and render those, i also can use the igpu for youtube in ubuntu browser, but when i use neko with intel:firefox, it just blank black screen, please advise:

here is the compose file and the log after i connect compose.txt nekolog.txt

Technetium1 commented 2 months ago

@beyondzvincent yes you can do acceleration on windows hosts, but it would not be a fun time and is not the same exact implementation. No way to specify GPU as far as I know, so you can only use --gpus=all. Might only work with Nvidia, but I don't believe that's worth finding out in the first place. It's not worth the development effort to try formally supporting Windows, but please do post details if you can make it work!

beyondzvincent commented 2 months ago

@beyondzvincent yes you can do acceleration on windows hosts, but it would not be a fun time and is not the same exact implementation. No way to specify GPU as far as I know, so you can only use --gpus=all. Might only work with Nvidia, but I don't believe that's worth finding out in the first place. It's not worth the development effort to try formally supporting Windows, but please do post details if you can make it work!

Can you also advise my reply above? about using 1260p with ubuntu, i cannot use hardware acceleration with the integrated graphic

Technetium1 commented 2 months ago

@beyondzvincent I can't really help, sorry. Try to allocate less memory, maybe some is already taken?