I couldn't see this problem discussed elsewhere and I'm not sure if it's a bug or known issue...
Re-encoding a one minute 1080p sample I have doesn't down-scale when both intel QSV encoders/decoders are enabled.
Using x264 with the "--enable-qsv-decoding" option results in the correct 720 x 388 dimensions.
Using qsv_h264 with the "--enable-qsv-decoding" option doesn't down-scale.
Log (qsv_h264) displays:
[09:58:18] HB_FILTER_VFR filter is disabled
[09:58:18] HB_FILTER_CROP_SCALE filter is disabled
Extra Info:
x265 and qsv_h265 exhibit the same behaviour as 264 above.
qsv_h264 and qsv_h265 both work OK without the "--enable-qsv-decoding" option and scale correctly.
I justed tested the GUI from the same date as CLI, it does the same as mentioned.
Steps to reproduce the problem (If Applicable):
Enable both Intel Quicksync Encoder/Decoder.
HandBrake version (e.g., 1.0.0):
HandBrakeCLI-20190822200620-a58118b-master-win-x86_64
Operating system and version (e.g., Ubuntu 16.04 LTS, macOS 10.13 High Sierra, Windows 10 Creators Update):
Windows 10
HandBrake Activity Log ***required*** (see How-to get an activity log)
- x264
Code: Select all
HandBrakeCLI --input "H264.DTS.SRT.mkv" --title 1 --start-at seconds:0 --stop-at seconds:60 --encoder "x264" --encoder-preset "fast" --quality 20 --rate 30.000 --pfr --width 720 --height 388 --crop 22:22:0:0 --non-anamorphic --modulus 2 --comb-detect --no-decomb --no-deinterlace --no-detelecine --enable-qsv-decoding --output "H264.DTS.SRT.TEST.x264.mp4"
Code: Select all
Cannot load nvEncodeAPI64.dll
[09:52:42] hb_init: starting libhb thread
[09:52:42] thread 1 started ("libhb")
HandBrake 20190822200620-a58118b-master (2019082201) - MinGW x86_64 - https://handbrake.fr
4 CPUs detected
Opening H264.DTS.SRT.mkv...
[09:52:42] CPU: Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz
[09:52:42] - Intel microarchitecture Kaby Lake
[09:52:42] - logical processor count: 4
[09:52:42] Intel Quick Sync Video support: yes
[09:52:42] - Intel Media SDK hardware: API 1.29 (minimum: 1.3)
[09:52:42] - H.264 encoder: yes
[09:52:42] - preferred implementation: hardware (any) via D3D11
[09:52:42] - capabilities (hardware): breftype icq+la+i+downs vsinfo opt1 opt2+mbbrc+extbrc+trellis+ib_adapt+nmpslice
[09:52:42] - H.265 encoder: yes (8bit: yes, 10bit: yes)
[09:52:42] - preferred implementation: hardware (any) via D3D11
[09:52:42] - capabilities (hardware): bpyramid icq vsinfo opt1
[09:52:42] hb_scan: path=H264.DTS.SRT.mkv, title_index=1
udfread ERROR: ECMA 167 Volume Recognition failed
src/libbluray/disc/disc.c:323: failed opening UDF image H264.DTS.SRT.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
[09:52:42] bd: not a bd - trying as a stream/file instead
libdvdnav: Using dvdnav version 6.0.0
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
[09:52:42] dvd: not a dvd - trying as a stream/file instead
Input #0, matroska,webm, from 'H264.DTS.SRT.mkv':
Metadata:
encoder : libebml v0.7.7 + libmatroska v0.8.1
creation_time : 2009-09-09T01:14:17.000000Z
Duration: 00:01:00.15, start: 0.000000, bitrate: 11303 kb/s
Stream #0:0(eng): Video: h264 (High), yuv420p(progressive), 1920x1080 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc (default)
Stream #0:1(eng): Audio: dts (DTS), 48000 Hz, 5.1(side), fltp, 1536 kb/s (default)
Stream #0:2(eng): Subtitle: subrip (default)
[09:52:42] scan: decoding previews for title 1
[09:52:42] scan: audio 0x1: dca, rate=48000Hz, bitrate=1536000 English (DTS) (5.1 ch) (1536 kbps)
Scanning title 1 of 1, preview 9, 90.00 %[09:52:43] scan: 10 previews, 1920x1080, 23.976 fps, autocrop = 22/22/0/0, aspect 16:9, PAR 1:1
[09:52:43] scan: supported video decoders: avcodec qsv
[09:52:43] libhb: scan thread found 1 valid title(s)
+ Using preset: CLI Default
+ title 1:
+ stream: H264.DTS.SRT.mkv
+ duration: 00:01:00
+ size: 1920x1080, pixel aspect: 1/1, display aspect: 1.78, 23.976 fps
+ autocrop: 22/22/0/0
+ chapters:
+ 1: duration 00:01:00
+ audio tracks:
+ 1, English (DTS) (5.1 ch) (1536 kbps) (iso639-2: eng), 48000Hz, 1536000bps
+ subtitle tracks:
+ 1, English [UTF-8]
[09:52:43] 1 job(s) to process
[09:52:43] json job:
{
"Audio": {
"AudioList": [
{
"Bitrate": 128,
"CompressionLevel": -1.0,
"DRC": 0.0,
"DitherMethod": "auto",
"Encoder": "av_aac",
"Gain": 0.0,
"Mixdown": "dpl2",
"NormalizeMixLevel": false,
"PresetEncoder": "av_aac",
"Quality": -3.0,
"Samplerate": 0,
"Track": 0
}
],
"CopyMask": [
"copy:aac",
"copy:ac3",
"copy:eac3",
"copy:dtshd",
"copy:dts",
"copy:mp3",
"copy:truehd",
"copy:flac"
],
"FallbackEncoder": "av_aac"
},
"Destination": {
"AlignAVStart": false,
"ChapterList": [
{
"Duration": {
"Hours": 0,
"Minutes": 1,
"Seconds": 0,
"Ticks": 5413140
},
"Name": ""
}
],
"ChapterMarkers": false,
"File": "H264.DTS.SRT.TEST.x264.mp4",
"InlineParameterSets": false,
"Mp4Options": {
"IpodAtom": false,
"Mp4Optimize": false
},
"Mux": "m4v"
},
"Filters": {
"FilterList": [
{
"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": 6,
"Settings": {
"mode": 2,
"rate": "27000000/900000"
}
},
{
"ID": 12,
"Settings": {
"crop-bottom": 22,
"crop-left": 0,
"crop-right": 0,
"crop-top": 22,
"height": 388,
"width": 720
}
}
]
},
"Metadata": {},
"PAR": {
"Den": 1,
"Num": 1
},
"SequenceID": 0,
"Source": {
"Angle": 0,
"Path": "H264.DTS.SRT.mkv",
"Range": {
"End": 5400000,
"Type": "time"
},
"Title": 1
},
"Subtitle": {
"Search": {
"Burn": true,
"Default": false,
"Enable": false,
"Forced": false
},
"SubtitleList": []
},
"Video": {
"ColorFormat": 0,
"ColorMatrix": 1,
"ColorPrimaries": 1,
"ColorRange": 0,
"ColorTransfer": 1,
"Encoder": "x264",
"Level": "auto",
"Options": "",
"Preset": "fast",
"Profile": "auto",
"QSV": {
"AsyncDepth": 4,
"Decode": true
},
"Quality": 20.0,
"Tune": "",
"Turbo": false,
"TwoPass": false
}
}
[09:52:43] D3D9: 1 adapters available
[09:52:43] starting job
[09:52:43] job configuration:
[09:52:43] * source
[09:52:43] + H264.DTS.SRT.mkv
[09:52:43] + title 1, start 00:00:0.00 stop 00:01:0.00
[09:52:43] + container: matroska,webm
[09:52:43] + data rate: 11303 kbps
[09:52:43] * destination
[09:52:43] + H264.DTS.SRT.TEST.x264.mp4
[09:52:43] + container: MPEG-4 (libavformat)
[09:52:43] * video track
[09:52:43] + decoder: h264_qsv
[09:52:43] + filters
[09:52:43] + 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)
[09:52:43] + Framerate Shaper (mode=2:rate=27000000/900000)
[09:52:43] + frame rate: 23.976 fps -> peak rate limited to 30.000 fps
[09:52:43] + Crop and Scale (width=720:height=388:crop-top=22:crop-bottom=22:crop-left=0:crop-right=0)
[09:52:43] + source: 1920 * 1080, crop (22/22/0/0): 1920 * 1036, scale: 720 * 388
[09:52:43] + Output geometry
[09:52:43] + storage dimensions: 720 x 388
[09:52:43] + pixel aspect ratio: 1 : 1
[09:52:43] + display dimensions: 720 x 388
[09:52:43] + encoder: H.264 (libx264)
[09:52:43] + preset: fast
[09:52:43] + profile: auto
[09:52:43] + level: auto
[09:52:43] + quality: 20.00 (RF)
[09:52:43] + color profile: 1-1-1
[09:52:43] * audio track 1
[09:52:43] + decoder: English (DTS) (5.1 ch) (1536 kbps) (track 1, id 0x1)
[09:52:43] + bitrate: 1536 kbps, samplerate: 48000 Hz
[09:52:43] + dither: triangular
[09:52:43] + encoder: AAC (libavcodec)
[09:52:43] + bitrate: 128 kbps, samplerate: 48000 Hz
[09:52:43] sync: expecting 1462 video frames
[09:52:43] encx264: min-keyint: 24, keyint: 240
[09:52:43] encx264: encoding at constant RF 20.000000
[09:52:43] encx264: unparsed options: ref=2:weightp=1:subme=6:rc-lookahead=30
x264 [info]: using SAR=1/1
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
x264 [info]: profile High, level 3.0, 4:2:0, 8-bit
Encoding: task 1 of 1, 0.00 %[09:52:43] sync: first pts video is 0
[09:52:43] sync: Chapter 1 at frame 1 time 0
[09:52:43] sync: first pts audio 0x1 is 630
Encoding: task 1 of 1, 94.66 [09:53:12] reader: done. 1 scr changes%02s)
Encoding: task 1 of 1, 95.83 % (53.14 fps, avg 48.66 fps, ETA 00h00m02s)[09:53:13] work: average encoding speed for job is 48.662853 fps
Encoding: task 1 of 1, 95.83 % (53.14 fps, avg 48.66 fps, ETA 00h00m02s)[09:53:13] comb detect: heavy 410 | light 567 | uncombed 465 | total 1442
[09:53:13] vfr: 1442 frames output, 0 dropped and 0 duped for CFR/PFR
[09:53:13] vfr: lost time: 0 (0 frames)
[09:53:13] vfr: gained time: 0 (0 frames) (0 not accounted for)
[09:53:13] dca-decoder done: 5638 frames, 0 decoder errors
[09:53:13] h264_qsv-decoder done: 1442 frames, 0 decoder errors
[09:53:13] sync: got 1442 frames, 1462 expected
[09:53:13] sync: framerate min 23.976 fps, max 23.976 fps, avg 23.976 fps
x264 [info]: frame I:11 Avg QP:16.15 size: 61075
x264 [info]: frame P:389 Avg QP:19.99 size: 10801
x264 [info]: frame B:1042 Avg QP:24.84 size: 2489
x264 [info]: consecutive B-frames: 2.6% 2.8% 1.5% 93.2%
x264 [info]: mb I I16..4: 7.9% 43.5% 48.6%
x264 [info]: mb P I16..4: 0.6% 4.5% 3.3% P16..4: 19.4% 12.6% 9.9% 0.0% 0.0% skip:49.8%
x264 [info]: mb B I16..4: 0.3% 0.8% 0.8% B16..8: 11.6% 7.5% 1.8% direct: 4.2% skip:72.9% L0:32.3% L1:36.3% BI:31.4%
x264 [info]: 8x8 transform intra:47.4% inter:42.3%
x264 [info]: coded y,uvDC,uvAC intra: 80.6% 91.8% 77.8% inter: 10.5% 13.7% 5.4%
x264 [info]: i16 v,h,dc,p: 60% 14% 9% 17%
x264 [info]: i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 20% 18% 12% 7% 7% 8% 9% 9% 10%
x264 [info]: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 27% 16% 10% 6% 9% 9% 8% 7% 7%
x264 [info]: i8c dc,h,v,p: 38% 20% 28% 14%
x264 [info]: Weighted P-Frames: Y:0.0% UV:0.0%
x264 [info]: ref P L0: 77.0% 23.0%
x264 [info]: ref B L0: 90.8% 9.2%
x264 [info]: ref B L1: 96.7% 3.3%
x264 [info]: kb/s:993.18
Muxing: this may take awhile...[09:53:13] mux: track 0, 1442 frames, 7466165 bytes, 992.43 kbps, fifo 2048
[09:53:13] mux: track 1, 2820 frames, 967718 bytes, 128.63 kbps, fifo 4096
[09:53:13] libhb: work result = 0
- qsv_h264
Code: Select all
HandBrakeCLI --input "H264.DTS.SRT.mkv" --title 1 --start-at seconds:0 --stop-at seconds:60 --encoder "qsv_h264" --encoder-preset "balanced" --quality 20 --rate 30.000 --pfr --width 720 --height 388 --crop 22:22:0:0 --non-anamorphic --modulus 2 --comb-detect --no-decomb --no-deinterlace --no-detelecine --enable-qsv-decoding --output "H264.DTS.SRT.TEST.qsv_h264.mp4"
Code: Select all
Cannot load nvEncodeAPI64.dll
[09:58:17] hb_init: starting libhb thread
[09:58:17] thread 1 started ("libhb")
HandBrake 20190822200620-a58118b-master (2019082201) - MinGW x86_64 - https://handbrake.fr
4 CPUs detected
Opening H264.DTS.SRT.mkv...
[09:58:17] CPU: Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz
[09:58:17] - Intel microarchitecture Kaby Lake
[09:58:17] - logical processor count: 4
[09:58:17] Intel Quick Sync Video support: yes
[09:58:17] - Intel Media SDK hardware: API 1.29 (minimum: 1.3)
[09:58:17] - H.264 encoder: yes
[09:58:17] - preferred implementation: hardware (any) via D3D11
[09:58:17] - capabilities (hardware): breftype icq+la+i+downs vsinfo opt1 opt2+mbbrc+extbrc+trellis+ib_adapt+nmpslice
[09:58:17] - H.265 encoder: yes (8bit: yes, 10bit: yes)
[09:58:17] - preferred implementation: hardware (any) via D3D11
[09:58:17] - capabilities (hardware): bpyramid icq vsinfo opt1
[09:58:17] hb_scan: path=H264.DTS.SRT.mkv, title_index=1
udfread ERROR: ECMA 167 Volume Recognition failed
src/libbluray/disc/disc.c:323: failed opening UDF image H264.DTS.SRT.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
[09:58:17] bd: not a bd - trying as a stream/file instead
libdvdnav: Using dvdnav version 6.0.0
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
[09:58:17] dvd: not a dvd - trying as a stream/file instead
Input #0, matroska,webm, from 'H264.DTS.SRT.mkv':
Metadata:
encoder : libebml v0.7.7 + libmatroska v0.8.1
creation_time : 2009-09-09T01:14:17.000000Z
Duration: 00:01:00.15, start: 0.000000, bitrate: 11303 kb/s
Stream #0:0(eng): Video: h264 (High), yuv420p(progressive), 1920x1080 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc (default)
Stream #0:1(eng): Audio: dts (DTS), 48000 Hz, 5.1(side), fltp, 1536 kb/s (default)
Stream #0:2(eng): Subtitle: subrip (default)
[09:58:17] scan: decoding previews for title 1
[09:58:17] scan: audio 0x1: dca, rate=48000Hz, bitrate=1536000 English (DTS) (5.1 ch) (1536 kbps)
Scanning title 1 of 1, preview 9, 90.00 %[09:58:17] scan: 10 previews, 1920x1080, 23.976 fps, autocrop = 22/22/0/0, aspect 16:9, PAR 1:1
[09:58:17] scan: supported video decoders: avcodec qsv
[09:58:18] libhb: scan thread found 1 valid title(s)
+ Using preset: CLI Default
+ title 1:
+ stream: H264.DTS.SRT.mkv
+ duration: 00:01:00
+ size: 1920x1080, pixel aspect: 1/1, display aspect: 1.78, 23.976 fps
+ autocrop: 22/22/0/0
+ chapters:
+ 1: duration 00:01:00
+ audio tracks:
+ 1, English (DTS) (5.1 ch) (1536 kbps) (iso639-2: eng), 48000Hz, 1536000bps
+ subtitle tracks:
+ 1, English [UTF-8]
[09:58:18] HB_FILTER_VFR filter is disabled
[09:58:18] HB_FILTER_CROP_SCALE filter is disabled
[09:58:18] 1 job(s) to process
[09:58:18] json job:
{
"Audio": {
"AudioList": [
{
"Bitrate": 128,
"CompressionLevel": -1.0,
"DRC": 0.0,
"DitherMethod": "auto",
"Encoder": "av_aac",
"Gain": 0.0,
"Mixdown": "dpl2",
"NormalizeMixLevel": false,
"PresetEncoder": "av_aac",
"Quality": -3.0,
"Samplerate": 0,
"Track": 0
}
],
"CopyMask": [
"copy:aac",
"copy:ac3",
"copy:eac3",
"copy:dtshd",
"copy:dts",
"copy:mp3",
"copy:truehd",
"copy:flac"
],
"FallbackEncoder": "av_aac"
},
"Destination": {
"AlignAVStart": false,
"ChapterList": [
{
"Duration": {
"Hours": 0,
"Minutes": 1,
"Seconds": 0,
"Ticks": 5413140
},
"Name": ""
}
],
"ChapterMarkers": false,
"File": "H264.DTS.SRT.TEST.qsv_h264.mp4",
"InlineParameterSets": false,
"Mp4Options": {
"IpodAtom": false,
"Mp4Optimize": false
},
"Mux": "m4v"
},
"Filters": {
"FilterList": [
{
"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"
}
}
]
},
"Metadata": {},
"PAR": {
"Den": 1,
"Num": 1
},
"SequenceID": 0,
"Source": {
"Angle": 0,
"Path": "H264.DTS.SRT.mkv",
"Range": {
"End": 5400000,
"Type": "time"
},
"Title": 1
},
"Subtitle": {
"Search": {
"Burn": true,
"Default": false,
"Enable": false,
"Forced": false
},
"SubtitleList": []
},
"Video": {
"ColorFormat": 0,
"ColorMatrix": 1,
"ColorPrimaries": 1,
"ColorRange": 0,
"ColorTransfer": 1,
"Encoder": "qsv_h264",
"Preset": "balanced",
"QSV": {
"AsyncDepth": 4,
"Decode": true
},
"Quality": 20.0,
"Turbo": false,
"TwoPass": false
}
}
[09:58:18] D3D9: 1 adapters available
[09:58:18] Filter with ID=3 is disabled
[09:58:18] starting job
[09:58:18] job configuration:
[09:58:18] * source
[09:58:18] + H264.DTS.SRT.mkv
[09:58:18] + title 1, start 00:00:0.00 stop 00:01:0.00
[09:58:18] + container: matroska,webm
[09:58:18] + data rate: 11303 kbps
[09:58:18] * destination
[09:58:18] + H264.DTS.SRT.TEST.qsv_h264.mp4
[09:58:18] + container: MPEG-4 (libavformat)
[09:58:18] * video track
[09:58:18] + decoder: h264_qsv
[09:58:18] + Output geometry
[09:58:18] + storage dimensions: 1920 x 1080
[09:58:18] + pixel aspect ratio: 1 : 1
[09:58:18] + display dimensions: 1920 x 1080
[09:58:18] + encoder: H.264 (Intel Media SDK)
[09:58:18] + preset: balanced
[09:58:18] + quality: 20.00 (ICQ)
[09:58:18] + color profile: 1-1-1
[09:58:18] * audio track 1
[09:58:18] + decoder: English (DTS) (5.1 ch) (1536 kbps) (track 1, id 0x1)
[09:58:18] + bitrate: 1536 kbps, samplerate: 48000 Hz
[09:58:18] + mixdown: Dolby Pro Logic II
[09:58:18] + dither: triangular
[09:58:18] + encoder: AAC (libavcodec)
[09:58:18] + bitrate: 128 kbps, samplerate: 48000 Hz
[09:58:18] sync: expecting 1462 video frames
Encoding: task 1 of 1, 0.00 %[09:58:18] encqsvInit: using full QSV path
[09:58:18] encqsvInit: H.264/AVC High profile @ level 4.0
[09:58:18] encqsvInit: TargetUsage 4 AsyncDepth 4
[09:58:18] encqsvInit: GopRefDist 3 GopPicSize 24 NumRefFrame 1
[09:58:18] encqsvInit: BFramesMax 2 BRefType off
[09:58:18] encqsvInit: RateControlMethod ICQ ICQQuality 20
Encoding: task 1 of 1, 0.00 %[09:58:18] sync: first pts video is 0
[09:58:18] sync: Chapter 1 at frame 1 time 0
[09:58:18] sync: first pts audio 0x1 is 630
Encoding: task 1 of 1, 1.57 %[09:58:18] qsv_enc_init: using 'hardware (1) via D3D9' implementation, API: 1.29
Encoding: task 1 of 1, 94.05 % (196.91 fps, avg 185.56 fps, ETA 00h00m01s)[09:58:25] reader: done. 1 scr changes
Encoding: task 1 of 1, 95.83 % (192.47 fps, avg 187.01 fps, ETA 00h00m00s)[09:58:26] work: average encoding speed for job is 187.007339 fps
Encoding: task 1 of 1, 95.83 % (192.47 fps, avg 187.01 fps, ETA 00h00m00s)[09:58:26] dca-decoder done: 5638 frames, 0 decoder errors
[09:58:26] h264_qsv-decoder done: 1442 frames, 0 decoder errors
[09:58:26] sync: got 1442 frames, 1462 expected
[09:58:26] sync: framerate min 23.976 fps, max 23.976 fps, avg 23.976 fps
Encoding: task 1 of 1, 95.83 % (192.47 fps, avg 187.01 fps, ETA 00h00m00s)[09:58:26] mux: track 0, 1442 frames, 58584102 bytes, 7787.19 kbps, fifo 512
[09:58:26] mux: track 1, 2820 frames, 967718 bytes, 128.63 kbps, fifo 1024
[09:58:26] libhb: work result = 0