handbrake aborts using qsv

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
hitd
Posts: 17
Joined: Tue Jul 30, 2019 12:11 am

handbrake aborts using qsv

Post by hitd »

Description of problem or question:
during encoding of movie "Heidi" handbrake aborts, trying to start debuger.
it is a swiss b/w movie from 1952, tried to encode in greyscale mode, because logo of broadcating corporation is in red color and disturbs me.
However, encoding using color mode aborts also.

As a workaround, if i frorce to use CPU only, encoding runs sucessful.


Steps to reproduce the problem (If Applicable):
encode https://heirich.name/Heidi.ts (about 10 GB, link valid until 31.12.2021 ), all audio tracks, 2 pass with turbo 1000 Kbit/s to .mkv



HandBrake version (e.g., 1.0.0):

1.4.1


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

tried also on Win 10, 1709 using other Hardware



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

https://pastebin.com/0jWaCS7i ( Win 10 21H1, Intel 520 GPU )
https://pastebin.com/HvaPysDd ( Win 10 1709, Intel 4600 GPU )
Woodstock
Veteran User
Posts: 4613
Joined: Tue Aug 27, 2013 6:39 am

Re: handbrake aborts using qsv

Post by Woodstock »

Does it abort if you turn off QSV decoding, and just use the QSV encoder?

There are some sources that the QSV hardware decode does not work well on. The software decoding is much more forgiving.
hitd
Posts: 17
Joined: Tue Jul 30, 2019 12:11 am

Re: handbrake aborts using qsv

Post by hitd »

encoding: on, low-power: on, decoding: off ---> successful encoding, no abort
acivity log for this encoding: https://pastebin.com/9SJqennz

however, funny is, that it seems to me, because i run a 2 pass encoding, the first pass in turbo mode always run successful.

I will do some additional tests ( encoding Version 1.2.2 ) and qsv decoding without encoding.
hitd
Posts: 17
Joined: Tue Jul 30, 2019 12:11 am

Re: handbrake aborts using qsv

Post by hitd »

next test: encoding off, decoding on (both) ----> encoding until about 99% on 2nd pass, then abort
activity log for this encoding: https://pastebin.com/228MtjRz
hitd
Posts: 17
Joined: Tue Jul 30, 2019 12:11 am

Re: handbrake aborts using qsv

Post by hitd »

next test: gone back to 1.2.2 ---> runs fine, succsessfull encoding via Intel qsv, encoding: on, decoding: on (both), no abort
seems to me bug comes in on the way from 1.2.2 to 1.4.1
activity log for this encoding: https://pastebin.com/Y2w1Ga1t

Installed visual Studio 2019 community, trying to compile 1.4.1 via IDE and run in debug mode --> fails
1st problem: dll hb.dll could not be loaded, because it doesn't exist. VS 2019 creates a handbrake.dll, but not hb.dll
2nd problem: creating .msi installer fails. destination of compiled code is /debug/ or /release/ directory, but wix is searching not there for code.
rollin_eng
Veteran User
Posts: 4836
Joined: Wed May 04, 2011 11:06 pm

Re: handbrake aborts using qsv

Post by rollin_eng »

hitd wrote: Sun Sep 05, 2021 7:26 am next test: gone back to 1.2.2 ---> runs fine, succsessfull encoding via Intel qsv, encoding: on, decoding: on (both), no abort
seems to me bug comes in on the way from 1.2.2 to 1.4.1
activity log for this encoding: https://pastebin.com/Y2w1Ga1t

Installed visual Studio 2019 community, trying to compile 1.4.1 via IDE and run in debug mode --> fails
1st problem: dll hb.dll could not be loaded, because it doesn't exist. VS 2019 creates a handbrake.dll, but not hb.dll
2nd problem: creating .msi installer fails. destination of compiled code is /debug/ or /release/ directory, but wix is searching not there for code.
Your log says you are using x264.

[01:19:24] + encoder: H.264 (libx264)
rollin_eng
Veteran User
Posts: 4836
Joined: Wed May 04, 2011 11:06 pm

Re: handbrake aborts using qsv

Post by rollin_eng »

hitd
Posts: 17
Joined: Tue Jul 30, 2019 12:11 am

Re: handbrake aborts using qsv

Post by hitd »

Thanks for the hint.
Tried compile hb.dll on current openSUSE tumbleweed ---> fails during bulding toolchain, couldn't check why yet ( near compiling mpfr )
Tried compile hb.dll on current Centos 8 stream ---> compiles fine.

Hints for Centos 8 stream: install spax as replacement for not existent pax, enable Powertools repository ( for meson, ninja-build, nasm ), use python36 instead of not existing python.

Will try to reproduce abort in a debug environment. Will need some time, i think.
hitd
Posts: 17
Joined: Tue Jul 30, 2019 12:11 am

Re: handbrake aborts using qsv

Post by hitd »

Seems to me, that aborting only happen on a HD source ( 1080 not really tested, most files are 720p format ). However, 576 files encode and decode using qsv without abort.
hitd
Posts: 17
Joined: Tue Jul 30, 2019 12:11 am

Re: handbrake aborts using qsv

Post by hitd »

Made a short version ( 1st minute only ) of the movie picture and upload it ( https://heirich.name/Heidi_1min.ts ) ( about 100 MByte ). Same problem as the whole movie.

However, i found additional that abort of handbrake only happens if encoding via 2 pass encoding ( no matter if turbo mode or not ). If encoding only in one pass, encoding runs fine even if decoding and encoding is enabled to use qsv.
rollin_eng
Veteran User
Posts: 4836
Joined: Wed May 04, 2011 11:06 pm

Re: handbrake aborts using qsv

Post by rollin_eng »

Can you please post your logs?
hitd
Posts: 17
Joined: Tue Jul 30, 2019 12:11 am

Re: handbrake aborts using qsv

Post by hitd »

rollin_eng wrote: Sun Sep 05, 2021 10:18 am Your log says you are using x264.

[01:19:24] + encoder: H.264 (libx264)
Sorry, not very familiar with handbrake

This is encoder: H.264 (Intel Media SDK), disabled decoder via qsv, encodes fine without abort

https://pastebin.com/wt9L8mYY
hitd
Posts: 17
Joined: Tue Jul 30, 2019 12:11 am

Re: handbrake aborts using qsv

Post by hitd »

rollin_eng wrote: Sun Sep 12, 2021 6:36 pm Can you please post your logs?
additional note: this is done with a new compiled hb.dll using --enable-fdk-aac, but unchanged source

This is a encoding of the first minute of "Heidi" movie (720p).

with 2 pass, without turbo: https://pastebin.com/CAQ1vS9B abort
single pass, but given bitrate 1200 instead RF https://pastebin.com/UnYt0cyf success
encoding in hardware https://pastebin.com/XpMiYBXj success

some other movies 576p or 576i:
WALL-E ( DVD ---> XviD 576i ) --> h264 2 pass https://pastebin.com/8EfR4sAj success
movie "death wish" 2 pass, turbo https://pastebin.com/T9T07Q7A success

Maybe successful encoding of 576 movies doesn't follow the 576 geometry, but encoding of source. Most of them are taken from TV which are broadcasted in MPEG2, because SD TV channels are encoded in MPEG2, my old encoded DVD's are encoded in XviD and AVI mostly.
In both cases log told me, that qsv decoder isn't used.

In summery, i guess: abort only on qsv decoding and software encoding using 2 pass ( with or without turbo ) encoding. Usualy it aborts at start of 2nd pass, but sometimes on finish of 2nd pass or on start of 1st pass too. As a workaround, doing disable of qsv decoder prevents aborts yet for sure.
hitd
Posts: 17
Joined: Tue Jul 30, 2019 12:11 am

Re: handbrake aborts using qsv

Post by hitd »

seems that using qsv encoding switch off qsv decoding for same movie picture.

activity log https://pastebin.com/QcUa1Ktr succesfuk qsv encoding told me, thas software decoder for h264 is used.
Post Reply