[Fixed] H.264 (Intel QSV) with Encoder preset Quality not working with 1080p in nightly

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
wolfpac
Posts: 5
Joined: Tue Sep 27, 2016 4:03 pm

[Fixed] H.264 (Intel QSV) with Encoder preset Quality not working with 1080p in nightly

Post by wolfpac » Tue Sep 27, 2016 4:49 pm

Please describe the problem in as much detail as possible:
Handbrake nightly doesn't encode 1080p material (720p works) if I try to use Video Codec H.264 (Intel QSV) with Encoder preset Quality. Handbrake 0.10.5 works and nightly also works if I set Encoder preset to Balanced or Speed.

What are the steps to reproduce this problem:
I tried it with the HD trailer of James Bond Skyfall from chip.de. Set Container to mkv, video codec to H.264 (Intel QSV) and Encoder Preset to Quality.

What version of HandBrake you are running:
HandBrake Nightly 20160926211306-f7ff05d-master (2016092701) - 64bit Version

What operating system and version and you running (e.g. OSX 10.11, Windows 7, Ubuntu 14):
Windows 7 64bit Version with Intel(R) Core(TM) i7-4600U, Graphic Driver Version 10.18.14.4432 (latest available from Dell)

Please include the scan or encode log:

Code: Select all

# Starting Encode ...

[18:39:01] hb_init: starting libhb thread
[18:39:01] 1 job(s) to process
[18:39:01] json job:
{
  "Audio": {
    "AudioList": [
      {
        "DRC": 0.0,
        "Encoder": 1125984256,
        "Gain": 0.0,
        "Mixdown": -1,
        "NormalizeMixLevel": false,
        "Samplerate": 0,
        "Track": 0,
        "DitherMethod": 0
      }
    ],
    "CopyMask": [
      1073807360,
      1073743872,
      1074003968,
      1073750016,
      1090519040,
      1074790400,
      1074266112,
      1107296256
    ],
    "FallbackEncoder": 2048
  },
  "Destination": {
    "ChapterList": [],
    "ChapterMarkers": false,
    "File": "jamesbond__skyfall_1080p_test.mkv",
    "Mp4Options": {
      "IpodAtom": false,
      "Mp4Optimize": false
    },
    "Mux": 2097152
  },
  "Filters": {
    "FilterList": [
      {
        "ID": 4,
        "Settings": {
          "mode": "7"
        }
      },
      {
        "ID": 11,
        "Settings": {
          "crop-bottom": "138",
          "crop-left": "0",
          "crop-right": "0",
          "crop-top": "140",
          "height": "802",
          "width": "1920"
        }
      },
      {
        "ID": 6,
        "Settings": {
          "mode": "1"
        }
      }
    ]
  },
  "PAR": {
    "Num": 1,
    "Den": 1
  },
  "Metadata": {},
  "SequenceID": 0,
  "Source": {
    "Angle": 1,
    "Range": {
      "Type": "chapter",
      "Start": 1,
      "End": 1
    },
    "Title": 1,
    "Path": "jamesbond__skyfall_1080p.mp4"
  },
  "Subtitle": {
    "Search": {
      "Burn": false,
      "Default": false,
      "Enable": false,
      "Forced": false
    },
    "SubtitleList": []
  },
  "Video": {
    "Encoder": 256,
    "Level": "auto",
    "TwoPass": false,
    "Turbo": false,
    "ColorMatrixCode": 0,
    "Options": "",
    "Preset": "quality",
    "Profile": "auto",
    "Quality": 28.0,
    "OpenCL": false,
    "HWDecode": false,
    "QSV": {
      "Decode": true,
      "AsyncDepth": 0
    }
  }
}
[18:39:01] CPU: Intel(R) Core(TM) i7-4600U CPU @ 2.10GHz
[18:39:01]  - Intel microarchitecture Haswell
[18:39:01]  - logical processor count: 4
[18:39:01] OpenCL device #1: Intel(R) Corporation Intel(R) HD Graphics 4400
[18:39:01]  - OpenCL version: 1.2
[18:39:01]  - driver version: 10.18.14.4432
[18:39:01]  - device type:    GPU
[18:39:01]  - supported:      YES
[18:39:01] Intel Quick Sync Video support: yes
[18:39:01]  - Intel Media SDK hardware: API 1.17 (minimum: 1.3)
[18:39:01]  - H.264 encoder: yes
[18:39:01]     - preferred implementation: hardware (any)
[18:39:01]     - capabilities (hardware):  breftype icq+la+i+downs vsinfo opt1 opt2+mbbrc+extbrc+trellis+ib_adapt+nmpslice
[18:39:01]  - H.265 encoder: no
[18:39:01] hb_scan: path=jamesbond__skyfall_1080p.mp4, title_index=1
udfread ERROR: ECMA 167 Volume Recognition failed
src/libbluray/disc/disc.c:274: failed opening UDF image jamesbond__skyfall_1080p.mp4
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
[18:39:01] 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
[18:39:01] dvd: not a dvd - trying as a stream/file instead
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'jamesbond__skyfall_1080p.mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: isommp42
    creation_time   : 2012-05-20 08:07:19
  Duration: 00:01:12.00, start: 0.000000, bitrate: 2450 kb/s
    Stream #0.0(und): Video: h264 (High), yuv420p, 1920x1080, 2298 kb/s, 25 fps, 50 tbn, 50 tbc (default)
    Metadata:
      creation_time   : 1970-01-01 00:00:00
    Stream #0.1(und): Audio: aac, 44100 Hz, stereo, fltp, 149 kb/s (default)
    Metadata:
      creation_time   : 2012-05-20 08:07:19
[18:39:01] scan: decoding previews for title 1
[18:39:01] scan: audio 0x1: aac, rate=44100Hz, bitrate=149379 Unknown (AAC) (2.0 ch)
[18:39:02] scan: 10 previews, 1920x1080, 25.000 fps, autocrop = 140/138/0/0, aspect 16:9, PAR 1:1
[18:39:02] scan: supported video decoders: avcodec qsv
[18:39:02] libhb: scan thread found 1 valid title(s)
[18:39:02] starting job
[18:39:02] do_job: QSV: full path, removing unsupported filter 'Decomb'
[18:39:02] do_job: QSV: full path, removing unsupported filter 'Framerate Shaper'
[18:39:02] Auto Passthru: allowed codecs are AAC, AC3, E-AC3, TrueHD, DTS, DTS-HD, MP3, FLAC
[18:39:02] Auto Passthru: fallback is AC3
[18:39:02] Auto Passthru: using AAC Passthru for track 1
[18:39:02] job configuration:
[18:39:02]  * source
[18:39:02]    + jamesbond__skyfall_1080p.mp4
[18:39:02]    + title 1, chapter(s) 1 to 1
[18:39:02]    + container: mov,mp4,m4a,3gp,3g2,mj2
[18:39:02]    + data rate: 2450 kbps
[18:39:02]  * destination
[18:39:02]    + jamesbond__skyfall_1080p_test.mkv
[18:39:02]    + container: Matroska (libavformat)
[18:39:02]  * video track
[18:39:02]    + decoder: h264_qsv
[18:39:02]      + bitrate 2298 kbps
[18:39:02]    + filter
[18:39:02]      + Quick Sync Video VPP (width=1920:height=802:crop-top=140:crop-bottom=138:crop-left=0:crop-right=0:deinterlace=0)
[18:39:02]        + source: 1920 * 1080, crop (140/138/0/0): 1920 * 802, scale: 1920 * 802
[18:39:02]    + Output geometry
[18:39:02]      + storage dimensions: 1920 x 802
[18:39:02]      + pixel aspect ratio: 1 : 1
[18:39:02]      + display dimensions: 1920 x 802
[18:39:02]    + encoder: H.264 (Intel Media SDK)
[18:39:02]      + preset:  quality
[18:39:02]      + profile: auto
[18:39:02]      + level:   auto
[18:39:02]      + quality: 28.00 (ICQ)
[18:39:02]  * audio track 1
[18:39:02]    + decoder: Unknown (AAC) (2.0 ch) (track 1, id 0x1)
[18:39:02]      + bitrate: 149 kbps, samplerate: 44100 Hz
[18:39:02]    + AAC Passthru
[18:39:02] sync: expecting 1800 video frames
[18:39:02] encqsvInit: using full QSV path
[18:39:02] encqsvInit: H.264/AVC High profile @ level 4.0
[18:39:02] encqsvInit: TargetUsage 2 AsyncDepth 3
[18:39:02] encqsvInit: GopRefDist 3 GopPicSize 25 NumRefFrame 3
[18:39:02] encqsvInit: BFramesMax 2 BRefType off
[18:39:02] encqsvInit: RateControlMethod LA_ICQ ICQQuality 28 LookAheadDepth 40
[18:39:02] sync: first pts video is 0
[18:39:02] sync: Chapter 1 at frame 1 time 0
[18:39:02] sync: first pts audio 0x1 is 0
[18:39:02] qsv_enc_init: using 'hardware (1)' implementation, API: 1.17

# Encode Stopped

[18:39:30] work: average encoding speed for job is 0.000000 fps
[18:39:30] qsv_filter[Default] done: max_surfaces: 39/80 , max_syncs: 39/60
[18:39:30] aac-decoder done: 211 frames, 0 decoder errors
[18:39:30] h264_qsv-decoder done: 60 frames, 0 decoder errors
[18:39:30] sync: got 40 frames, 1800 expected
[18:39:30] sync: framerate min 12.500 fps, max 25.000 fps, avg 24.390 fps
[18:39:30] mux: track 0, 0 frames, 0 bytes, 0.00 kbps, fifo 8
[18:39:30] mux: track 1, 69 frames, 22815 bytes, 111.29 kbps, fifo 128
[18:39:30] libhb: work result = 0

# Encode Completed ...

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

Re: H.264 (Intel QSV) with Encoder preset Quality not working with 1080p in nightly

Post by Rodeo » Tue Sep 27, 2016 5:34 pm

That's quite odd, as there's almost no changes between 0.10.5 and the nightly when it comes to QSV.

Does it work in the nightly if you select "disable QSV decoding" in Tools > Options?

wolfpac
Posts: 5
Joined: Tue Sep 27, 2016 4:03 pm

Re: H.264 (Intel QSV) with Encoder preset Quality not working with 1080p in nightly

Post by wolfpac » Tue Sep 27, 2016 5:45 pm

With disabled QSV decoding it works.

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

Re: H.264 (Intel QSV) with Encoder preset Quality not working with 1080p in nightly

Post by Rodeo » Tue Sep 27, 2016 5:48 pm

OK, I'll investigate. It may not be worth fixing right away as the QSV decoding code will be partially rewritten very soon…

wolfpac
Posts: 5
Joined: Tue Sep 27, 2016 4:03 pm

Re: H.264 (Intel QSV) with Encoder preset Quality not working with 1080p in nightly

Post by wolfpac » Tue Sep 27, 2016 7:35 pm

Hi have set log verbosity level to extented and now the log gets spammed with "not enough to have 60 sync point(s) allocated"

Code: Select all

[21:29:27] job configuration:
[21:29:27]  * source
[21:29:27]    + jamesbond__skyfall_1080p.mp4
[21:29:27]    + title 1, chapter(s) 1 to 1
[21:29:27]    + container: mov,mp4,m4a,3gp,3g2,mj2
[21:29:27]    + data rate: 2450 kbps
[21:29:27]  * destination
[21:29:27]    + jamesbond__skyfall_1080p_test.mkv
[21:29:27]    + container: Matroska (libavformat)
[21:29:27]  * video track
[21:29:27]    + decoder: h264_qsv
[21:29:27]      + bitrate 2298 kbps
[21:29:27]    + filter
[21:29:27]      + Quick Sync Video VPP (width=1920:height=802:crop-top=140:crop-bottom=138:crop-left=0:crop-right=0:deinterlace=0)
[21:29:27]        + source: 1920 * 1080, crop (140/138/0/0): 1920 * 802, scale: 1920 * 802
[21:29:27]    + Output geometry
[21:29:27]      + storage dimensions: 1920 x 802
[21:29:27]      + pixel aspect ratio: 1 : 1
[21:29:27]      + display dimensions: 1920 x 802
[21:29:27]    + encoder: H.264 (Intel Media SDK)
[21:29:27]      + preset:  quality
[21:29:27]      + profile: auto
[21:29:27]      + level:   auto
[21:29:27]      + quality: 22.00 (ICQ)
[21:29:28] sync: expecting 1800 video frames
[21:29:28] encqsvInit: using full QSV path
[21:29:28] encqsvInit: H.264/AVC High profile @ level 4.0
[21:29:28] encqsvInit: TargetUsage 2 AsyncDepth 3
[21:29:28] encqsvInit: GopRefDist 3 GopPicSize 25 NumRefFrame 3
[21:29:28] encqsvInit: BFramesMax 2 BRefType off
[21:29:28] encqsvInit: RateControlMethod LA_ICQ ICQQuality 22 LookAheadDepth 40
[21:29:28] Writing Metadata to output file...
[21:29:28] thread 21224040 started ("Reader")
[21:29:28] ffmpeg_read starting chapter 1 at 0
[21:29:28] thread 212243c0 started ("Video decoder (libavcodec)")
[21:29:28] thread 21224200 started ("Video Synchronization")
[21:29:28] thread 21224740 started ("Quick Sync Video encoder (Intel Media SDK)")
[21:29:28] thread 21224900 started ("Muxer")
[21:29:28] thread 21224ac0 started ("Quick Sync Video VPP")
[21:29:28] sync: first pts video is 0
[21:29:28] sync: Chapter 1 at frame 1 time 0
[21:29:28] qsv_enc_init: using 'hardware (1)' implementation, API: 1.17
not enough to have 60 sync point(s) allocated
not enough to have 60 sync point(s) allocated
not enough to have 60 sync point(s) allocated
not enough to have 60 sync point(s) allocated
not enough to have 60 sync point(s) allocated
not enough to have 60 sync point(s) allocated
not enough to have 60 sync point(s) allocated
not enough to have 60 sync point(s) allocated
not enough to have 60 sync point(s) allocated
not enough to have 60 sync point(s) allocated
not enough to have 60 sync point(s) allocated
not enough to have 60 sync point(s) allocated
not enough to have 60 sync point(s) allocated
not enough to have 60 sync point(s) allocated
not enough to have 60 sync point(s) allocated
not enough to have 60 sync point(s) allocated
not enough to have 60 sync point(s) allocated
not enough to have 60 sync point(s) allocated
not enough to have 60 sync point(s) allocated
not enough to have 60 sync point(s) allocated
not enough to have 60 sync point(s) allocated
not enough to have 60 sync point(s) allocated
not enough to have 60 sync point(s) allocated
not enough to have 60 sync point(s) allocated
not enough to have 60 sync point(s) allocated
not enough to have 60 sync point(s) allocated
not enough to have 60 sync point(s) allocated

# Encode Stopped
and with 0.10.5

Code: Select all

[21:43:48] thread 65a1690 started ("Reader")
[21:43:48] thread 64cdc80 started ("Quick Sync Video VPP")
[21:43:48] Seeking to chapter 1: starts 0, ends 6480000, AV pos 0
[21:43:48] reader: first SCR 0 id 0x0 DTS 0
[21:43:48] thread 65a25e0 started ("Video decoder (libavcodec)")
[21:43:48] encqsvInit: using full QSV path
[21:43:48] encqsvInit: TargetUsage 2 AsyncDepth 4
[21:43:48] encqsvInit: GopRefDist 3 GopPicSize 25 NumRefFrame 3
[21:43:48] encqsvInit: BFrames on BPyramid off
[21:43:48] encqsvInit: AdaptiveI off AdaptiveB off
[21:43:48] encqsvInit: RateControlMethod LA_ICQ ICQQuality 22 LookAheadDepth 40
[21:43:48] encqsvInit: LookAheadDS off
[21:43:48] encqsvInit: CAVLC off
[21:43:48] encqsvInit: Trellis off
[21:43:48] encqsvInit: H.264 profile High @ level 4.0
[21:43:48] thread 5231cf0 started ("H.264/AVC encoder (Intel QSV)")
[21:43:48] thread 306c00 started ("Video Synchronization")
[21:43:48] Writing Metadata to output file...
[21:43:49] qsv_enc_init: using 'hardware (1)' implementation, API: 1.17

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

Re: H.264 (Intel QSV) with Encoder preset Quality not working with 1080p in nightly

Post by Rodeo » Wed Sep 28, 2016 7:40 am

Aha, good catch, this does narrow it down.

allbundy
Posts: 2
Joined: Sun Oct 30, 2016 6:12 am

Re: H.264 (Intel QSV) with Encoder preset Quality not working with 1080p in nightly

Post by allbundy » Sun Oct 30, 2016 6:14 am

Hello Rodeo,

this problem still isn't fixed in the nightlies, right?
Because I also got this error in the latest nightly-builds.

best regards

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

Re: H.264 (Intel QSV) with Encoder preset Quality not working with 1080p in nightly

Post by Rodeo » Sun Oct 30, 2016 2:57 pm

Yep, sorry, haven't had time to work on it much lately.

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

Re: H.264 (Intel QSV) with Encoder preset Quality not working with 1080p in nightly

Post by s55 » Sun Dec 18, 2016 5:26 pm

I wonder if this issue is now correctly in the nightly that we've switched to the libav implementation?

allbundy
Posts: 2
Joined: Sun Oct 30, 2016 6:12 am

Re: H.264 (Intel QSV) with Encoder preset Quality not working with 1080p in nightly

Post by allbundy » Thu Dec 22, 2016 8:50 am

:wink: now it is working
many thx

next thing on my wishlist is to be able to change the QSV settings.

best regards

Post Reply