xpra icon
Bug tracker and wiki

This bug tracker and wiki are being discontinued
please use https://github.com/Xpra-org/xpra instead.

Version 11 (modified by Antoine Martin, 9 years ago) (diff)


NVENC Encoder

This encoder requires a supported NVIDIA graphics card (Tesla, Quadro K4000 and up, ..) or a card which has the NVENC chip (GTX 680?, GTX 760 and up) and a license key. (...)

This encoder offers the best latency, which is most noticeable at higher resolutions (1080p and up).


  • Download the CUDA SDK and install it (and if present, you should remove any previously installed nvidia drivers: both "nouveau" and nvidia's proprietary drivers)
  • Download the cuda.pc pkgconfig file (missing from the SDK) and install it (usually in /usr/lib64/pkgconfig for 64-bit systems)
  • Install PyCuda
  • Download the nvenc_3.0 sdk and install it (just unzip into /usr/local/)
  • Download the nvenc3.pc pkgconfig file (also missing from the SDK) and install it
  • Build xpra version v0.11.x (trunk) r4652 or later with nvenc support:
    ./setup.py install --with-nvenc


  • the files given here are for the current versions of the SDKs and for 64 bit systems only, adjust the files and locations accordingly
  • If CUDA refuses to build and complains about:
    Installation Failed. Using unsupported Compiler.
    run the CUDA installer with "-override-compiler"
  • there are undocumented incompatibilities between kernel versions, nvidia driver versions and nvenc SDK versions. If possible, install the driver version bundled with the nvenc SDK. For more details see here If you ignore this warning, you may get undecipherable errors at runtime (incompatible structure version errors, etc)


Because of the unusual location of the CUDA and NVENC libraries and support tools, it is your responsibility to ensure that the required shared objects and the CUDA compiler can be located/loaded at runtime. You can specify the paths each time on the command line:

PATH=$PATH:/usr/local/cuda-5.5/bin/ \
LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/cuda-5.5/lib64:/usr/lib64/nvidia \
 xpra ...

Or make those settings more permanent in your user or system profile.

Beware that the new paths added to PATH and LD_LIBRARY_PATH should be appended to the current values (as per the example above) and not inserted before them, this is to prevent a conflict with other system libraries. (ie: libOpenCL.so is known to cause crashes)

If the nvenc codec loads, it should get used ahead of x264 when you specify the h264 encoding, you can verify the encoder in use with:

xpra info | grep "encoder="

Note: your client must be either 0.10.9 / 0.11.0-r4661 or newer. With older clients (0.10.x), you must specify "--encoding=x264" to get h264...

To force xpra to use nvenc as video encoder and no other, you can also specify:

XPRA_ENCODER_TYPE=nvenc xpra ...

To debug nvenc, add:


Scaling: nvenc supports scaling natively, see CSC/Scaling for details on how to configure scaling.

License Key

If you have access to a license key, you can specify it like so:

XPRA_NVENC_CLIENT_KEY="0A1B2C3D-4E5F-6071-8293-A4B5C6D7E8F9" xpra ...

Attachments (6)

Download all attachments as: .zip