Skip to content

[Feature request] NVENC support #116

Open

Description

@thesword53

Do you plan to add encoding support via NVENC?

Activity

  1. elFarto commented on Oct 1, 2022

    @elFarto
    Owner

    Originally I had planned to look into it, but I'm not so sure now. I don't know if hardware video encoding is useful for the very few programs that can actually make use of this library.

  2. exalented commented on Oct 1, 2022

    @exalented

    Sway/Nvidia user here. This is the only working solution for hardware accel for me. Sunshine comes to mind. Would be amazing to have NVENC.

  3. NoTuxNoBux commented on Oct 14, 2022

    @NoTuxNoBux

    Since Firefox can use the driver, would supporting encoding also open up hardware-accelerated encoding for screen sharing or sharing webcam video in conferencing solutions such as Jitsi / Microsoft Teams / Google Meet / ...?

  4. thesword53 commented on Nov 18, 2022

    @thesword53
    ContributorAuthor

    It would also be useful for Virgl video encoding: https://www.phoronix.com/news/Virgl-Encode-H264-H265

  5. exalented commented on Feb 11, 2023

    @exalented

    Any news on this? I'll pitch in $50.

  6. elFarto commented on Feb 12, 2023

    @elFarto
    Owner

    I did take a quick look at it. NVENC looks pretty straight forward to use, but I struggled to understand how to use VA-API to encode. From what I can tell, the mapping between the two isn't as straight forward as the decoding side is.

  7. JeWe37 commented on May 10, 2023

    @JeWe37

    I also have a use for this, I use multiple different machines for hardware encoding, some of which have NVIDIA, others Intel and others again AMD GPUs, and having VA-API support on NVIDIA would drastically simplify the required ffmpeg command creation.

  8. BlauerHunger commented on May 13, 2023

    @BlauerHunger

    Waypipe could also benefit from this

  9. cl0vrfi3ld commented on Jan 23, 2025

    @cl0vrfi3ld

    I've been running a media server on my k8s cluster and configuring the current non-free NVIDIA drivers to work with containers/k8s was a nightmare, just to get basic hardware encoding working. It requires installing a custom container runtime (nvidia-container-toolkit), re-configuring (and in my case re-installing) Kubernetes, and installing extra operators in the cluster that take up compute resources and aren't documented that well. With VA-API GPUs, though, it's as simple as binding your workload to the appropriate dri path on the host, just like binding a directory. Voila, your GPU is exposed to the container.

    This is all to say, having full decode and encode support would be HUGE for those utilizing containers. I can't support development financially at this time, but I'm happy to help out in any way I can (seriously this driver would've saved me days of tinkering, though I may just be bad at managing Linux kernel stuff 😅).

  10. polarathene commented on Jan 24, 2025

    @polarathene

    FWIW, the way forward with containers is CDI (standardised with OCI, so CRI agnostic), but presently only nvidia has official support for this (there is third-party generator for AMD iirc).

    With docker prior to CDI, effectively only nvidia was supported (officially), and only cuda (compute) and nvidia-smi (utilities) capabilities were enabled by default.

    Video encoding required an extra capability enabled and thus more verbose config similar to what you'd do for amd. Otherwise it's just --gpus all on the CLI, the runtime you mention would be seamless (at least on Windows) with Docker Desktop which sets that up behind the scenes (they have k3s which might leverage the same).

    Anyway, with CDI the host system needs a config for the hardware defined with mappings of what to mount/do. It is vendor agnostic and allows for effectively --device nvidia.com/all (something like that iirc).

    NixOS has a package for AMD and maybe Intel that's third-party/community managed iirc, and k8s AFAIK has equivalent via some plugins (I don't use k8s so I can't assist much there).

    I'm not sure how long broader adoption for CDI by gpu vendors will take. I don't think it requires the custom nvidia runtime, but if it does pretty sure it's not intended to stay that way, it does currently require a host package (nvidia ctk) to generate the CDI config however.

  11. padoruuuu commented on Feb 27, 2025

    @padoruuuu

    id personally send el farto 200 bucks if nvenc support could be worked out

  12. ryao commented on Aug 6, 2025

    @ryao

    Originally I had planned to look into it, but I'm not so sure now. I don't know if hardware video encoding is useful for the very few programs that can actually make use of this library.

    Discord could use it. A friend had been complaining about low FPS whenever I stream over discord. As it turns out, my Ryzen 9 5950X CPU is unable to encode fast enough for discord. I am not sure why that is, given that my friend has a Ryzen 7 5800X and it can keep up without any issues. The only difference between my machine and my friend's machine is that my machine is downscaling 4K to 720p for Discord while my friend's machine is downscaling 1080p to 720p for Discord.

  13. CelDaemon commented on Sep 24, 2025

    @CelDaemon

    With discord seemingly working on using VA-API for their stream encoding, it may be worth revisiting this feature request.

  14. relativemodder commented on Sep 27, 2025

    @relativemodder

    With discord seemingly working on using VA-API for their stream encoding, it may be worth revisiting this feature request.

    Agree here, bumping up this issue.
    That would be pretty cool

  15. eliteSchwein commented on Oct 10, 2025

    @eliteSchwein

    Legcord and many other third party electron based discord clients already use vaapi. this would be awesome...

  16. relativemodder commented on Oct 22, 2025

    @relativemodder

    bumping this up; please, for the love of god, someday... it will happen...

  17. xaionaro commented on Oct 31, 2025

    @xaionaro

    I'm willing to donate a bit for this feature :)

  18. melody-rs commented on Feb 16, 2026

    @melody-rs

    I'm interested in trying to implement encoding, do you have any contribution guidelines I should be following?

  19. elFarto commented on Feb 16, 2026

    @elFarto
    Owner

    There's no specific guidelines to contributing. With that said, while I don't mind the use of LLMs to aid in development, I don't like seeing PRs that look like no human has ever touched the code.

  20. melody-rs commented on Feb 25, 2026

    @melody-rs

    Do you mind if I do some reorganization? I was thinking of having encode and decode logic in separate subfolders but I'd have to shift things around

  21. elFarto commented on Feb 25, 2026

    @elFarto
    Owner

    That should be fine.

  22. alper-han commented on Mar 22, 2026

    @alper-han
    Contributor
  23. efortin commented on Apr 3, 2026

    @efortin

    Hi, I started to play on legion go 2 (steam os) and steam link this night.
    Totally vibe coded but if it can help, I introduced encoding hvec and h264 and all stuff to fix Steam issue on Blackwell (Nvidia remove lib cuda 32bit support causing issue with steam)

    #427

  24. thesword53 commented on Sep 4, 2026

    @thesword53
    ContributorAuthor

    Here #438 is a pull request which adds support for H.264, HEVC and AV1 video encoding including YUV422 and YUV444 pixel formats for both H264 and HEVC.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions