Handbrake hangs when encoding h265 QS

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.
Locked
Deleted User 47292

Handbrake hangs when encoding h265 QS

Post by Deleted User 47292 »

Description of problem or question:
When I try to encode h265 QS with handbrake, 99% of the times it encodes normally and then just hangs (it's still running, but not encoding and elapsed counter still goes on)




Steps to reproduce the problem (If Applicable):
Tried downloading the Nighty, same issues, tried different files, updated gpu drivers, still the same result



HandBrake version (e.g., 1.0.0):
1.3.3



Operating system and version (e.g., Ubuntu 16.04 LTS, macOS 10.13 High Sierra, Windows 10 Creators Update):
Windows 10 2004 Pro 64 bit



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

Code: Select all

HandBrake 1.3.3 (2020061300)
OS: Microsoft Windows NT 10.0.19041.0
CPU: Intel(R) Core(TM) i3-8109U CPU @ 3.00GHz
Ram: 8057 MB, 
GPU Information:
  Intel(R) Iris(R) Plus Graphics 655 - 26.20.100.8141
Screen: 1920x1080
Temp Dir: C:\Users\Idan\AppData\Local\Temp\
Install Dir: C:\Program Files\HandBrake
Data Dir: C:\Users\Idan\AppData\Roaming\HandBrake

-------------------------------------------


# Starting Encode ...

[12:42:16] base preset: TV
[12:42:16] hb_init: starting libhb thread
[12:42:16] Starting work at: Thu Jul 30 12:42:16 2020
[12:42:16] 1 job(s) to process
[12:42:16] json job:
{
  "Audio": {
    "AudioList": [
      {
        "DRC": 0.0,
        "Encoder": "copy:dtshd",
        "Gain": 0.0,
        "Mixdown": -1,
        "NormalizeMixLevel": false,
        "Samplerate": 0,
        "Name": "DTS-HD Master Audio / 5.1 / 48 kHz / 3603 kbps / 24-bit",
        "Track": 0,
        "DitherMethod": 0
      }
    ],
    "CopyMask": [
      "copy:aac",
      "copy:ac3",
      "copy:dtshd",
      "copy:dts",
      "copy:eac3",
      "copy:flac",
      "copy:mp3",
      "copy:truehd"
    ],
    "FallbackEncoder": "ac3"
  },
  "Destination": {
    "ChapterList": [],
    "ChapterMarkers": false,
    "AlignAVStart": false,
    "File": "C:\\Users\\Idan\\Downloads\\The Good Place - S01e01 - Everything Is Fine-1.mkv",
    "Mp4Options": {
      "IpodAtom": false,
      "Mp4Optimize": false
    },
    "Mux": "av_mkv"
  },
  "Filters": {
    "FilterList": [
      {
        "ID": 12,
        "Settings": {
          "crop-bottom": "0",
          "crop-left": "0",
          "crop-right": "0",
          "crop-top": "0",
          "height": "1080",
          "width": "1920"
        }
      },
      {
        "ID": 6,
        "Settings": {
          "mode": "1"
        }
      }
    ]
  },
  "PAR": {
    "Num": 1,
    "Den": 1
  },
  "Metadata": {},
  "SequenceID": 0,
  "Source": {
    "Angle": 1,
    "Range": {
      "Type": "chapter",
      "Start": 1,
      "End": 4
    },
    "Title": 1,
    "Path": "C:\\Users\\Idan\\Downloads\\The Good Place - S01E01 - Everything is Fine.mkv"
  },
  "Subtitle": {
    "Search": {
      "Burn": false,
      "Default": false,
      "Enable": false,
      "Forced": false
    },
    "SubtitleList": []
  },
  "Video": {
    "Encoder": "qsv_h265_10bit",
    "Level": "auto",
    "Bitrate": 6500,
    "TwoPass": false,
    "Turbo": false,
    "ColorMatrixCode": 0,
    "Options": "",
    "Preset": "quality",
    "Profile": "auto",
    "QSV": {
      "Decode": true,
      "AsyncDepth": 0
    }
  }
}
[12:42:16] CPU: Intel(R) Core(TM) i3-8109U CPU @ 3.00GHz
[12:42:16]  - Intel microarchitecture Kaby Lake
[12:42:16]  - logical processor count: 4
[12:42:16] Intel Quick Sync Video support: yes
[12:42:16]  - Intel Media SDK hardware: API 1.32 (minimum: 1.3)
[12:42:16]  - H.264 encoder: yes
[12:42:16]     - preferred implementation: hardware (any) via D3D11
[12:42:16]     - capabilities (hardware):  breftype icq+la+i+downs vsinfo opt1 opt2+mbbrc+extbrc+trellis+ib_adapt+nmpslice
[12:42:16]  - H.265 encoder: yes (8bit: yes, 10bit: yes)
[12:42:16]     - preferred implementation: hardware (any) via D3D11
[12:42:16]     - capabilities (hardware):  bpyramid icq vsinfo opt1
[12:42:16] hb_scan: path=C:\Users\Idan\Downloads\The Good Place - S01E01 - Everything is Fine.mkv, title_index=1
udfread ERROR: ECMA 167 Volume Recognition failed
src/libbluray/disc/disc.c:323: failed opening UDF image C:\Users\Idan\Downloads\The Good Place - S01E01 - Everything is Fine.mkv
src/libbluray/disc/disc.c:424: error opening file BDMV\index.bdmv
src/libbluray/disc/disc.c:424: error opening file BDMV\BACKUP\index.bdmv
src/libbluray/bluray.c:2585: nav_get_title_list(C:\Users\Idan\Downloads\The Good Place - S01E01 - Everything is Fine.mkv\) failed
[12:42:16] bd: not a bd - trying as a stream/file instead
libdvdnav: Using dvdnav version 6.0.1
libdvdread: Encrypted DVD support unavailable.
libdvdread:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.IFO failed
libdvdread:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.BUP failed
libdvdread: Can't open file VIDEO_TS.IFO.
libdvdnav: vm: failed to read VIDEO_TS.IFO
[12:42:16] dvd: not a dvd - trying as a stream/file instead
Input #0, matroska,webm, from 'C:\Users\Idan\Downloads\The Good Place - S01E01 - Everything is Fine.mkv':
  Metadata:
    encoder         : libebml v1.3.6 + libmatroska v1.4.9
    creation_time   : 2018-11-05T21:11:08.000000Z
  Duration: 00:26:16.00, start: 89.089000, bitrate: 27811 kb/s
    Chapter #0:0: start 0.000000, end 505.171000
    Metadata:
      title           : Chapter 1
    Chapter #0:1: start 505.171000, end 878.294000
    Metadata:
      title           : Chapter 2
    Chapter #0:2: start 878.294000, end 1256.922000
    Metadata:
      title           : Chapter 3
    Chapter #0:3: start 1256.922000, end 1665.088000
    Metadata:
      title           : Chapter 4
    Stream #0:0(eng): Video: h264 (High), yuv420p(tv, bt709, progressive), 1920x1080 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc (default)
    Metadata:
      title           : MPEG-4 AVC Video / 24134 kbps / 1080p / 23.976 fps / 16:9 / High Profile 4.1
      BPS-eng         : 24132739
      DURATION-eng    : 00:26:15.991000000
      NUMBER_OF_FRAMES-eng: 37786
      NUMBER_OF_BYTES-eng: 4754122572
      _STATISTICS_WRITING_APP-eng: mkvmerge v28.2.0 ('The Awakening') 64-bit
      _STATISTICS_WRITING_DATE_UTC-eng: 2018-11-05 21:11:08
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
    Stream #0:1(eng): Audio: dts (DTS-HD MA), 48000 Hz, 5.1(side), s32p (24 bit) (default)
    Metadata:
      title           : DTS-HD Master Audio / 5.1 / 48 kHz / 3603 kbps / 24-bit
      BPS-eng         : 3603273
      DURATION-eng    : 00:26:15.989000000
      NUMBER_OF_FRAMES-eng: 147749
      NUMBER_OF_BYTES-eng: 709839936
      _STATISTICS_WRITING_APP-eng: mkvmerge v28.2.0 ('The Awakening') 64-bit
      _STATISTICS_WRITING_DATE_UTC-eng: 2018-11-05 21:11:08
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
    Stream #0:2(eng): Subtitle: hdmv_pgs_subtitle, 1920x1080
    Metadata:
      title           : SDH
      BPS-eng         : 74368
      DURATION-eng    : 00:25:22.813000000
      NUMBER_OF_FRAMES-eng: 1098
      NUMBER_OF_BYTES-eng: 14156225
      _STATISTICS_WRITING_APP-eng: mkvmerge v28.2.0 ('The Awakening') 64-bit
      _STATISTICS_WRITING_DATE_UTC-eng: 2018-11-05 21:11:08
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
[12:42:16] scan: decoding previews for title 1
[12:42:16] scan: audio 0x1: dca, rate=48000Hz, bitrate=1 English (DTS-HD MA) (5.1 ch)
[12:42:17] scan: 10 previews, 1920x1080, 23.976 fps, autocrop = 0/0/0/0, aspect 16:9, PAR 1:1
[12:42:17] scan: supported video decoders: avcodec qsv
[12:42:17] libhb: scan thread found 1 valid title(s)
[12:42:17] Starting Task: Encoding Pass
[12:42:17] Skipping crop/scale filter
[12:42:17] job configuration:
[12:42:17]  * source
[12:42:17]    + C:\Users\Idan\Downloads\The Good Place - S01E01 - Everything is Fine.mkv
[12:42:17]    + title 1, chapter(s) 1 to 4
[12:42:17]    + container: matroska,webm
[12:42:17]    + data rate: 27811 kbps
[12:42:17]  * destination
[12:42:17]    + C:\Users\Idan\Downloads\The Good Place - S01e01 - Everything Is Fine-1.mkv
[12:42:17]    + container: Matroska (libavformat)
[12:42:17]  * video track
[12:42:17]    + decoder: h264_qsv
[12:42:17]    + filter
[12:42:17]      + Framerate Shaper (mode=1)
[12:42:17]        + frame rate: 23.976 fps -> constant 23.976 fps
[12:42:17]    + Output geometry
[12:42:17]      + storage dimensions: 1920 x 1080
[12:42:17]      + pixel aspect ratio: 1 : 1
[12:42:17]      + display dimensions: 1920 x 1080
[12:42:17]    + encoder: H.265 10-bit (Intel Media SDK)
[12:42:17]      + preset:  quality
[12:42:17]      + profile: auto
[12:42:17]      + level:   auto
[12:42:17]      + bitrate: 6500 kbps, pass: 0
[12:42:17]      + color profile: 1-1-1
[12:42:17]  * audio track 1
[12:42:17]    + name: DTS-HD Master Audio / 5.1 / 48 kHz / 3603 kbps / 24-bit
[12:42:17]    + decoder: English (DTS-HD MA) (5.1 ch) (track 1, id 0x1)
[12:42:17]      + samplerate: 48000 Hz
[12:42:17]    + DTS-HD Passthru
[12:42:17] hb_d3d11va_device_check: QSV adapter with id 0 has been found
[12:42:17] sync: expecting 37786 video frames
[12:42:17] encqsvInit: using encode-only path
[12:42:17] encqsvInit: H.265/HEVC Main 10 profile @ level 5.0
[12:42:17] encqsvInit: TargetUsage 1 AsyncDepth 5
[12:42:17] encqsvInit: GopRefDist 3 GopPicSize 24 NumRefFrame 6
[12:42:17] encqsvInit: BFramesMax 2 BRefType off
[12:42:17] encqsvInit: RateControlMethod VBR TargetKbps 6500 MaxKbps 6500 BufferSizeInKB 1625 InitialDelayInKB 812
[12:42:17] sync: first pts video is 0
[12:42:17] sync: "Chapter 1" (1) at frame 1 time 0
[12:42:17] sync: first pts audio 0x1 is 900
[12:42:18] qsv_enc_init: using 'hardware (1) via D3D11' implementation, API: 1.32
[12:49:19] sync: "Chapter 2" (2) at frame 12114 time 45469173
[12:54:36] sync: "Chapter 3" (3) at frame 21060 time 79050221
Error code -21,	hb_qsv_wait_on_sync	605
Woodstock
Veteran User
Posts: 4619
Joined: Tue Aug 27, 2013 6:39 am

Re: Handbrake hangs when encoding h265 QS

Post by Woodstock »

Turn off QSV decode in preferences.

The hardware decoder is not much faster than the software x264 decoder, but it is far less tolerant of "source issues". You probably won't notice the difference in speed, even when using the QSV encoder.
Deleted User 13735

Re: Handbrake hangs when encoding h265 QS

Post by Deleted User 13735 »

After testing it once, I've never used Quicksync again.
Deleted User 47292

Re: Handbrake hangs when encoding h265 QS

Post by Deleted User 47292 »

Woodstock wrote: Thu Jul 30, 2020 6:10 pm Turn off QSV decode in preferences.

The hardware decoder is not much faster than the software x264 decoder, but it is far less tolerant of "source issues". You probably won't notice the difference in speed, even when using the QSV encoder.
Thank you for your suggestion, I tried that, but the issue still persists
Any way I can solve this please?
Deleted User 47292

Re: Handbrake hangs when encoding h265 QS

Post by Deleted User 47292 »

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

Re: Handbrake hangs when encoding h265 QS

Post by Woodstock »

Is it giving the same "Error code -21, hb_qsv_wait_on_sync 605" error message with hardware decoding turned off, or a different error?
Locked