This project has moved and is read-only. For the latest updates, please go here.

Hardware encoding

Jun 3, 2016 at 12:50 PM
I can't seem to get hardware encoding to work. I'm running MCE on Windows Server Essentials 2012 R2 with a Nvidia GTX 780Ti.

I noticed all the UI sessions returned FALSE, so I went and changed all the binaries to run as admin for all users, still no joy.

Here's an excerpt from my log:


WARNING> 2016-06-02T21:31:25 MCEBuddy.AppWrapper.Handbrake --> Handbrake failed, non 0 return code
INFORMATION> 2016-06-02T21:31:25 MCEBuddy.AppWrapper.Handbrake --> QuickSync encoding supported available -> False
INFORMATION> 2016-06-02T21:31:25 MCEBuddy.AppWrapper.Handbrake --> H.264 encoding supported available -> False
INFORMATION> 2016-06-02T21:31:25 MCEBuddy.AppWrapper.Handbrake --> H.265 encoding supported available -> False

Which confuses me, because earlier the log states this:


--> Checking presence and capabilities of NVidia NVENC Hardware encoder
2016-06-02T21:31:25 MCEBuddy.AppWrapper.NVidiaQuery --> Launching process C:\Program Files\MCEBuddy2x\nvidia\nvidiaQuery.exe
2016-06-02T21:31:25 MCEBuddy.AppWrapper.NVidiaQuery --> Process arguments
2016-06-02T21:31:25 MCEBuddy.AppWrapper.NVidiaQuery --> UI Session Admin Process : True
2016-06-02T21:31:25 MCEBuddy.AppWrapper.NVidiaQuery --> Starting process as a UISession process with Admin privileges. This requires atleast 1 user to be logged into the system (remote desktop or locally)
2016-06-02T21:31:25 MCEBuddy.AppWrapper.NVidiaQuery --> Setting process priority to Normal
2016-06-02T21:31:25 MCEBuddy.AppWrapper.NVidiaQuery --> C:\Program Files\MCEBuddy2x\nvidia\nvidiaQuery.exe Starting...
2016-06-02T21:31:25 MCEBuddy.AppWrapper.NVidiaQuery --> CUDA Device Query (Runtime API) version (CUDART static linking)
2016-06-02T21:31:25 MCEBuddy.AppWrapper.NVidiaQuery --> Detected 1 CUDA Capable device(s)
2016-06-02T21:31:25 MCEBuddy.AppWrapper.NVidiaQuery --> Device 0: "GeForce GTX 780 Ti"
2016-06-02T21:31:25 MCEBuddy.AppWrapper.NVidiaQuery --> CUDA Driver Version / Runtime Version 8.0 / 7.5
2016-06-02T21:31:25 MCEBuddy.AppWrapper.NVidiaQuery --> Detected CUDA Driver version = 8
2016-06-02T21:31:25 MCEBuddy.AppWrapper.NVidiaQuery --> CUDA Capability Major/Minor version number: 3.5
2016-06-02T21:31:25 MCEBuddy.AppWrapper.NVidiaQuery --> Detected CUDA Hardware version = 3.5
2016-06-02T21:31:25 MCEBuddy.AppWrapper.NVidiaQuery --> Total amount of global memory: 3072 MBytes (3221225472 bytes)
2016-06-02T21:31:25 MCEBuddy.AppWrapper.NVidiaQuery --> (15) Multiprocessors, (192) CUDA Cores/MP: 2880 CUDA Cores
2016-06-02T21:31:25 MCEBuddy.AppWrapper.NVidiaQuery --> GPU Max Clock rate: 1046 MHz (1.05 GHz)
2016-06-02T21:31:25 MCEBuddy.AppWrapper.NVidiaQuery --> Memory Clock rate: 3500 Mhz
2016-06-02T21:31:25 MCEBuddy.AppWrapper.NVidiaQuery --> Memory Bus Width: 384-bit
2016-06-02T21:31:25 MCEBuddy.AppWrapper.NVidiaQuery --> L2 Cache Size: 1572864 bytes
2016-06-02T21:31:25 MCEBuddy.AppWrapper.NVidiaQuery --> Maximum Texture Dimension Size (x,y,z) 1D=(65536), 2D=(65536, 65536), 3D=(4096, 4096, 4096)
2016-06-02T21:31:25 MCEBuddy.AppWrapper.NVidiaQuery --> Maximum Layered 1D Texture Size, (num) layers 1D=(16384), 2048 layers
2016-06-02T21:31:25 MCEBuddy.AppWrapper.NVidiaQuery --> Maximum Layered 2D Texture Size, (num) layers 2D=(16384, 16384), 2048 layers
2016-06-02T21:31:25 MCEBuddy.AppWrapper.NVidiaQuery --> Total amount of constant memory: 65536 bytes
2016-06-02T21:31:25 MCEBuddy.AppWrapper.NVidiaQuery --> Total amount of shared memory per block: 49152 bytes
2016-06-02T21:31:25 MCEBuddy.AppWrapper.NVidiaQuery --> Total number of registers available per block: 65536
2016-06-02T21:31:25 MCEBuddy.AppWrapper.NVidiaQuery --> Warp size: 32
2016-06-02T21:31:25 MCEBuddy.AppWrapper.NVidiaQuery --> Maximum number of threads per multiprocessor: 2048
2016-06-02T21:31:25 MCEBuddy.AppWrapper.NVidiaQuery --> Maximum number of threads per block: 1024
2016-06-02T21:31:25 MCEBuddy.AppWrapper.NVidiaQuery --> Max dimension size of a thread block (x,y,z): (1024, 1024, 64)
2016-06-02T21:31:25 MCEBuddy.AppWrapper.NVidiaQuery --> Max dimension size of a grid size (x,y,z): (2147483647, 65535, 65535)
2016-06-02T21:31:25 MCEBuddy.AppWrapper.NVidiaQuery --> Maximum memory pitch: 2147483647 bytes
2016-06-02T21:31:25 MCEBuddy.AppWrapper.NVidiaQuery --> Texture alignment: 512 bytes
2016-06-02T21:31:25 MCEBuddy.AppWrapper.NVidiaQuery --> Concurrent copy and kernel execution: Yes with 1 copy engine(s)
2016-06-02T21:31:25 MCEBuddy.AppWrapper.NVidiaQuery --> Run time limit on kernels: Yes
2016-06-02T21:31:25 MCEBuddy.AppWrapper.NVidiaQuery --> Integrated GPU sharing Host Memory: No
2016-06-02T21:31:25 MCEBuddy.AppWrapper.NVidiaQuery --> Support host page-locked memory mapping: Yes
2016-06-02T21:31:25 MCEBuddy.AppWrapper.NVidiaQuery --> Alignment requirement for Surfaces: Yes
2016-06-02T21:31:25 MCEBuddy.AppWrapper.NVidiaQuery --> Device has ECC support: Disabled
2016-06-02T21:31:25 MCEBuddy.AppWrapper.NVidiaQuery --> CUDA Device Driver Mode (TCC or WDDM): WDDM (Windows Display Driver Model)
2016-06-02T21:31:25 MCEBuddy.AppWrapper.NVidiaQuery --> Device supports Unified Addressing (UVA): Yes
2016-06-02T21:31:25 MCEBuddy.AppWrapper.NVidiaQuery --> Device PCI Domain ID / Bus ID / location ID: 0 / 1 / 0
2016-06-02T21:31:25 MCEBuddy.AppWrapper.NVidiaQuery --> Compute Mode:
2016-06-02T21:31:25 MCEBuddy.AppWrapper.NVidiaQuery --> < Default (multiple host threads can use ::cudaSetDevice() with device simultaneously) >
2016-06-02T21:31:25 MCEBuddy.AppWrapper.NVidiaQuery --> deviceQuery, CUDA Driver = CUDART, CUDA Driver Version = 8.0, CUDA Runtime Version = 7.5, NumDevs = 1, Device0 = GeForce GTX 780 Ti
2016-06-02T21:31:25 MCEBuddy.AppWrapper.NVidiaQuery --> Result = PASS
--> Process exited with code 0
--> NVidia H.264 Hardware Encoder Detected : True
--> NVidia H.265 Hardware Encoder Detected : False

Link to full log: https://onedrive.live.com/redir?resid=A6179332A997EB8B!205783&authkey=!AO3oS-4NJfkNZfg&ithint=file%2clog

Thanks in advance
Jun 3, 2016 at 6:16 PM
handbrake doesn't support Nvidia, only ffmpeg does. So if your profile is using ffmpeg it'll use hardware encoding. don't use handbrake for hardware encoding. If you profile contains both then mcebuddy will automatically pick the encoder which supports your video card. See the FAQ's

Jun 4, 2016 at 4:51 PM
I'm using the mp4 normal profile, quality 50% (target of approx. 4kbps). I edited the profile and removed handbrake from the order command, but I'm still only seeing 28fps encoding and GPUZ says there's only a 1-3% gpu load. Link to logfile:

https://onedrive.live.com/redir?resid=A6179332A997EB8B!206584&authkey=!AJ4L0DqHLj7nXmE&ithint=file%2clog
Jun 4, 2016 at 8:38 PM
2016-06-04T10:34:53 MCEBuddy.AppWrapper.FFmpeg --> Starting process as a UISession process with Admin privileges. This requires atleast 1 user to be logged into the system (remote desktop or locally)
ERROR> 2016-06-04T10:34:53 --> StartAppWithAdminPrivilegesFromNonUISession WTSQueryUserToken failed (No logged on users) with error 1008. An attempt was made to reference a token that does not exist.

WARNING> 2016-06-04T10:34:53 MCEBuddy.AppWrapper.FFmpeg --> Unable to create UI Session process with Admin Privileges from NonUI Session. Is any user logged on?
WARNING> 2016-06-04T10:34:53 MCEBuddy.AppWrapper.FFmpeg --> Retrying process creation as a NonUI Session process with Admin privileges
WARNING> 2016-06-04T10:34:53 MCEBuddy.AppWrapper.FFmpeg --> Some functions like hardware encoding may not work in this mode

Jun 5, 2016 at 12:53 PM
Thanks! That was the original problem I had where I had to change the permissions of everything to run as administrator. So, I did it again, but it still didn't help.

I've given up on the Nvidia solution, I turned my Intel Graphics back on and am using QSV which is working nicely.

Thanks for the assists.