Hardware accelerated encoding using Intel QuickSync via VAAPI #151
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hardware accelerated encoding using Intel QuickSync via VAAPI. Tested VP8 and H264 on a Coffee Lake CPU.
Adding support for AMD/VAAPI should AFAICT just be a matter of further adding the necessary packages. The PR leaves open the possibility of adding NVENC down the line - the hw encoder to use is requested via env var.
The end user is required to (via docker-compose or whatever else):
/dev/dri
to the containerNEKO_HWENC=VAAPI
RENDER_GID=<gid>
with the group id of the render user (or the user that owns/dev/dri/renderD*
) - it'll be fetched automatically otherwise (as long as/dev/dri
is passed through) but it's not well tested yetNotes
Sometimes on container startup X will throw a fit with (possibly non-exhaustive list):
Xorg: ../../../../../../include/privates.h:121: dixGetPrivateAddr: Assertion 'key->initialized' failed.
Xorg: ../../../../dix/privates.c:384: dixRegisterPrivateKey: Assertion '!global_keys[type].created' failed.
as soon as neko starts (and then neko itself dies). When that happens supervisord will restart both and soon enough they'll both manage to say alive and settle down.
Looking for clues reveals a bunch of long-standing X bugs with a bunch of supposed patches and the general advice of "start X as root kthx" (which is not the case in neko, as it stands).
All it seems to do in practice is delay startup by 2-3 seconds, but it's worth keeping in mind AND testing. From the looks of it, it might be just a case of reordering/delaying stuff at startup, but I am not going to touch supervisord.