xpra icon
Bug tracker and wiki

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

Opened 7 years ago

Closed 7 years ago

Last modified 17 months ago

#825 closed task (fixed)

NVENC v5 support

Reported by: Antoine Martin Owned by: Smo
Priority: minor Milestone: 0.15
Component: encodings Version: trunk
Keywords: Cc:


Soon after NVENC v4 (#653), NVENC v5 is out.

Of interest:

  • licensing issues: how many contexts can we get on consumer cards since the license keys are gone? (or can we fool the detection built into the library since this very likely to be another case of nvidia crippling perfectly good hardware to sell the expensive "pro" cards)
  • monoChromeEncoding - would require some form of UI to toggle this on (preferably per window), this is likely to be very fast as it will only compress about a third of the amount of data
  • H265 is supported, supposedly - though it's not entirely clear on which cards: https://developer.nvidia.com/nvidia-video-codec-sdk - Support for HEVC (H.265) encoding on GM20x GPUs (GTX980 and future Quadro/Tesla?/GRID platforms based on GM20x GPUs) (will need testing on the GTX 970 for example)

Attachments (1)

nvenc5.pc (305 bytes) - added by Antoine Martin 7 years ago.
they've moved the directory layout, still very weird, but different

Download all attachments as: .zip

Change History (10)

comment:1 Changed 7 years ago by Antoine Martin

Priority: majorminor
Status: newassigned

r8825 adds basic NVENC v5 support, but since it seems to be crippled on consumer cards (2 contexts maximum when I tried... and no way to supply a license key), I have added it at the end of the list: we try NVENC v4 and v3 before trying this one.

Still TODO (but lower priority since 2 contexts is just not enough):

  • testing H265
  • re-instate the rate control stuff which has been moved to a different structure
  • add latest GUID and error codes, etc.
  • test various cards
Last edited 7 years ago by Antoine Martin (previous) (diff)

Changed 7 years ago by Antoine Martin

Attachment: nvenc5.pc added

they've moved the directory layout, still very weird, but different

comment:2 Changed 7 years ago by Antoine Martin

Owner: changed from Antoine Martin to Smo
Status: assignednew

I don't think we care too much about v5 support because of the hardware limitations, so feel free to just close this ticket if the codec builds (you can test with video-encoders=nvenc5 to force the server to only use this one, otherwise nvenc4 and nvenc3 will take precendence)

comment:3 Changed 7 years ago by Smo

On fedora 20 64bit with xpra from trunk (0.16)

After installing nvenc5 library and building this I can't seem to figure out why I can't use it.

Everything seems to compile just fine and install however when using --video-encoders=nvenc5 when starting my server I get output simliar to this and it doesn't work

2015-05-21 19:14:27,517 ignoring unknown video encoders: nvenc5

Here are some stuff from xpra info.

$ xpra info :97|egrep "version|nvenc|cuda"
encoding.cython.version=(0, 3, '0', '22', 'beta0')
encoding.enc_webp.version=(0, 3, 1)
encoding.swscale.version=(3, 1, 101)
network.bencode.version=('Cython', 0, 12)
network.rencode.version=('Cython', 1, 0, 3)
server.argv=('/usr/bin/xpra', '--bind-tcp=', '--video-encoders=nvenc5', '--start-child=xterm -fg white -bg black', 'start', ':97', '--daemon=no')
server.build.linker=GNU ld version 2.23.2
server.glib.version=(2, 38, 2)
server.gobject.version=(2, 28, 6)
server.gtk.version=(2, 24, 27)
server.path=('/usr/bin', '/usr/lib64/python2.7/site-packages/gst-0.10', '/usr/bin', '/usr/lib/python2.7/site-packages/pyopencl-2015.1-py2.7-linux-x86_64.egg', '/usr/lib/python2.7/site-packages/appdirs-1.4.0-py2.7.egg', '/usr/lib/python2.7/site-packages/pytest-2.6.4-py2.7.egg', '/usr/lib/python2.7/site-packages/pytools-2014.3.5-py2.7.egg', '/usr/lib/python2.7/site-packages/py-1.4.26-py2.7.egg', '/usr/lib/python2.7/site-packages/pycuda-2014.1-py2.7-linux-x86_64.egg', '/usr/lib64/python27.zip', '/usr/lib64/python2.7', '/usr/lib64/python2.7/plat-linux2', '/usr/lib64/python2.7/lib-tk', '/usr/lib64/python2.7/lib-old', '/usr/lib64/python2.7/lib-dynload', '/usr/lib64/python2.7/site-packages', '/usr/lib64/python2.7/site-packages/gtk-2.0', '/usr/lib/python2.7/site-packages')
server.pyglib.version=(2, 28, 6)
server.pygtk.version=(2, 24, 0)
server.python.full_version=2.7.5 (default, Apr 10 2015, 08:09:05) \n[GCC 4.8.3 20140911 (Red Hat 4.8.3-7)]

Can you see what i'm doing wrong here why is it ignoring that choice of video encoder. At the moment i'm only compiling with nvenc5.

comment:4 Changed 7 years ago by Smo

Owner: changed from Smo to Antoine Martin

comment:5 Changed 7 years ago by Antoine Martin

Please post the codec loader and video help in "-v" mode.

See debugging section in wiki/Encodings.

Last edited 7 years ago by Antoine Martin (previous) (diff)

comment:6 Changed 7 years ago by Antoine Martin

Owner: changed from Antoine Martin to Smo

Just tried it, that's because the options for video encoders are:

xpra start --video-encoders=help
the following video encoders may be available: x264, vpx, nvenc

There is no way to select which version of nvenc you want, we choose the "best" one if more than one is built.
So, to try nvenc5, you have to build with "--without-nvenc3 --without-nvenc4".

comment:7 Changed 7 years ago by Antoine Martin

r9475 makes it easier to test, ie:

XPRA_NVENC_VERSIONS=5,4,3 xpra start

comment:8 Changed 7 years ago by Smo

Resolution: fixed
Status: newclosed

Okay got everything working and seems to work just fine so closing this ticket.

Output from initialization

2015-05-28 16:47:03,273 CUDA initialization (this may take a few seconds)
2015-05-28 16:47:04,505 CUDA 6.0.0 / PyCUDA 2014.1, found 2 device(s):
2015-05-28 16:47:04,653   + GeForce GTX 750 Ti @ 0000:83:00.0 (memory: 98% free, compute: 5.0)
2015-05-28 16:47:04,782   + GeForce GTX 650 @ 0000:09:00.0 (memory: 97% free, compute: 3.0)
2015-05-28 16:47:04,964 device matches preferred device id 0: GeForce GTX 750 Ti @ 0000:83:00.0
2015-05-28 16:47:05,210 xpra is ready.
2015-05-28 16:47:05,538 NVENC v5 successfully initialized

comment:9 Changed 17 months ago by migration script

this ticket has been moved to: https://github.com/Xpra-org/xpra/issues/825

Note: See TracTickets for help on using tickets.