Xpra: Ticket #1490: no proxy video encoders

Hi,

having problems to get the nvenc proxy feature ready:

server xenial 16.04 client xenial 16.04 xpra version: xpra proxy version 2.0.1-r15494 64-bit

i start the Proxy Server with:

xpra proxy :100 --bind-ssl=0.0.0.0:443 --auth=multifile:filename=./xpra-auth --ssl=on --ssl-cert=/home/${USERNAME}/gpunode.crt --ssl-key=/home/${USERNAME}/gpunode.key --no-daemon -d encoding

and i will get no nvenc accl.

2017-04-04 16:30:07,595 created unix domain socket: /root/.xpra/fb06389bf2ef-100
2017-04-04 16:30:07,595 created unix domain socket: /var/run/xpra/fb06389bf2ef-100
2017-04-04 16:30:07,608 Warning: failed to load the mdns avahi publisher:
2017-04-04 16:30:07,608  No module named avahi
2017-04-04 16:30:07,608  either fix your installation or use the 'mdns=no' option
2017-04-04 16:30:07,632 xpra proxy version 2.0.1-r15494 64-bit
2017-04-04 16:30:07,632  uid=0 (root), gid=0 (root)
2017-04-04 16:30:07,632  running with pid 2622 on Linux Ubuntu 16.04 xenial
2017-04-04 16:30:07,632 xpra is ready.
2017-04-04 16:30:16,928 New SSL connection received from 141.3.42.171:52244
2017-04-04 16:30:16,933 Authentication required by multi password file authenticator module
2017-04-04 16:30:16,934  sending challenge for username 'postatom' using hmac+sha512 digest
2017-04-04 16:30:17,294 video_init() loading codecs
2017-04-04 16:30:17,466 CUDA initialization (this may take a few seconds)
2017-04-04 16:30:17,786 CUDA 8.0.0 / PyCUDA 2016.1.2, found 1 device:
2017-04-04 16:30:17,786   + GeForce GTX 980 Ti @ 0000:04:00.0 (memory: 96% free, compute: 5.2)
2017-04-04 16:30:17,967 NVidia driver version 375.39
2017-04-04 16:30:20,829 Warning: hardware or nvenc library version does not support YUV444
2017-04-04 16:30:21,090 NVENC successfully initialized
2017-04-04 16:30:21,111 video_init() will try video encoders: none
2017-04-04 16:30:21,112 encoder types found: ()
2017-04-04 16:30:21,112 proxy video encoders:
2017-04-04 16:30:21,112 new proxy instance started
2017-04-04 16:30:21,112  for client SSL socket: 172.17.0.4:443 <- 141.3.42.171:52244
2017-04-04 16:30:21,112  and server tcp socket: 172.17.0.4:58496 <- 172.17.0.3:10002
2017-04-04 16:30:21,115 proxy instance now also available using unix domain socket:
2017-04-04 16:30:21,115  /home/xpradistributor/.xpra/fb06389bf2ef-proxy-2639

maybe any hint?

greets



Wed, 05 Apr 2017 02:16:31 GMT - Antoine Martin: owner changed; keywords, milestone set

Have you configured your proxy? Please post the contents of /etc/xpra/conf.d/65_proxy.conf. To use nvenc on the proxy, you should have:

proxy-video-encoders = nvenc7

This should fix the:

video_init() will try video encoders: none

Wed, 05 Apr 2017 07:36:06 GMT - B:

Hi, thanx for the info. Are there some Info on the xpra wiki sites on setting the proxy up with encoding?

nvenc7 does not work, i tried nvenc and that looks a little bit better:

proxy-video-encoders = nvenc
2017-04-05 07:26:54,343 Warning: hardware or nvenc library version does not support YUV444
2017-04-05 07:26:54,623 NVENC successfully initialized
2017-04-05 07:26:54,645 video_init() will try video encoders: nvenc7, nvenc
2017-04-05 07:26:54,645 ignoring unknown video encoders: nvenc7
2017-04-05 07:26:57,421 Warning: hardware or nvenc library version does not support YUV444
2017-04-05 07:26:57,666 encoder types found: ('nvenc',)
2017-04-05 07:26:57,666 proxy video encoders: nvenc
2017-04-05 07:26:57,667 new proxy instance started
2017-04-05 07:26:57,667  for client SSL socket: 172.17.0.4:443 <- 141.3.42.171:52762
2017-04-05 07:26:57,667  and server tcp socket: 172.17.0.4:59472 <- 172.17.0.3:10002
2017-04-05 07:26:57,669 proxy instance now also available using unix domain socket:
2017-04-05 07:26:57,669  /home/xpradistributor/.xpra/fb06389bf2ef-proxy-4279

but (here it looks like its using nvenc7)

1491377347470, 'rowstride': 6932, 'proxy': True, 'csc': 'YUV444P', 'quality': 99, 'options': {}, 'speed': 63}
2017-04-05 07:29:07,502 _find_video_encoder(h264, BGRX)=video_spec(nvenc7)
2017-04-05 07:29:07,502 creating new video encoder video_spec(nvenc7) for window 1
2017-04-05 07:29:08,411 proxy compression using nvenc(BGRX/NV12/H264 - bd - 1732x1028) with quality=99, speed=63
2017-04-05 07:29:08,425 returning 59954 bytes from 7133028, options={'quality': 99, 'pts': 0, 'frame': 0, 'csc': 'YUV444P', 'depth': 24, 'timestamp': 1491377347470, 'rgb_format': 'BGRX', 'speed': 63}
2017-04-05 07:29:08,425 proxy draw: client_options={}
2017-04-05 07:29:09,922 timeout_video_encoders() wid=1, idle_time=1

and after idlying a few secs/mins, nvenc encoding is gone:

2017-04-05 07:31:24,812 proxy draw: client_options={'pts': 10097, 'frame': 37, 'type': 'P', 'csc': 'YUV420P'}
2017-04-05 07:31:24,944 timeout_video_encoders() wid=1, idle_time=10
2017-04-05 07:31:24,945 timing out the video encoder context for window 1
2017-04-05 07:31:25,254 proxy draw: client_options={}

i cannot see any encoding python compute process via nvidia-smi

Im using a gtx 980 ti.

Greets


Thu, 06 Apr 2017 14:47:19 GMT - Antoine Martin:

r15521 changes the config example to "nvenc". "nvenc" is the name of the encoder, "nvenc7" is the name of the module. (we used to have more than one module for nvenc)

proxy compression using nvenc(BGRX/NV12/H264 - bd - 1732x1028) with quality=99, speed=63

Congratulations, you are using nvenc.

and after idlying a few secs/mins, nvenc encoding is gone:

That's perfectly normal. Hardware encoders are in limited supply, especially if you are using a consumer card (GTX series) without a license key, so the system will only use a hardware encoder when it is really needed.

Can I close this ticket?


Sat, 13 May 2017 06:49:48 GMT - Antoine Martin: status changed; resolution set

Not heard back, closing.


Sat, 23 Jan 2021 05:25:43 GMT - migration script:

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