Slow QuickSync encoding on 1.1.0/1.1.2 vs 1.0.7

HandBrake for Windows support
Forum rules
An Activity Log is required for support requests. Please read How-to get an activity log? for details on how and why this should be provided.
Post Reply
jeffg
Posts: 3
Joined: Sat Oct 20, 2018 5:49 pm

Slow QuickSync encoding on 1.1.0/1.1.2 vs 1.0.7

Post by jeffg » Sat Oct 20, 2018 6:08 pm

Description of problem or question:
Using the H.264 QSV encoder with the same settings on the same source video, v1.0.7 encodes at 50+ FPS @ ~80% CPU usage, vs 18-20 FPS @100% CPU for v1.1.2.



Steps to reproduce the problem (If Applicable):
Install v1.0.7, encode. Uninstall, delete AppData folders. Install v1.1.2. Preferences->Video-> check enable QuickSync box. Encode. Compare encoding speeds.
Connecting an external monitor via Thunderbolt -> HDMI adapter has no effect.
Disabling deinterlace filter has no effect.

HandBrake version (e.g., 1.0.0):
1.0.7 and 1.1.2. v1.1.0 is the same as v1.1.2.



Operating system and version (e.g., Ubuntu 16.04 LTS, macOS 10.13 High Sierra, Windows 10 Creators Update):
Windows 7 Professional



HandBrake Activity Log ***required*** (see How-to get an activity log)

v1.0.7: https://pastebin.com/8k3mbq72
v1.1.2: https://pastebin.com/rN2sT0Au

Woodstock
Veteran User
Posts: 2883
Joined: Tue Aug 27, 2013 6:39 am

Re: Slow QuickSync encoding on 1.1.0/1.1.2 vs 1.0.7

Post by Woodstock » Sat Oct 20, 2018 10:07 pm

The "obvious" differences is in the filters selected... which is the big bottleneck on many encodes. Filter ID#6 is set to "mode 1" for v1.0.7, and "mode 2" for 1.1.2. This is the framerate shaper filter, from reading further down; 1.0.7 was expected to maintain a constant 29.970 FPS frame rate, 1.1.2 was expected to use variable rame rate "up to" 29.970, so it was analyzing for duplicate frames.

What happens if both are set to "same as source"?

Did you abort the encodes? Neither one got the expected frame count.

User avatar
s55
HandBrake Team
Posts: 9325
Joined: Sun Dec 24, 2006 1:05 pm

Re: Slow QuickSync encoding on 1.1.0/1.1.2 vs 1.0.7

Post by s55 » Sun Oct 21, 2018 10:29 am

It's more likely down to the fact that some very different quicksync settings are being used between the two encodes.

[10:34:16] encqsvInit: H.264/AVC High profile @ level 3.1
[10:34:16] encqsvInit: TargetUsage 4 AsyncDepth 3
[10:34:16] encqsvInit: GopRefDist 3 GopPicSize 30 NumRefFrame 1
[10:34:16] encqsvInit: BFramesMax 2 BRefType off
[10:34:16] encqsvInit: RateControlMethod ICQ ICQQuality 21


vs

[10:44:57] encqsvInit: H.264/AVC High profile @ level 3.1
[10:44:57] encqsvInit: TargetUsage 4 AsyncDepth 0
[10:44:57] encqsvInit: GopRefDist 4 GopPicSize 32 NumRefFrame 2
[10:44:57] encqsvInit: BFramesMax 3 BRefType pyramid
[10:44:57] encqsvInit: AdaptiveI unknown (auto) AdaptiveB unknown (auto)
[10:44:57] encqsvInit: RateControlMethod CQP with QPI 21 QPP 23 QPB 25
[10:44:57] encqsvInit: ExtBRC unknown (auto)
[10:44:57] encqsvInit: MBBRC unknown (auto)
[10:44:57] encqsvInit: Trellis unknown (auto)

maxim_d33
Bright Spark User
Posts: 173
Joined: Mon Mar 21, 2011 12:02 pm

Re: Slow QuickSync encoding on 1.1.0/1.1.2 vs 1.0.7

Post by maxim_d33 » Sun Oct 21, 2018 8:12 pm

jeffg, any option to share your sample?

jeffg
Posts: 3
Joined: Sat Oct 20, 2018 5:49 pm

Re: Slow QuickSync encoding on 1.1.0/1.1.2 vs 1.0.7

Post by jeffg » Tue Oct 23, 2018 7:27 pm

Thank you for the replies.

Yes, I had aborted the original tests because the source video happened to be long. I was uninstalling/reinstalling between tests so I may not have gotten all of the settings identical.

I've now installed v.1.1.2 side-by-side (in its own folder) as v1.0.7 and re-run an encoding test so that I can hopefully eliminate variables. If it matters, I ran the v1.0.7 first, then quit, then installed v1.1.2 in its own folder, and then ran its encode.

Here are two activity logs, now with everything in the filter tab set to off:
v1.0.7 Start 11:35:57 Finish 11:36:23 = 26 seconds to encode.
v1.1.2 Start 11:43:28 Finish 11:47:53 = 4 minutes 25 seconds to encode.

I do see that the filter ID 6 is in mode 1 for 1.0.7 and mode 2 for 1.1.2 - not sure how to set that in the GUI?

Source video file (70MB, no audio).

User avatar
Rodeo
HandBrake Team
Posts: 12003
Joined: Tue Mar 03, 2009 8:55 pm

Re: Slow QuickSync encoding on 1.1.0/1.1.2 vs 1.0.7

Post by Rodeo » Tue Oct 23, 2018 10:55 pm

Version 1.1.x is not detecting several encoding features that should be there. It does look like something got broken in the switch to using D3D11 (no idea what/where the issue is in the code, but as far as I can tell it would seem like in the 1.1.x encode, the Media SDK API is silently falling back to the software-based encoder) :(

maxim_d33
Bright Spark User
Posts: 173
Joined: Mon Mar 21, 2011 12:02 pm

Re: Slow QuickSync encoding on 1.1.0/1.1.2 vs 1.0.7

Post by maxim_d33 » Thu Oct 25, 2018 8:10 pm

well , I was NOT able to reproduce the issue on available HSW and with this version of the driver/10.18.14.4414
both versions of HB resulted in the same encode speed.

also, I dont have setup with NVIDIA Quadro K1100M GPU

Rodeo, there is no silent falling back to SW encoder.

issue might be related to the fact that 1.1.2 version uses DX11 per default.

jeffg , if important: I can build 1.1.2 version with enforced usage of DX9 for you to try it out
command line version available from https://drive.google.com/open?id=1IMsb3 ... ZhGmOyKFe3

jeffg
Posts: 3
Joined: Sat Oct 20, 2018 5:49 pm

Re: Slow QuickSync encoding on 1.1.0/1.1.2 vs 1.0.7

Post by jeffg » Thu Nov 01, 2018 8:13 pm

Maxim, the 1.1.2 CLI version you provided does encode quickly and CPU stays at ~80% usage - thank you! So does this point to an issue with my hardware/graphics drivers with DX11 vs DX9, or a HB bug, or ??

activity log from CLI

maxim_d33
Bright Spark User
Posts: 173
Joined: Mon Mar 21, 2011 12:02 pm

Re: Slow QuickSync encoding on 1.1.0/1.1.2 vs 1.0.7

Post by maxim_d33 » Wed Nov 07, 2018 6:59 pm

DX11 is not very native by its nature for Windows 7,
therefore some issues like reported can be expected plus Microsoft ended mainstream support for Windows 7 on January 13, 2015..

jeffg, do you plan to use any newer Windows on this HW ?
it can help to test it again and make a proper decision.

Post Reply