neko-rooms icon indicating copy to clipboard operation
neko-rooms copied to clipboard

Hardware acceleration support?

Open DX37 opened this issue 2 years ago • 7 comments

Hello there! Using Neko recently, figured how to pass render devices through to docker image and enabled NEKO_HWENC for better stream encoding performance.

But in neko-rooms I don't see such options or fields to specify it manually, only NEKO_HWENC: true, which cause created room to collapse due to lack of render devices.

Can it be implemented? Is there temporary solution alongside using Neko without rooms?

DX37 avatar Aug 04 '22 12:08 DX37

You should be able to set NEKO_HWENC=VAAPI env variable, add /dev/dri to mounts whitelist and mount it as public path. That should be enough, to get it working.

m1k1o avatar Aug 04 '22 13:08 m1k1o

You should be able to set NEKO_HWENC=VAAPI env variable, add /dev/dri to mounts whitelist and mount it as public path. That should be enough, to get it working.

Nope, that didn't worked. Created room-container falling in fatal state, saying no vaapivp8enc element or no vaapih264enc element. I tested hardware encoding separately, without rooms and with devices, and it's working on my PC.

DX37 avatar Aug 04 '22 15:08 DX37

That's weird, because with mounting and without setting NEKO_HWENC=VAAPI I can see /dev/dri or any other dirs mounted.

изображение

DX37 avatar Aug 04 '22 15:08 DX37

Hey, can it be because of different groups of card0 and renderD128? This is from Neko without rooms.

изображение

DX37 avatar Aug 04 '22 16:08 DX37

I don't have such GPU, so I cannot help further. Here is original PR https://github.com/m1k1o/neko/pull/151 for that, maybe the author can help you with that

m1k1o avatar Aug 04 '22 18:08 m1k1o

I don't have such GPU, so I cannot help further. Here is original PR m1k1o/neko#151 for that, maybe the author can help you with that

I'm not asking for help with GPU support, I asking is there a way to add option for adding docker-compose devices string for rooms creating, if simple mount not working? Like these:

devices:
- /dev/dri/renderD128:/dev/dri/renderD128
- /dev/dri/card0:/dev/dri/card0

DX37 avatar Aug 05 '22 18:08 DX37

No, that is not possible with neko-rooms yet. This is how it could look like: https://github.com/m1k1o/neko-rooms/commit/35d2958883f0a9ef699905eb80b70159896de557 Or alternatively just implementing gpu: enum for room and it mounts correct devices/sets correct env.

m1k1o avatar Aug 05 '22 20:08 m1k1o