Xpra: Ticket #825: NVENC v5 support

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

Of interest:

Mon, 23 Mar 2015 16:02:59 GMT - Antoine Martin: priority, status changed

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):

Mon, 23 Mar 2015 16:05:21 GMT - Antoine Martin: attachment set

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

Tue, 14 Apr 2015 16:42:40 GMT - Antoine Martin: owner, status changed

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)

Thu, 21 May 2015 23:22:49 GMT - 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.

Thu, 21 May 2015 23:23:03 GMT - Smo: owner changed

Fri, 22 May 2015 01:32:50 GMT - Antoine Martin:

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

See debugging section in wiki/Encodings.

Fri, 22 May 2015 05:15:49 GMT - Antoine Martin: owner changed

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".

Fri, 22 May 2015 08:53:37 GMT - Antoine Martin:

r9475 makes it easier to test, ie:

XPRA_NVENC_VERSIONS=5,4,3 xpra start

Thu, 28 May 2015 20:51:20 GMT - Smo: status changed; resolution set

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

Sat, 23 Jan 2021 05:07:08 GMT - migration script:

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