QSV encoding: error or cancellations detected

Archive of historical bug reports.
Please use the GitHub link above to report issues.
Forum rules
*******************************
Please be aware we are now using GitHub for issue tracking and feature requests.
- This section of the forum is now closed to new topics.

*******************************
Post Reply
Mikkel
Posts: 12
Joined: Tue Nov 05, 2013 8:58 pm

QSV encoding: error or cancellations detected

Post by Mikkel »

Hi everybody,


Using H264 QSV I repeatedly get following error "Queue Finished with 1 errors or cancellations detected". This happens for any of all the MKV-files I have. The result is that only a (small) part of the original file gets converted.

I have tried updating the intel graphics drivers but not really getting anywhere, unfortunately.
My CPU is an I74970k if that is relevant :).

Are there anyone who may be able to trace the error? If so I will be very grateful :)

What are the steps to reproduce this problem:
Simply load an MKV-file and use QSV as encoder

What version of HandBrake you are running:
Nightly build: 20170305220226....

What operating system and version and you running (e.g. OSX 10.11, Windows 7, Ubuntu 14):
Windows 10 64-bit

Where did you download HandBrake from? handbrake.fr or somewhere else?
From handbrake.fr

If there was any error, exception or crash report displayed, please copy it and paste it here:
"Queue Finished with 1 errors or cancellations detected"

Please include the scan or encode log:

Code: Select all

 HandBrake Nightly 20170305220226-8e54550-master (2017030101) - 64bit
OS: Microsoft Windows NT 10.0.14393.0 - 64bit
CPU: Intel(R) Core(TM) i7-4790K CPU @ 4.00GHz
Ram: 16259 MB, 
GPU Information:
  Intel(R) HD Graphics 4600 - 20.19.15.4531
  NVIDIA GeForce GTX 970 - 21.21.13.7653
Screen: 1920x1200
Temp Dir: C:\Users\mikke\AppData\Local\Temp\
Install Dir: C:\Program Files\HandBrake Nightly
Data Dir: C:\Users\mikke\AppData\Roaming\HandBrake Team\HandBrake\1.0.3.0

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


# Starting Encode ...

[22:03:49] hb_init: starting libhb thread
[22:03:49] 1 job(s) to process
[22:03:49] json job:
{
  "Audio": {
    "AudioList": [
      {
        "DRC": 0.0,
        "Encoder": 1073743872,
        "Gain": 0.0,
        "Mixdown": -1,
        "NormalizeMixLevel": false,
        "Samplerate": 0,
        "Track": 0,
        "DitherMethod": 0
      },
      {
        "DRC": 0.0,
        "Encoder": 1073750016,
        "Gain": 0.0,
        "Mixdown": -1,
        "NormalizeMixLevel": false,
        "Samplerate": 0,
        "Track": 1,
        "DitherMethod": 0
      }
    ],
    "CopyMask": [
      1073807360,
      1073743872,
      1074003968,
      1073750016,
      1090519040,
      1074790400,
      1074266112,
      1107296256
    ],
    "FallbackEncoder": 2048
  },
  "Destination": {
    "ChapterList": [
      {
        "Name": "Chapter 1"
      },
      {
        "Name": "Chapter 2"
      },
      {
        "Name": "Chapter 3"
      },
      {
        "Name": "Chapter 4"
      },
      {
        "Name": "Chapter 5"
      },
      {
        "Name": "Chapter 6"
      },
      {
        "Name": "Chapter 7"
      },
      {
        "Name": "Chapter 8"
      },
      {
        "Name": "Chapter 9"
      },
      {
        "Name": "Chapter 10"
      },
      {
        "Name": "Chapter 11"
      },
      {
        "Name": "Chapter 12"
      }
    ],
    "ChapterMarkers": true,
    "File": "C:\\Users\\mikke\\Desktop\\AV_QSV_Q20.mp4",
    "Mp4Options": {
      "IpodAtom": false,
      "Mp4Optimize": false
    },
    "Mux": 131072
  },
  "Filters": {
    "FilterList": [
      {
        "ID": 4,
        "Settings": {
          "mode": "7"
        }
      },
      {
        "ID": 3,
        "Settings": {
          "block-height": "16",
          "block-thresh": "40",
          "block-width": "16",
          "filter-mode": "2",
          "mode": "3",
          "motion-thresh": "1",
          "spatial-metric": "2",
          "spatial-thresh": "1"
        }
      },
      {
        "ID": 11,
        "Settings": {
          "crop-bottom": "0",
          "crop-left": "2",
          "crop-right": "0",
          "crop-top": "0",
          "height": "576",
          "width": "718"
        }
      },
      {
        "ID": 6,
        "Settings": {
          "mode": "1"
        }
      }
    ]
  },
  "PAR": {
    "Num": 64,
    "Den": 45
  },
  "Metadata": {},
  "SequenceID": 0,
  "Source": {
    "Angle": 1,
    "Range": {
      "Type": "chapter",
      "Start": 1,
      "End": 12
    },
    "Title": 1,
    "Path": "\\\\MEDIASERVER\\Video\\DVD\\Ace Ventura Pet Detective\\title04.mkv"
  },
  "Subtitle": {
    "Search": {
      "Burn": true,
      "Default": false,
      "Enable": true,
      "Forced": false
    },
    "SubtitleList": [
      {
        "Burn": false,
        "Default": false,
        "Forced": false,
        "ID": 1,
        "Offset": 0,
        "Track": 0
      },
      {
        "Burn": false,
        "Default": false,
        "Forced": false,
        "ID": 2,
        "Offset": 0,
        "Track": 1
      },
      {
        "Burn": false,
        "Default": false,
        "Forced": false,
        "ID": 3,
        "Offset": 0,
        "Track": 2
      },
      {
        "Burn": false,
        "Default": false,
        "Forced": false,
        "ID": 4,
        "Offset": 0,
        "Track": 3
      }
    ]
  },
  "Video": {
    "Encoder": 256,
    "Level": "auto",
    "TwoPass": false,
    "Turbo": false,
    "ColorMatrixCode": 0,
    "Options": "",
    "Preset": "balanced",
    "Profile": "auto",
    "Quality": 20.0,
    "OpenCL": false,
    "HWDecode": false,
    "QSV": {
      "Decode": true,
      "AsyncDepth": 0
    }
  }
}
[22:03:49] CPU: Intel(R) Core(TM) i7-4790K CPU @ 4.00GHz
[22:03:49]  - Intel microarchitecture Haswell
[22:03:49]  - logical processor count: 8
[22:03:49] Intel Quick Sync Video support: yes
[22:03:49]  - Intel Media SDK hardware: API 1.19 (minimum: 1.3)
[22:03:49]  - H.264 encoder: yes
[22:03:49]     - preferred implementation: hardware (any)
[22:03:49]     - capabilities (hardware):  breftype icq+la+i+downs vsinfo opt1 opt2+mbbrc+extbrc+trellis+ib_adapt+nmpslice
[22:03:49]  - H.265 encoder: no
[22:03:49] hb_scan: path=\\MEDIASERVER\Video\DVD\Ace Ventura Pet Detective\title04.mkv, title_index=1
udfread ERROR: ECMA 167 Volume Recognition failed
src/libbluray/disc/disc.c:274: failed opening UDF image \\MEDIASERVER\Video\DVD\Ace Ventura Pet Detective\title04.mkv
src/libbluray/disc/disc.c:352: error opening file BDMV\index.bdmv
src/libbluray/disc/disc.c:352: error opening file BDMV\BACKUP\index.bdmv
[22:03:49] bd: not a bd - trying as a stream/file instead
libdvdnav: Using dvdnav version 5.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
[22:03:49] dvd: not a dvd - trying as a stream/file instead
Input #0, matroska,webm, from '\\MEDIASERVER\Video\DVD\Ace Ventura Pet Detective\title04.mkv':
  Duration: 01:22:27.48, start: 0.000000, bitrate: N/A
    Chapter #0:0: start 0.000000, end 332.800000
    Metadata:
      title           : Chapter 01
    Chapter #0:1: start 332.800000, end 789.880000
    Metadata:
      title           : Chapter 02
    Chapter #0:2: start 789.880000, end 1318.200000
    Metadata:
      title           : Chapter 03
    Chapter #0:3: start 1318.200000, end 1798.160000
    Metadata:
      title           : Chapter 04
    Chapter #0:4: start 1798.160000, end 2219.360000
    Metadata:
      title           : Chapter 05
    Chapter #0:5: start 2219.360000, end 2694.640000
    Metadata:
      title           : Chapter 06
    Chapter #0:6: start 2694.640000, end 3017.560000
    Metadata:
      title           : Chapter 07
    Chapter #0:7: start 3017.560000, end 3448.640000
    Metadata:
      title           : Chapter 08
    Chapter #0:8: start 3448.640000, end 3857.360000
    Metadata:
      title           : Chapter 09
    Chapter #0:9: start 3857.360000, end 4215.120000
    Metadata:
      title           : Chapter 10
    Chapter #0:10: start 4215.120000, end 4716.920000
    Metadata:
      title           : Chapter 11
    Chapter #0:11: start 4716.920000, end 4947.480000
    Metadata:
      title           : Chapter 12
    Stream #0:0(eng): Video: mpeg2video (Main)
      yuv420p, tv, bt470bg/bt470bg/bt470bg
      720x576 [PAR 64:45 DAR 16:9], 7000 kb/s, PAR 64:45 DAR 16:9
      25 fps, 1k tbn
    Metadata:
      BPS-eng         : 7000000
      DURATION-eng    : 01:22:27.480000000
      NUMBER_OF_FRAMES-eng: 123687
      NUMBER_OF_BYTES-eng: 4329045008
      SOURCE_ID-eng   : 0100E0
      _STATISTICS_WRITING_APP-eng: MakeMKV v1.10.4 win(x64-release)
      _STATISTICS_WRITING_DATE_UTC-eng: 2017-03-05 10:35:28
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID
    Stream #0:1(eng): Audio: ac3
      48000 Hz, 5.1, fltp, 448 kb/s (default)
    Metadata:
      title           : Surround 5.1
      BPS-eng         : 448000
      DURATION-eng    : 01:22:27.456000000
      NUMBER_OF_FRAMES-eng: 154608
      NUMBER_OF_BYTES-eng: 277057536
      SOURCE_ID-eng   : 0180BD
      _STATISTICS_WRITING_APP-eng: MakeMKV v1.10.4 win(x64-release)
      _STATISTICS_WRITING_DATE_UTC-eng: 2017-03-05 10:35:28
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID
    Stream #0:2(eng): Audio: dts (DTS)
      48000 Hz, 5.1, fltp, 768 kb/s
    Metadata:
      title           : Surround 5.1
      BPS-eng         : 754500
      DURATION-eng    : 01:22:27.445333333
      NUMBER_OF_FRAMES-eng: 463823
      NUMBER_OF_BYTES-eng: 466605938
      SOURCE_ID-eng   : 0189BD
      _STATISTICS_WRITING_APP-eng: MakeMKV v1.10.4 win(x64-release)
      _STATISTICS_WRITING_DATE_UTC-eng: 2017-03-05 10:35:28
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID
    Stream #0:3(dan): Subtitle: dvd_subtitle (default)
    Metadata:
      BPS-eng         : 4229
      DURATION-eng    : 01:21:07.954844444
      NUMBER_OF_FRAMES-eng: 621
      NUMBER_OF_BYTES-eng: 2573448
      SOURCE_ID-eng   : 0120BD
      _STATISTICS_WRITING_APP-eng: MakeMKV v1.10.4 win(x64-release)
      _STATISTICS_WRITING_DATE_UTC-eng: 2017-03-05 10:35:28
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID
    Stream #0:4(nor): Subtitle: dvd_subtitle
    Metadata:
      BPS-eng         : 4167
      DURATION-eng    : 01:21:05.591822222
      NUMBER_OF_FRAMES-eng: 659
      NUMBER_OF_BYTES-eng: 2534800
      SOURCE_ID-eng   : 0121BD
      _STATISTICS_WRITING_APP-eng: MakeMKV v1.10.4 win(x64-release)
      _STATISTICS_WRITING_DATE_UTC-eng: 2017-03-05 10:35:28
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID
    Stream #0:5(fin): Subtitle: dvd_subtitle
    Metadata:
      BPS-eng         : 4283
      DURATION-eng    : 01:21:05.591822222
      NUMBER_OF_FRAMES-eng: 659
      NUMBER_OF_BYTES-eng: 2605316
      SOURCE_ID-eng   : 0122BD
      _STATISTICS_WRITING_APP-eng: MakeMKV v1.10.4 win(x64-release)
      _STATISTICS_WRITING_DATE_UTC-eng: 2017-03-05 10:35:28
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID
    Stream #0:6(swe): Subtitle: dvd_subtitle
    Metadata:
      BPS-eng         : 4153
      DURATION-eng    : 01:21:04.751466666
      NUMBER_OF_FRAMES-eng: 658
      NUMBER_OF_BYTES-eng: 2525940
      SOURCE_ID-eng   : 0123BD
      _STATISTICS_WRITING_APP-eng: MakeMKV v1.10.4 win(x64-release)
      _STATISTICS_WRITING_DATE_UTC-eng: 2017-03-05 10:35:28
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID
[22:03:49] scan: decoding previews for title 1
[22:03:49] scan: audio 0x1: ac3, rate=48000Hz, bitrate=448000 English (AC3) (5.1 ch)
[22:03:49] scan: audio 0x2: dca, rate=48000Hz, bitrate=768000 English (DTS) (5.1 ch)
[22:03:49] scan: 10 previews, 720x576, 25.000 fps, autocrop = 0/0/2/0, aspect 16:9, PAR 64:45
[22:03:50] libhb: scan thread found 1 valid title(s)
[22:03:50] Skipping subtitle scan.  No suitable subtitle tracks.
[22:03:50] starting job
[22:03:50] decomb filter thread started for segment 0
[22:03:50] decomb filter thread started for segment 1
[22:03:50] decomb filter thread started for segment 2
[22:03:50] decomb check thread started for segment 3
[22:03:50] decomb filter thread started for segment 4
[22:03:50] decomb filter thread started for segment 5
[22:03:50] decomb filter thread started for segment 6
[22:03:50] mask filter thread started for segment 4
[22:03:50] decomb check thread started for segment 0
[22:03:50] decomb check thread started for segment 1
[22:03:50] decomb check thread started for segment 2
[22:03:50] decomb filter thread started for segment 3
[22:03:50] decomb check thread started for segment 4
[22:03:50] decomb check thread started for segment 5
[22:03:50] decomb check thread started for segment 6
[22:03:50] decomb check thread started for segment 7
[22:03:50] mask dilate thread started for segment 4
[22:03:50] mask filter thread started for segment 1
[22:03:50] mask dilate thread started for segment 7
[22:03:50] mask filter thread started for segment 3
[22:03:50] decomb filter thread started for segment 7
[22:03:50] mask filter thread started for segment 5
[22:03:50] mask filter thread started for segment 6
[22:03:50] mask filter thread started for segment 7
[22:03:50] mask erode thread started for segment 0
[22:03:50] mask erode thread started for segment 1
[22:03:50] mask erode thread started for segment 2
[22:03:50] mask erode thread started for segment 3
[22:03:50] mask erode thread started for segment 4
[22:03:50] mask erode thread started for segment 5
[22:03:50] mask erode thread started for segment 6
[22:03:50] mask erode thread started for segment 7
[22:03:50] mask dilate thread started for segment 0
[22:03:50] job configuration:
[22:03:50]  * source
[22:03:50]    + \\MEDIASERVER\Video\DVD\Ace Ventura Pet Detective\title04.mkv
[22:03:50] mask dilate thread started for segment 1
[22:03:50]    + title 1, chapter(s) 1 to 12
[22:03:50]    + container: matroska,webm
[22:03:50]  * destination
[22:03:50]    + C:\Users\mikke\Desktop\AV_QSV_Q20.mp4
[22:03:50]    + container: MPEG-4 (libavformat)
[22:03:50]      + chapter markers
[22:03:50]  * video track
[22:03:50]    + decoder: mpeg2video
[22:03:50]      + bitrate 7000 kbps
[22:03:50]    + filters
[22:03:50] mask dilate thread started for segment 2
[22:03:50] mask dilate thread started for segment 3
[22:03:50]      + Comb Detect (mode=3:spatial-metric=2:motion-thresh=1:spatial-thresh=1:filter-mode=2:block-thresh=40:block-width=16:block-height=16)
[22:03:50]      + Decomb (mode=39)
[22:03:50] mask filter thread started for segment 0
[22:03:50]      + Framerate Shaper (mode=1)
[22:03:50]        + frame rate: 25.000 fps -> constant 25.000 fps
[22:03:50] mask dilate thread started for segment 5
[22:03:50]      + Crop and Scale (width=718:height=576:crop-top=0:crop-bottom=0:crop-left=2:crop-right=0)
[22:03:50]        + source: 720 * 576, crop (0/0/2/0): 718 * 576, scale: 718 * 576
[22:03:50]    + Output geometry
[22:03:50]      + storage dimensions: 718 x 576
[22:03:50]      + pixel aspect ratio: 64 : 45
[22:03:50]      + display dimensions: 1021 x 576
[22:03:50] mask dilate thread started for segment 6
[22:03:50]    + encoder: H.264 (Intel Media SDK)
[22:03:50]      + preset:  balanced
[22:03:50]      + profile: auto
[22:03:50]      + level:   auto
[22:03:50]      + quality: 20.00 (ICQ)
[22:03:50]  * subtitle track 1, Danish (track 0, id 0x3) Picture [VOBSUB] -> Passthrough
[22:03:50]  * subtitle track 2, Norwegian (track 1, id 0x4) Picture [VOBSUB] -> Passthrough
[22:03:50] mask filter thread started for segment 2
[22:03:50]  * subtitle track 3, Finnish (track 2, id 0x5) Picture [VOBSUB] -> Passthrough
[22:03:50]  * subtitle track 4, Swedish (track 3, id 0x6) Picture [VOBSUB] -> Passthrough
[22:03:50]  * audio track 1
[22:03:50]    + decoder: English (AC3) (5.1 ch) (track 1, id 0x1)
[22:03:50]      + bitrate: 448 kbps, samplerate: 48000 Hz
[22:03:50]    + AC3 Passthru
[22:03:50]  * audio track 2
[22:03:50]    + decoder: English (DTS) (5.1 ch) (track 2, id 0x2)
[22:03:50]      + bitrate: 768 kbps, samplerate: 48000 Hz
[22:03:50] yadif thread started for segment 0
[22:03:50]    + DTS Passthru
[22:03:50] yadif thread started for segment 1
[22:03:50] yadif thread started for segment 2
[22:03:50] yadif thread started for segment 3
[22:03:50] yadif thread started for segment 4
[22:03:50] yadif thread started for segment 5
[22:03:50] yadif thread started for segment 6
[22:03:50] yadif thread started for segment 7
[22:03:50] sync: expecting 123687 video frames
[22:03:50] encqsvInit: using encode-only path
[22:03:50] encqsvInit: H.264/AVC High profile @ level 3.0
[22:03:50] encqsvInit: TargetUsage 4 AsyncDepth 5
[22:03:50] encqsvInit: GopRefDist 3 GopPicSize 25 NumRefFrame 1
[22:03:50] encqsvInit: BFramesMax 2 BRefType off
[22:03:50] encqsvInit: RateControlMethod ICQ ICQQuality 20
[22:03:50] sync: first pts video is 0
[22:03:50] sync: first pts audio 0x1 is 3600
[22:03:50] sync: first pts audio 0x2 is 3600
[22:03:50] sync: "Chapter 1" (1) at frame 4 time 14400
[22:03:50] qsv_enc_init: using 'hardware (3)' implementation, API: 1.19
[22:03:53] sync: first pts subtitle 0x4 is 5479200
[22:03:53] sync: first pts subtitle 0x5 is 5479200
[22:03:53] sync: first pts subtitle 0x6 is 5482800
[22:03:53] sync: first pts subtitle 0x3 is 5536800
[22:04:08] sync: "Chapter 2" (2) at frame 8321 time 29955600
Error code -17,	hb_qsv_wait_on_sync	602
[22:04:10] work: average encoding speed for job is 454.735229 fps
[22:04:10] comb detect: heavy 202 | light 508 | uncombed 7836 | total 8546
[22:04:11] decomb: deinterlaced 202 | blended 508 | unfiltered 7829 | total 8539
[22:04:11] vfr: 8532 frames output, 0 dropped and 1 duped for CFR/PFR
[22:04:11] vfr: lost time: 0 (0 frames)
[22:04:11] vfr: gained time: 0 (0 frames) (0 not accounted for)
[22:04:11] ac3-decoder done: 10796 frames, 0 decoder errors
[22:04:11] dca-decoder done: 32388 frames, 0 decoder errors
[22:04:11] mpeg2video-decoder done: 8620 frames, 0 decoder errors
[22:04:11] sync: got 8583 frames, 123687 expected
[22:04:11] sync: framerate min 12.500 fps, max 25.000 fps, avg 24.997 fps
[22:04:11] mux: track 0, 8510 frames, 96894202 bytes, 2257.03 kbps, fifo 1024
[22:04:11] mux: track 1, 10730 frames, 19228160 bytes, 447.90 kbps, fifo 1024
[22:04:11] mux: track 2, 32189 frames, 32382134 bytes, 754.30 kbps, fifo 4096
[22:04:11] mux: track 3, 30 frames, 116008 bytes, 2.70 kbps, fifo 16
[22:04:11] mux: track 4, 31 frames, 107332 bytes, 2.50 kbps, fifo 16
[22:04:11] mux: track 5, 31 frames, 107296 bytes, 2.50 kbps, fifo 16
[22:04:11] mux: track 6, 31 frames, 108356 bytes, 2.52 kbps, fifo 16
[22:04:11] libhb: work result = 4

# Encode Completed ...

 
Last edited by Mikkel on Wed Mar 08, 2017 9:20 pm, edited 1 time in total.
Mikkel
Posts: 12
Joined: Tue Nov 05, 2013 8:58 pm

Re: QSV encoding: error or cancellations detected

Post by Mikkel »

Looking through the code I can see following error:
Error code -17, hb_qsv_wait_on_sync 602

I have no idea what it means though.
Dave_O
Posts: 1
Joined: Fri Mar 10, 2017 7:36 pm

Re: QSV encoding: error or cancellations detected

Post by Dave_O »

I just started to use QSV today. CPU 4790K, MB Asus Z-87 Pro. When QSV is selected, the encode fails 1/4 to 1/3 of the way through.

log at http://pastebin.com/ZGtnRnGS


--EDIT--

Tried nightly build, same problem. Win 10 64 bit
Mikkel
Posts: 12
Joined: Tue Nov 05, 2013 8:58 pm

Re: QSV encoding: error or cancellations detected

Post by Mikkel »

*bump* Hoping someone may have a solution to this issue :)
maxim_d33
Bright Spark User
Posts: 173
Joined: Mon Mar 21, 2011 12:02 pm

Re: QSV encoding: error or cancellations detected

Post by maxim_d33 »

can you pls share any of input video ?
nd4spd
Posts: 7
Joined: Sat Mar 22, 2014 7:24 am

Re: QSV encoding: error or cancellations detected

Post by nd4spd »

Hi Mikkel,

error code -17 (MFX_ERR_DEVICE_FAILED) means a device operation failure which occurs during initialisation of the decoder.

solution:
- i assume, your monitor is connected to your nvida gpu. connect your intel gpu to your monitor in addition to see if it makes any difference
- install one of the newest drivers (v20.19.15.4568 or v20.19.15.4624 beta)
- the best way to verify if qsv is (generally) working, is running mediasdk system analyzer. This tool is from intel and comes with the
media sdk 2016 R2 (newest version) and can be downloaded from intel. It shows the supported api version of your hardware (should be marked
supported on hw up to 1.19) and more importantly the state of your intel gpu, which should be "active" and not "0" or sth else.
Mikkel
Posts: 12
Joined: Tue Nov 05, 2013 8:58 pm

Re: QSV encoding: error or cancellations detected

Post by Mikkel »

Hi both of you,

Not sure why I did not get an e-mail about your replies. ANyway I will try the suggestions by nd4spd.
For maxim_d33 here: https://1drv.ms/u/s!Am4CDwbz-dfcgeAH-lqnuJGnI930Gw
nd4spd
Posts: 7
Joined: Sat Mar 22, 2014 7:24 am

Re: QSV encoding: error or cancellations detected

Post by nd4spd »

If you dont want to have both gpus connected to your monitor, you can take a look at your
motherboards bios. In my case (z87 board) theres is an option called "multi monitor support" which
initializes both gpus and lets them stay active, even if only one gpu is connected to the monitor.
As a result you can benefit from qucksync even though your dgpu is no connected to the monitor
Mikkel
Posts: 12
Joined: Tue Nov 05, 2013 8:58 pm

Re: QSV encoding: error or cancellations detected

Post by Mikkel »

nd4spd wrote: Fri Mar 24, 2017 9:45 am Hi Mikkel,

error code -17 (MFX_ERR_DEVICE_FAILED) means a device operation failure which occurs during initialisation of the decoder.

solution:
- i assume, your monitor is connected to your nvida gpu. connect your intel gpu to your monitor in addition to see if it makes any difference
- install one of the newest drivers (v20.19.15.4568 or v20.19.15.4624 beta)
- the best way to verify if qsv is (generally) working, is running mediasdk system analyzer. This tool is from intel and comes with the
media sdk 2016 R2 (newest version) and can be downloaded from intel. It shows the supported api version of your hardware (should be marked
supported on hw up to 1.19) and more importantly the state of your intel gpu, which should be "active" and not "0" or sth else.
Hello again,

Tried your suggestions. Unfortunately the SDK reports support for v 1.19 and is active.


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

Re: QSV encoding: error or cancellations detected

Post by maxim_d33 »

thanks Mikkel for the sample
so far I could not reproduce -17 but still have a couple of options to try.
Mikkel
Posts: 12
Joined: Tue Nov 05, 2013 8:58 pm

Re: QSV encoding: error or cancellations detected

Post by Mikkel »

I wonder if it is related to longer files with chapters. Will upload another sample later
maxim_d33
Bright Spark User
Posts: 173
Joined: Mon Mar 21, 2011 12:02 pm

Re: QSV encoding: error or cancellations detected

Post by maxim_d33 »

good, because this sample does not allow to reproduce the problem
Mikkel
Posts: 12
Joined: Tue Nov 05, 2013 8:58 pm

Re: QSV encoding: error or cancellations detected

Post by Mikkel »

maxim_d33 wrote: Sun Mar 26, 2017 1:59 pm good, because this sample does not allow to reproduce the problem
Hi maxim_d33,

Here is another sample: https://1drv.ms/u/s!Am4CDwbz-dfcgeBUSL_vTaeZo-cLLA

I have a feeling it may be related to very high frame rates. I managed to convert a bluray where the framerate was generally < 200 fps but with this sample the frame rate is extremely high (> 400 fps).


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

Re: QSV encoding: error or cancellations detected

Post by maxim_d33 »

@Mikkel
I am using your second sample now and running 1000 times encode but still cannot see -17 error on pretty much the same HW and driver version.

allow me to double check : with this https://1drv.ms/u/s!Am4CDwbz-dfcgeBUSL_vTaeZo-cLLA sample you have -17 each run,
can you pls share HB log with this sample ?
Mikkel
Posts: 12
Joined: Tue Nov 05, 2013 8:58 pm

Re: QSV encoding: error or cancellations detected

Post by Mikkel »

maxim_d33 wrote: Thu Mar 30, 2017 3:52 pm @Mikkel
I am using your second sample now and running 1000 times encode but still cannot see -17 error on pretty much the same HW and driver version.

allow me to double check : with this https://1drv.ms/u/s!Am4CDwbz-dfcgeBUSL_vTaeZo-cLLA sample you have -17 each run,
can you pls share HB log with this sample ?
Sure :). And thank you for taking the time to look into it.

Code: Select all

HandBrake 1.0.3 (2017022500) - 64bit
OS: Microsoft Windows NT 10.0.14393.0 - 64bit
CPU: Intel(R) Core(TM) i7-4790K CPU @ 4.00GHz
Ram: 16259 MB, 
GPU Information:
  Intel(R) HD Graphics 4600 - 20.19.15.4531
  NVIDIA GeForce GTX 970 - 21.21.13.7653
Screen: 1920x1200
Temp Dir: C:\Users\mikke\AppData\Local\Temp\
Install Dir: C:\Program Files\HandBrake
Data Dir: C:\Users\mikke\AppData\Roaming\HandBrake Team\HandBrake\1.0.3.0

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


# Starting Encode ...

[21:59:10] hb_init: starting libhb thread
[21:59:10] 1 job(s) to process
[21:59:10] json job:
{
  "Audio": {
    "AudioList": [
      {
        "Bitrate": 160,
        "DRC": 0.0,
        "Encoder": 65536,
        "Gain": 0.0,
        "Mixdown": 4,
        "NormalizeMixLevel": false,
        "Samplerate": 0,
        "Track": 0,
        "DitherMethod": 0
      }
    ],
    "CopyMask": [
      1073807360,
      1073743872,
      1074003968,
      1073750016,
      1090519040,
      1074790400,
      1074266112,
      1107296256
    ],
    "FallbackEncoder": 2048
  },
  "Destination": {
    "ChapterList": [
      {
        "Name": "Chapter 1"
      }
    ],
    "ChapterMarkers": true,
    "File": "\\\\MEDIASERVER\\Video\\temp\\Sample 2-1.m4v",
    "Mp4Options": {
      "IpodAtom": false,
      "Mp4Optimize": false
    },
    "Mux": 131072
  },
  "Filters": {
    "FilterList": [
      {
        "ID": 4,
        "Settings": {
          "mode": "7"
        }
      },
      {
        "ID": 3,
        "Settings": {
          "block-height": "16",
          "block-thresh": "40",
          "block-width": "16",
          "filter-mode": "2",
          "mode": "3",
          "motion-thresh": "1",
          "spatial-metric": "2",
          "spatial-thresh": "1"
        }
      },
      {
        "ID": 11,
        "Settings": {
          "crop-bottom": "42",
          "crop-left": "0",
          "crop-right": "0",
          "crop-top": "42",
          "height": "492",
          "width": "720"
        }
      },
      {
        "ID": 6,
        "Settings": {
          "mode": "2"
        }
      }
    ]
  },
  "PAR": {
    "Num": 16,
    "Den": 15
  },
  "Metadata": {},
  "SequenceID": 0,
  "Source": {
    "Angle": 1,
    "Range": {
      "Type": "chapter",
      "Start": 1,
      "End": 1
    },
    "Title": 1,
    "Path": "D:\\OneDrive\\sample_2.mkv"
  },
  "Subtitle": {
    "Search": {
      "Burn": true,
      "Default": false,
      "Enable": true,
      "Forced": true
    },
    "SubtitleList": []
  },
  "Video": {
    "Encoder": 256,
    "Level": "auto",
    "TwoPass": false,
    "Turbo": false,
    "ColorMatrixCode": 0,
    "Options": "",
    "Preset": "balanced",
    "Profile": "auto",
    "Quality": 20.0,
    "OpenCL": false,
    "HWDecode": false,
    "QSV": {
      "Decode": true,
      "AsyncDepth": 0
    }
  }
}
[21:59:10] CPU: Intel(R) Core(TM) i7-4790K CPU @ 4.00GHz
[21:59:10]  - Intel microarchitecture Haswell
[21:59:10]  - logical processor count: 8
[21:59:10] Intel Quick Sync Video support: yes
[21:59:10]  - Intel Media SDK hardware: API 1.19 (minimum: 1.3)
[21:59:10]  - Intel Media SDK software: API 1.19 (minimum: 1.3)
[21:59:10]  - H.264 encoder: yes
[21:59:10]     - preferred implementation: hardware (any)
[21:59:10]     - capabilities (hardware):  breftype icq+la+i+downs vsinfo opt1 opt2+mbbrc+extbrc+trellis+ib_adapt+nmpslice
[21:59:10]     - capabilities (software):  bpyramid vsinfo opt1 opt2
[21:59:10]  - H.265 encoder: no
[21:59:10] hb_scan: path=D:\OneDrive\sample_2.mkv, title_index=1
udfread ERROR: ECMA 167 Volume Recognition failed
src/libbluray/disc/disc.c:274: failed opening UDF image D:\OneDrive\sample_2.mkv
src/libbluray/disc/disc.c:352: error opening file BDMV\index.bdmv
src/libbluray/disc/disc.c:352: error opening file BDMV\BACKUP\index.bdmv
[21:59:10] bd: not a bd - trying as a stream/file instead
libdvdnav: Using dvdnav version 5.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
[21:59:10] dvd: not a dvd - trying as a stream/file instead
Input #0, matroska,webm, from 'D:\OneDrive\sample_2.mkv':
  Duration: 00:05:00.00, start: 0.000000, bitrate: N/A
    Chapter #0:0: start 0.000000, end 299.968000
    Metadata:
      title           : Chapter 01
    Stream #0:0(eng): Video: mpeg2video (Main)
      yuv420p, tv, bt470bg/bt470bg/bt470bg
      720x576 [PAR 16:15 DAR 4:3], 9000 kb/s, PAR 16:15 DAR 4:3
      25 fps, 1k tbn
    Metadata:
      BPS             : 6121275
      BPS-eng         : 6121275
      DURATION        : 00:05:00.000000000
      DURATION-eng    : 00:05:00.000000000
      NUMBER_OF_FRAMES: 7500
      NUMBER_OF_FRAMES-eng: 7500
      NUMBER_OF_BYTES : 229547848
      NUMBER_OF_BYTES-eng: 229547848
      _STATISTICS_WRITING_APP: mkvmerge v9.9.0 ('Pick Up') 64bit
      _STATISTICS_WRITING_APP-eng: mkvmerge v9.9.0 ('Pick Up') 64bit
      _STATISTICS_WRITING_DATE_UTC: 2017-03-27 19:54:47
      _STATISTICS_WRITING_DATE_UTC-eng: 2017-03-27 19:54:47
      _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
    Stream #0:1(eng): Audio: ac3
      48000 Hz, stereo, fltp, 192 kb/s (default)
    Metadata:
      title           : Stereo
      BPS             : 192000
      BPS-eng         : 192000
      DURATION        : 00:05:00.000000000
      DURATION-eng    : 00:05:00.000000000
      NUMBER_OF_FRAMES: 9375
      NUMBER_OF_FRAMES-eng: 9375
      NUMBER_OF_BYTES : 7200000
      NUMBER_OF_BYTES-eng: 7200000
      _STATISTICS_WRITING_APP: mkvmerge v9.9.0 ('Pick Up') 64bit
      _STATISTICS_WRITING_APP-eng: mkvmerge v9.9.0 ('Pick Up') 64bit
      _STATISTICS_WRITING_DATE_UTC: 2017-03-27 19:54:47
      _STATISTICS_WRITING_DATE_UTC-eng: 2017-03-27 19:54:47
      _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
[21:59:10] scan: decoding previews for title 1
[21:59:10] scan: audio 0x1: ac3, rate=48000Hz, bitrate=192000 English (AC3) (2.0 ch)
[21:59:10] scan: 10 previews, 720x576, 25.000 fps, autocrop = 42/42/0/0, aspect 4:3, PAR 16:15
[21:59:10] libhb: scan thread found 1 valid title(s)
[21:59:10] Skipping subtitle scan.  No suitable subtitle tracks.
[21:59:10] starting job
[21:59:10] decomb filter thread started for segment 0
[21:59:10] decomb filter thread started for segment 1
[21:59:10] decomb filter thread started for segment 2
[21:59:10] decomb filter thread started for segment 3
[21:59:10] decomb filter thread started for segment 4
[21:59:10] decomb filter thread started for segment 5
[21:59:10] decomb filter thread started for segment 6
[21:59:10] decomb filter thread started for segment 7
[21:59:10] decomb check thread started for segment 0
[21:59:10] decomb check thread started for segment 1
[21:59:10] decomb check thread started for segment 2
[21:59:10] decomb check thread started for segment 3
[21:59:10] decomb check thread started for segment 4
[21:59:10] decomb check thread started for segment 5
[21:59:10] decomb check thread started for segment 6
[21:59:10] decomb check thread started for segment 7
[21:59:10] mask erode thread started for segment 6
[21:59:10] mask filter thread started for segment 1
[21:59:10] mask filter thread started for segment 2
[21:59:10] mask filter thread started for segment 3
[21:59:10] mask filter thread started for segment 4
[21:59:10] mask filter thread started for segment 5
[21:59:10] mask filter thread started for segment 6
[21:59:10] mask filter thread started for segment 7
[21:59:10] mask erode thread started for segment 0
[21:59:10] yadif thread started for segment 4
[21:59:10] mask erode thread started for segment 2
[21:59:10] mask erode thread started for segment 3
[21:59:10] mask erode thread started for segment 4
[21:59:10] work: track 1, dithering not supported by codec
[21:59:10] mask erode thread started for segment 5
[21:59:10] mask filter thread started for segment 0
[21:59:10] mask erode thread started for segment 7
[21:59:10] work: only 1 chapter, disabling chapter markers
[21:59:10] job configuration:
[21:59:10]  * source
[21:59:10]    + D:\OneDrive\sample_2.mkv
[21:59:10]    + title 1, chapter(s) 1 to 1
[21:59:10] mask dilate thread started for segment 0
[21:59:10] mask dilate thread started for segment 1
[21:59:10]    + container: matroska,webm
[21:59:10]  * destination
[21:59:10]    + \\MEDIASERVER\Video\temp\Sample 2-1.m4v
[21:59:10]    + container: MPEG-4 (libavformat)
[21:59:10]  * video track
[21:59:10] mask dilate thread started for segment 2
[21:59:10]    + decoder: mpeg2video
[21:59:10]      + bitrate 9000 kbps
[21:59:10]    + filters
[21:59:10] mask dilate thread started for segment 3
[21:59:10]      + Comb Detect (mode=3:spatial-metric=2:motion-thresh=1:spatial-thresh=1:filter-mode=2:block-thresh=40:block-width=16:block-height=16)
[21:59:10] mask dilate thread started for segment 4
[21:59:10]      + Decomb (mode=39)
[21:59:10] mask dilate thread started for segment 5
[21:59:10]      + Framerate Shaper (mode=2)
[21:59:10]        + frame rate: 25.000 fps -> peak rate limited to 25.000 fps
[21:59:10] mask dilate thread started for segment 6
[21:59:10]      + Crop and Scale (width=720:height=492:crop-top=42:crop-bottom=42:crop-left=0:crop-right=0)
[21:59:10] mask dilate thread started for segment 7
[21:59:10]        + source: 720 * 576, crop (42/42/0/0): 720 * 492, scale: 720 * 492
[21:59:10]    + Output geometry
[21:59:10]      + storage dimensions: 720 x 492
[21:59:10]      + pixel aspect ratio: 16 : 15
[21:59:10]      + display dimensions: 768 x 492
[21:59:10] yadif thread started for segment 0
[21:59:10]    + encoder: H.264 (Intel Media SDK)
[21:59:10]      + preset:  balanced
[21:59:10]      + profile: auto
[21:59:10]      + level:   auto
[21:59:10] yadif thread started for segment 1
[21:59:10]      + quality: 20.00 (ICQ)
[21:59:10]  * audio track 1
[21:59:10]    + decoder: English (AC3) (2.0 ch) (track 1, id 0x1)
[21:59:10]      + bitrate: 192 kbps, samplerate: 48000 Hz
[21:59:10]    + mixdown: Stereo
[21:59:10]    + encoder: AAC (libavcodec)
[21:59:10] yadif thread started for segment 2
[21:59:10]      + bitrate: 160 kbps, samplerate: 48000 Hz
[21:59:10] yadif thread started for segment 3
[21:59:10] mask erode thread started for segment 1
[21:59:10] yadif thread started for segment 5
[21:59:10] yadif thread started for segment 6
[21:59:10] yadif thread started for segment 7
[21:59:10] sync: expecting 7500 video frames
[21:59:10] encqsvInit: using encode-only path
[21:59:10] encqsvInit: H.264/AVC High profile @ level 3.0
[21:59:10] encqsvInit: TargetUsage 4 AsyncDepth 5
[21:59:10] encqsvInit: GopRefDist 3 GopPicSize 25 NumRefFrame 1
[21:59:10] encqsvInit: BFramesMax 2 BRefType off
[21:59:10] encqsvInit: RateControlMethod ICQ ICQQuality 20
[21:59:10] sync: first pts video is 0
[21:59:10] sync: first pts audio 0x1 is 3600
[21:59:10] sync: "Chapter 1" (1) at frame 4 time 14400
[21:59:10] qsv_enc_init: using 'hardware (2)' implementation, API: 1.19
Error code -17,	hb_qsv_wait_on_sync	602
[21:59:13] work: average encoding speed for job is 0.000000 fps
[21:59:13] comb detect: heavy 43 | light 19 | uncombed 299 | total 361
[21:59:13] decomb: deinterlaced 43 | blended 19 | unfiltered 292 | total 354
[21:59:13] vfr: 347 frames output, 0 dropped and 0 duped for CFR/PFR
[21:59:13] vfr: lost time: 0 (0 frames)
[21:59:13] vfr: gained time: 0 (0 frames) (0 not accounted for)
[21:59:13] ac3-decoder done: 563 frames, 0 decoder errors
[21:59:13] mpeg2video-decoder done: 431 frames, 0 decoder errors
[21:59:13] sync: got 393 frames, 7500 expected
[21:59:13] sync: framerate min 12.500 fps, max 25.000 fps, avg 24.937 fps
[21:59:13] mux: track 0, 325 frames, 2411026 bytes, 1230.12 kbps, fifo 512
[21:59:13] mux: track 1, 733 frames, 313110 bytes, 159.75 kbps, fifo 1024
[21:59:13] libhb: work result = 4

# Encode Completed ...
Post Reply