H.264 Intel QVS Extra Options

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 forum is now closed to new topics.
- Existing topics will remain open for a short while as the transition over occurs.
*******************************
Post Reply
alexins
Posts: 1
Joined: Mon May 22, 2017 4:58 pm

H.264 Intel QVS Extra Options

Post by alexins » Mon May 22, 2017 5:15 pm

In the guide "Intel QuickSync Video (QSV) options" additional settings vbv-maxrate and vbv-bufsize are shown. When using those settings, according to the log, vbv-maxrate works and vbv-bufsize doesn’t.
If I, for example, use these Extra Options (H.264 Intel QVS): "target-usage=1:lookahead=0:vbv-maxrate=40000:vbv-bufsize=40000:vbv-init=1" then, the log will contain the following, from what you can see that vbv-bufsize doesn’t work properly:

Code: Select all

[18:54:52] encqsvInit: RateControlMethod VBR TargetKbps 12000 MaxKbps 40000 BufferSizeInKB 5000 InitialDelayInKB 5000
I use HandBrake 1.0.7, Windows 10 x64.

Full log:

Code: Select all

HandBrake 1.0.7 (2017040900) - 64bit
OS: Microsoft Windows NT 10.0.15063.0 - 64bit
CPU: Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz
Ram: 16250 MB, 
GPU Information:
  NVIDIA GeForce GTX 1060 6GB - 22.21.13.8205
  Intel(R) HD Graphics 630 - 21.20.16.4664
Screen: 1440x900
Temp Dir: G:\temp\
Install Dir: C:\Program Files\HandBrake
Data Dir: C:\Users\alexins\AppData\Roaming\HandBrake Team\HandBrake\1.0.7.0

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


# Starting Encode ...

[18:54:50] hb_init: starting libhb thread
[18:54:50] 1 job(s) to process
[18:54:50] json job:
{
  "Audio": {
    "AudioList": [
      {
        "Bitrate": 448,
        "DRC": 0.0,
        "Encoder": 2048,
        "Gain": 0.0,
        "Mixdown": 7,
        "NormalizeMixLevel": false,
        "Samplerate": 0,
        "Track": 1,
        "DitherMethod": 0
      }
    ],
    "CopyMask": [
      1073807360,
      1073743872,
      1074003968,
      1073750016,
      1090519040,
      1074790400,
      1074266112,
      1107296256
    ],
    "FallbackEncoder": 2048
  },
  "Destination": {
    "ChapterList": [],
    "ChapterMarkers": false,
    "File": "H:\\out\\serial\\Test-1.mkv",
    "Mp4Options": {
      "IpodAtom": false,
      "Mp4Optimize": false
    },
    "Mux": 2097152
  },
  "Filters": {
    "FilterList": [
      {
        "ID": 11,
        "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": 1
    },
    "Title": 1,
    "Path": "F:\\video\\test.mkv"
  },
  "Subtitle": {
    "Search": {
      "Burn": false,
      "Default": false,
      "Enable": false,
      "Forced": false
    },
    "SubtitleList": [
      {
        "Burn": true,
        "Default": false,
        "Forced": true,
        "ID": 1,
        "Offset": 0,
        "Track": 0
      }
    ]
  },
  "Video": {
    "Encoder": 256,
    "Level": "4.1",
    "Bitrate": 12000,
    "TwoPass": false,
    "Turbo": false,
    "ColorMatrixCode": 0,
    "Options": "target-usage=1:lookahead=0:vbv-maxrate=40000:vbv-bufsize=40000:vbv-init=1",
    "Preset": "quality",
    "Profile": "high",
    "OpenCL": false,
    "HWDecode": false,
    "QSV": {
      "Decode": true,
      "AsyncDepth": 0
    }
  }
}
[18:54:50] CPU: Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz
[18:54:50]  - Intel microarchitecture Kaby Lake
[18:54:50]  - logical processor count: 8
[18:54:50] Intel Quick Sync Video support: yes
[18:54:50]  - Intel Media SDK hardware: API 1.23 (minimum: 1.3)
[18:54:50]  - H.264 encoder: yes
[18:54:50]     - preferred implementation: hardware (any)
[18:54:50]     - capabilities (hardware):  breftype icq+la+i+downs vsinfo opt1 opt2+mbbrc+extbrc+trellis+ib_adapt+nmpslice
[18:54:50]  - H.265 encoder: yes
[18:54:50]     - preferred implementation: hardware (any)
[18:54:50]     - capabilities (hardware):  bpyramid vsinfo opt1
[18:54:50] hb_scan: path=F:\video\test.mkv, title_index=1
udfread ERROR: ECMA 167 Volume Recognition failed
src/libbluray/disc/disc.c:274: failed opening UDF image F:\video\test.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
[18:54:50] 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:54:50] dvd: not a dvd - trying as a stream/file instead
Input #0, matroska,webm, from 'F:\video\test.mkv':
  Metadata:
    title           : Star.Trek.Enterprise.s1e03.Fight.or.Flight (BDRemux)
  Duration: 00:00:59.60, start: 0.000000, bitrate: 29251 kb/s
    Chapter #0:0: start 0.000000, end 59.609000
    Metadata:
      title           : 00:00:00.000
    Stream #0:0(eng): Video: h264 (High)
      yuv420p, 1920x1080 [PAR 1:1 DAR 16:9], PAR 1:1 DAR 16:9
      23.98 fps, 1k tbn (default)
    Metadata:
      title           : Star.Trek.Enterprise.s1e03.Fight.or.Flight (BDRemux)
      BPS             : 23394994
      BPS-eng         : 23394994
      DURATION        : 00:00:59.602000000
      DURATION-eng    : 00:00:59.602000000
      NUMBER_OF_FRAMES: 1429
      NUMBER_OF_FRAMES-eng: 1429
      NUMBER_OF_BYTES : 174298556
      NUMBER_OF_BYTES-eng: 174298556
      _STATISTICS_WRITING_APP: mkvmerge v12.0.0 ('Trust / Lust') 32bit
      _STATISTICS_WRITING_APP-eng: mkvmerge v12.0.0 ('Trust / Lust') 32bit
      _STATISTICS_WRITING_DATE_UTC: 2017-05-22 16:47:44
      _STATISTICS_WRITING_DATE_UTC-eng: 2017-05-22 16:47:44
      _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
    Stream #0:1(rus): Audio: dts (DTS)
      48000 Hz, 5.1, fltp, 1536 kb/s (default)
    Metadata:
      title           : РЎРўРЎ DTS 5.1  1509 Kbps [Jurich Remastering]
      BPS             : 1509699
      BPS-eng         : 1509699
      DURATION        : 00:00:59.522000000
      DURATION-eng    : 00:00:59.522000000
      NUMBER_OF_FRAMES: 5580
      NUMBER_OF_FRAMES-eng: 5580
      NUMBER_OF_BYTES : 11232540
      NUMBER_OF_BYTES-eng: 11232540
      _STATISTICS_WRITING_APP: mkvmerge v12.0.0 ('Trust / Lust') 32bit
      _STATISTICS_WRITING_APP-eng: mkvmerge v12.0.0 ('Trust / Lust') 32bit
      _STATISTICS_WRITING_DATE_UTC: 2017-05-22 16:47:44
      _STATISTICS_WRITING_DATE_UTC-eng: 2017-05-22 16:47:44
      _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
    Stream #0:2(eng): Audio: dts (DTS-HD MA)
      48000 Hz, 5.1, fltp, 1536 kb/s
    Metadata:
      title           : Original DTS-HD
      BPS             : 4330223
      BPS-eng         : 4330223
      DURATION        : 00:00:59.520000000
      DURATION-eng    : 00:00:59.520000000
      NUMBER_OF_FRAMES: 5580
      NUMBER_OF_FRAMES-eng: 5580
      NUMBER_OF_BYTES : 32216860
      NUMBER_OF_BYTES-eng: 32216860
      _STATISTICS_WRITING_APP: mkvmerge v12.0.0 ('Trust / Lust') 32bit
      _STATISTICS_WRITING_APP-eng: mkvmerge v12.0.0 ('Trust / Lust') 32bit
      _STATISTICS_WRITING_DATE_UTC: 2017-05-22 16:47:44
      _STATISTICS_WRITING_DATE_UTC-eng: 2017-05-22 16:47:44
      _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
    Stream #0:3(eng): Subtitle: srt
    Metadata:
      BPS             : 63
      BPS-eng         : 63
      DURATION        : 00:00:03.044000000
      DURATION-eng    : 00:00:03.044000000
      NUMBER_OF_FRAMES: 1
      NUMBER_OF_FRAMES-eng: 1
      NUMBER_OF_BYTES : 24
      NUMBER_OF_BYTES-eng: 24
      _STATISTICS_WRITING_APP: mkvmerge v12.0.0 ('Trust / Lust') 32bit
      _STATISTICS_WRITING_APP-eng: mkvmerge v12.0.0 ('Trust / Lust') 32bit
      _STATISTICS_WRITING_DATE_UTC: 2017-05-22 16:47:44
      _STATISTICS_WRITING_DATE_UTC-eng: 2017-05-22 16:47:44
      _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
    Stream #0:4: Video: mjpeg
      yuvj422p, pc, bt470bg/unknown/unknown
      600x753
      90k tbn
    Metadata:
      filename        : cover.jpg
      mimetype        : image/jpeg
    Stream #0:5: Video: mjpeg
      yuvj422p, pc, bt470bg/unknown/unknown
      120x151
      90k tbn
    Metadata:
      filename        : small_cover.jpg
      mimetype        : image/jpeg
[18:54:50] scan: decoding previews for title 1
[18:54:50] scan: audio 0x1: dca, rate=48000Hz, bitrate=1536000 русский (DTS) (5.1 ch)
[18:54:50] scan: audio 0x2: dca, rate=48000Hz, bitrate=1536000 English (DTS-HD MA) (5.1 ch)
[18:54:51] scan: 10 previews, 1920x1080, 23.976 fps, autocrop = 0/0/4/2, aspect 16:9, PAR 1:1
[18:54:51] scan: supported video decoders: avcodec qsv
[18:54:51] libhb: scan thread found 1 valid title(s)
[18:54:51] starting job
[18:54:51] [ass] Shaper: FriBidi 0.19.7 (SIMPLE) HarfBuzz-ng 1.3.0 (COMPLEX)
[18:54:51] [ass] Using font provider directwrite
[18:54:51] work: track 1, dithering not supported by codec
[18:54:51] job configuration:
[18:54:51]  * source
[18:54:51]    + F:\video\test.mkv
[18:54:51]    + title 1, chapter(s) 1 to 1
[18:54:51]    + container: matroska,webm
[18:54:51]    + data rate: 29251 kbps
[18:54:51]  * destination
[18:54:51]    + H:\out\serial\Test-1.mkv
[18:54:51]    + container: Matroska (libavformat)
[18:54:51]  * video track
[18:54:51]    + decoder: h264_qsv
[18:54:51]    + filters
[18:54:51]      + Framerate Shaper (mode=1)
[18:54:51]        + frame rate: 23.976 fps -> constant 23.976 fps
[18:54:51]      + Subtitle renderer ()
[18:54:51]      + Crop and Scale (width=1920:height=1080:crop-top=0:crop-bottom=0:crop-left=0:crop-right=0)
[18:54:51]        + source: 1920 * 1080, crop (0/0/0/0): 1920 * 1080, scale: 1920 * 1080
[18:54:51]    + Output geometry
[18:54:51]      + storage dimensions: 1920 x 1080
[18:54:51]      + pixel aspect ratio: 1 : 1
[18:54:51]      + display dimensions: 1920 x 1080
[18:54:51]    + encoder: H.264 (Intel Media SDK)
[18:54:51]      + preset:  quality
[18:54:51]      + options: target-usage=1:lookahead=0:vbv-maxrate=40000:vbv-bufsize=40000:vbv-init=1
[18:54:51]      + profile: high
[18:54:51]      + level:   4.1
[18:54:51]      + bitrate: 12000 kbps, pass: 0
[18:54:51]  * subtitle track 1, English (track 0, id 0x3) Text [UTF-8] -> Render/Burn-in, Forced Only
[18:54:51]  * audio track 1
[18:54:51]    + decoder: English (DTS-HD MA) (5.1 ch) (track 2, id 0x2)
[18:54:51]      + bitrate: 1536 kbps, samplerate: 48000 Hz
[18:54:51]    + mixdown: 5.1 Channels
[18:54:51]    + encoder: AC3 (libavcodec)
[18:54:51]      + bitrate: 448 kbps, samplerate: 48000 Hz
[18:54:52] sync: expecting 1429 video frames
[18:54:52] encqsvInit: using encode-only path
[18:54:52] encqsvInit: H.264/AVC High profile @ level 4.1
[18:54:52] encqsvInit: TargetUsage 1 AsyncDepth 3
[18:54:52] encqsvInit: GopRefDist 3 GopPicSize 24 NumRefFrame 3
[18:54:52] encqsvInit: BFramesMax 2 BRefType off
[18:54:52] encqsvInit: RateControlMethod VBR TargetKbps 12000 MaxKbps 40000 BufferSizeInKB 5000 InitialDelayInKB 5000
[18:54:52] sync: first pts video is 0
[18:54:52] sync: "00:00:00.000" (1) at frame 3 time 7507
[18:54:52] sync: first pts audio 0x2 is 7920
[18:54:52] qsv_enc_init: using 'hardware (2)' implementation, API: 1.23
[18:54:52] sync: first pts subtitle 0x3 is 292770
[18:54:52] [ass] fontselect: (sans-serif, 400, 0) -> ArialMT, 0, ArialMT
[18:55:02] reader: done. 1 scr changes
[18:55:02] work: average encoding speed for job is 138.413849 fps
[18:55:02] vfr: 1429 frames output, 0 dropped and 0 duped for CFR/PFR
[18:55:02] vfr: lost time: 0 (0 frames)
[18:55:02] vfr: gained time: 0 (0 frames) (0 not accounted for)
[18:55:02] dca-decoder done: 5580 frames, 0 decoder errors
[18:55:02] h264_qsv-decoder done: 1429 frames, 0 decoder errors
[18:55:02] sync: got 1429 frames, 1429 expected
[18:55:02] sync: framerate min 23.981 fps, max 23.981 fps, avg 23.976 fps
[18:55:02] mux: track 0, 1429 frames, 91211427 bytes, 12234.33 kbps, fifo 256
[18:55:02] mux: track 1, 1859 frames, 3331328 bytes, 446.84 kbps, fifo 512
[18:55:03] libhb: work result = 0

# Encode Completed ...


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

Re: H.264 Intel QVS Extra Options

Post by Rodeo » Mon May 22, 2017 7:16 pm

alexins wrote:
Mon May 22, 2017 5:15 pm

Code: Select all

[18:54:52] encqsvInit: RateControlMethod VBR TargetKbps 12000 MaxKbps 40000 BufferSizeInKB 5000 InitialDelayInKB 5000
It works perfectly… on the command line, you specify both in kilobits, it's just the log indicates maxrate in kilobits per second (same as the command line) whereas buffer size is indicated in kilobytes (1 KB == 8 Kbs)…

Post Reply