Intel QSV (H.264) Coding generates messy outputs

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.

*******************************
tjsuominen
Posts: 68
Joined: Fri Jan 04, 2013 9:29 pm

Intel QSV (H.264) Coding generates messy outputs

Post by tjsuominen » Wed Dec 28, 2016 10:44 am

With HB version 0.10.5 everything was working OK, but after updating to 1.0.0 (or latest nightly) on Windows 10, the generated .MKV file is blinking / messy (please see PNG image below). EDIT: The messy output (blinking) comes every 2-3 sec, then back to OK, then again messy output...

Using Intel QSV H.264. This does not happen with e.g. H.264 (x264)
My Intel Drivers for HD4000 are latest one from Lenovo.

Screenshot image from the messy output MKV...
https://1drv.ms/i/s!AuMivHwSi2p1irFPSFhM1kunpMX3XQ

What are the steps to reproduce this problem:
1) Generated .MKV file with (validated with VLC)
2) Open that to HB
3) Use my personal preset
4) Pre-view OR let HB Generate the output > output is messy (see image from above)

What version of HandBrake you are running:
1.0.0 or latest nightly.

What operating system and version and you running (e.g. OSX 10.11, Windows 7, Ubuntu 14):
Windows 10 with latest updates.

If there was any exception or error displayed, please copy it and paste it here:
No visible error during HB process time.
Just see the output file... https://1drv.ms/i/s!AuMivHwSi2p1irFPSFhM1kunpMX3XQ

Please include the scan or encode log:

Code: Select all

HandBrake Nightly 20161227220708-57fb5dc-master (2016122801) - 64bit
OS: Microsoft Windows NT 10.0.14393.0 - 64bit
CPU: Intel(R) Core(TM) i5-3337U CPU @ 1.80GHz
Ram: 12107 MB, 
GPU Information:
  Intel(R) HD Graphics 4000 - 10.18.10.4425
Screen: 1600x900
Temp Dir: C:\Users\Timo\AppData\Local\Temp\
Install Dir: C:\Program Files\Tools\Handbrake
Data Dir: C:\Users\Timo\AppData\Roaming\HandBrake Team\HandBrake\1.0.1.0

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


# Starting Encode ...

[12:23:58] hb_init: starting libhb thread
[12:23:58] 1 job(s) to process
[12:23:58] json job:
{
  "Audio": {
    "AudioList": [
      {
        "Bitrate": 448,
        "DRC": 0.0,
        "Encoder": 2048,
        "Gain": 0.0,
        "Mixdown": 7,
        "NormalizeMixLevel": false,
        "Samplerate": 0,
        "Name": "English",
        "Track": 0,
        "DitherMethod": 0
      },
      {
        "Bitrate": 448,
        "DRC": 0.0,
        "Encoder": 2048,
        "Gain": 0.0,
        "Mixdown": 7,
        "NormalizeMixLevel": false,
        "Samplerate": 0,
        "Name": "Finnish",
        "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"
      },
      {
        "Name": "Chapter 13"
      },
      {
        "Name": "Chapter 14"
      },
      {
        "Name": "Chapter 15"
      },
      {
        "Name": "Chapter 16"
      }
    ],
    "ChapterMarkers": true,
    "File": "C:\\Temp\\Output\\Movie-Encoded\\The Angry Birds Movie (2016)_preview.mkv",
    "Mp4Options": {
      "IpodAtom": false,
      "Mp4Optimize": false
    },
    "Mux": 2097152
  },
  "Filters": {
    "FilterList": [
      {
        "ID": 11,
        "Settings": {
          "crop-bottom": "22",
          "crop-left": "0",
          "crop-right": "0",
          "crop-top": "22",
          "height": "1040",
          "width": "1920"
        }
      },
      {
        "ID": 6,
        "Settings": {
          "mode": "1"
        }
      }
    ]
  },
  "PAR": {
    "Num": 260,
    "Den": 259
  },
  "Metadata": {},
  "SequenceID": 0,
  "Source": {
    "Angle": 1,
    "Range": {
      "Type": "preview",
      "Start": 2,
      "End": 900000,
      "SeekPoints": 10
    },
    "Title": 1,
    "Path": "C:\\Temp\\Output\\Movie-Non-Encoded\\Angry_Birds_Movie_t01.mkv"
  },
  "Subtitle": {
    "Search": {
      "Burn": false,
      "Default": false,
      "Enable": false,
      "Forced": false
    },
    "SubtitleList": [
      {
        "Burn": false,
        "Default": true,
        "Forced": false,
        "ID": 1,
        "Offset": 0,
        "Track": 0
      }
    ]
  },
  "Video": {
    "Encoder": 256,
    "Level": "auto",
    "TwoPass": false,
    "Turbo": false,
    "ColorMatrixCode": 0,
    "Options": "",
    "Preset": "speed",
    "Profile": "auto",
    "Quality": 20.0,
    "OpenCL": false,
    "HWDecode": false,
    "QSV": {
      "Decode": true,
      "AsyncDepth": 0
    }
  }
}
[12:23:58] CPU: Intel(R) Core(TM) i5-3337U CPU @ 1.80GHz
[12:23:58]  - Intel microarchitecture Ivy Bridge
[12:23:58]  - logical processor count: 4
[12:23:58] OpenCL device #1: Intel(R) Corporation Intel(R) HD Graphics 4000
[12:23:58]  - OpenCL version: 1.2
[12:23:58]  - driver version: 10.18.10.4425
[12:23:58]  - device type:    GPU
[12:23:58]  - supported:      no
[12:23:58] Intel Quick Sync Video support: yes
[12:23:58]  - Intel Media SDK hardware: API 1.11 (minimum: 1.3)
[12:23:58]  - H.264 encoder: yes
[12:23:58]     - preferred implementation: hardware (any)
[12:23:58]     - capabilities (hardware):  vsinfo opt1 opt2+extbrc+ib_adapt+nmpslice
[12:23:58]  - H.265 encoder: no
[12:23:58] hb_scan: path=C:\Temp\Output\Movie-Non-Encoded\Angry_Birds_Movie_t01.mkv, title_index=1
udfread ERROR: ECMA 167 Volume Recognition failed
src/libbluray/disc/disc.c:274: failed opening UDF image C:\Temp\Output\Movie-Non-Encoded\Angry_Birds_Movie_t01.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
[12:23:58] 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
[12:23:58] dvd: not a dvd - trying as a stream/file instead
Input #0, matroska,webm, from 'C:\Temp\Output\Movie-Non-Encoded\Angry_Birds_Movie_t01.mkv':
  Metadata:
    title           : Angry Birds Movie
  Duration: 01:37:13.82, start: 0.000000, bitrate: N/A
    Chapter #0:0: start 0.000000, end 424.715958
    Metadata:
      title           : Chapter 01
    Chapter #0:1: start 424.715958, end 818.108958
    Metadata:
      title           : Chapter 02
    Chapter #0:2: start 818.108958, end 1222.387833
    Metadata:
      title           : Chapter 03
    Chapter #0:3: start 1222.387833, end 1538.620417
    Metadata:
      title           : Chapter 04
    Chapter #0:4: start 1538.620417, end 1977.058417
    Metadata:
      title           : Chapter 05
    Chapter #0:5: start 1977.058417, end 2314.812500
    Metadata:
      title           : Chapter 06
    Chapter #0:6: start 2314.812500, end 2496.327167
    Metadata:
      title           : Chapter 07
    Chapter #0:7: start 2496.327167, end 2832.579750
    Metadata:
      title           : Chapter 08
    Chapter #0:8: start 2832.579750, end 3124.287833
    Metadata:
      title           : Chapter 09
    Chapter #0:9: start 3124.287833, end 3367.572542
    Metadata:
      title           : Chapter 10
    Chapter #0:10: start 3367.572542, end 3548.711833
    Metadata:
      title           : Chapter 11
    Chapter #0:11: start 3548.711833, end 3823.361208
    Metadata:
      title           : Chapter 12
    Chapter #0:12: start 3823.361208, end 4305.801500
    Metadata:
      title           : Chapter 13
    Chapter #0:13: start 4305.801500, end 4735.522458
    Metadata:
      title           : Chapter 14
    Chapter #0:14: start 4735.522458, end 5034.821458
    Metadata:
      title           : Chapter 15
    Chapter #0:15: start 5034.821458, end 5833.828000
    Metadata:
      title           : Chapter 16
    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
    Metadata:
      BPS-eng         : 24634915
      DURATION-eng    : 01:37:13.828000000
      NUMBER_OF_FRAMES-eng: 139872
      NUMBER_OF_BYTES-eng: 17964482242
      SOURCE_ID-eng   : 001011
      _STATISTICS_WRITING_APP-eng: MakeMKV v1.10.4 win(x64-release)
      _STATISTICS_WRITING_DATE_UTC-eng: 2016-12-28 07:19:45
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID
    Stream #0:1(eng): Audio: dts (DTS-HD MA)
      48000 Hz, 5.1, fltp, 1536 kb/s (default)
    Metadata:
      title           : Surround 7.1
      BPS-eng         : 2700866
      DURATION-eng    : 01:37:13.834666666
      NUMBER_OF_FRAMES-eng: 546922
      NUMBER_OF_BYTES-eng: 1969550920
      SOURCE_ID-eng   : 001100
      _STATISTICS_WRITING_APP-eng: MakeMKV v1.10.4 win(x64-release)
      _STATISTICS_WRITING_DATE_UTC-eng: 2016-12-28 07:19:45
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID
    Stream #0:2(fin): Audio: ac3
      48000 Hz, 5.1, fltp, 640 kb/s
    Metadata:
      title           : Surround 5.1
      BPS-eng         : 640000
      DURATION-eng    : 01:37:13.856000000
      NUMBER_OF_FRAMES-eng: 182308
      NUMBER_OF_BYTES-eng: 466708480
      SOURCE_ID-eng   : 001103
      _STATISTICS_WRITING_APP-eng: MakeMKV v1.10.4 win(x64-release)
      _STATISTICS_WRITING_DATE_UTC-eng: 2016-12-28 07:19:45
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID
    Stream #0:3(fin): Subtitle: hdmv_pgs_subtitle (default)
    Metadata:
      BPS-eng         : 34331
      DURATION-eng    : 01:35:49.306062500
      NUMBER_OF_FRAMES-eng: 3008
      NUMBER_OF_BYTES-eng: 24672604
      SOURCE_ID-eng   : 001203
      _STATISTICS_WRITING_APP-eng: MakeMKV v1.10.4 win(x64-release)
      _STATISTICS_WRITING_DATE_UTC-eng: 2016-12-28 07:19:45
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID
[12:23:58] scan: decoding previews for title 1
[12:23:59] scan: audio 0x1: dca, rate=48000Hz, bitrate=1536000 English (DTS-HD MA) (5.1 ch)
[12:23:59] scan: audio 0x2: ac3, rate=48000Hz, bitrate=640000 suomi (AC3) (5.1 ch)
[12:24:01] scan: 10 previews, 1920x1080, 23.976 fps, autocrop = 22/22/0/0, aspect 16:9, PAR 1:1
[12:24:01] scan: supported video decoders: avcodec qsv
[12:24:01] libhb: scan thread found 1 valid title(s)
[12:24:01] starting job
[12:24:01] work: track 1, dithering not supported by codec
[12:24:01] work: track 2, dithering not supported by codec
[12:24:01] job configuration:
[12:24:01]  * source
[12:24:01]    + C:\Temp\Output\Movie-Non-Encoded\Angry_Birds_Movie_t01.mkv
[12:24:01]    + title 1, start 00:00:0.00 stop 00:00:10.00
[12:24:01]    + container: matroska,webm
[12:24:01]  * destination
[12:24:01]    + C:\Temp\Output\Movie-Encoded\The Angry Birds Movie (2016)_preview.mkv
[12:24:01]    + container: Matroska (libavformat)
[12:24:01]      + chapter markers
[12:24:01]  * video track
[12:24:01]    + decoder: h264_qsv
[12:24:01]    + filters
[12:24:01]      + Framerate Shaper (mode=1)
[12:24:01]        + frame rate: 23.976 fps -> constant 23.976 fps
[12:24:01]      + Crop and Scale (width=1920:height=1040:crop-top=22:crop-bottom=22:crop-left=0:crop-right=0)
[12:24:01]        + source: 1920 * 1080, crop (22/22/0/0): 1920 * 1036, scale: 1920 * 1040
[12:24:01]    + Output geometry
[12:24:01]      + storage dimensions: 1920 x 1040
[12:24:01]      + pixel aspect ratio: 260 : 259
[12:24:01]      + display dimensions: 1927 x 1040
[12:24:01]    + encoder: H.264 (Intel Media SDK)
[12:24:01]      + preset:  speed
[12:24:01]      + profile: auto
[12:24:01]      + level:   auto
[12:24:01]      + quality: 20.00 (QP)
[12:24:01]  * subtitle track 1, Finnish (track 0, id 0x3) Picture [PGS] -> Passthrough, Default
[12:24:01]  * audio track 1
[12:24:01]    + name: English
[12:24:01]    + decoder: English (DTS-HD MA) (5.1 ch) (track 1, id 0x1)
[12:24:01]      + bitrate: 1536 kbps, samplerate: 48000 Hz
[12:24:01]    + mixdown: 5.1 Channels
[12:24:01]    + encoder: AC3 (libavcodec)
[12:24:01]      + bitrate: 448 kbps, samplerate: 48000 Hz
[12:24:01]  * audio track 2
[12:24:01]    + name: Finnish
[12:24:01]    + decoder: suomi (AC3) (5.1 ch) (track 2, id 0x2)
[12:24:01]      + bitrate: 640 kbps, samplerate: 48000 Hz
[12:24:01]    + mixdown: 5.1 Channels
[12:24:01]    + encoder: AC3 (libavcodec)
[12:24:01]      + bitrate: 448 kbps, samplerate: 48000 Hz
[12:24:01] sync: expecting 263 video frames
[12:24:01] encqsvInit: using encode-only path
[12:24:01] encqsvInit: H.264/AVC High profile @ level 4.0
[12:24:01] encqsvInit: TargetUsage 4 AsyncDepth 3
[12:24:01] encqsvInit: GopRefDist 4 GopPicSize 32 NumRefFrame 2
[12:24:01] encqsvInit: BFramesMax 3
[12:24:01] encqsvInit: RateControlMethod CQP with QPI 20 QPP 22 QPB 24
[12:24:01] sync: first pts video is 0
[12:24:01] sync: first pts audio 0x1 is 4500
[12:24:01] sync: first pts audio 0x2 is 4500
[12:24:01] qsv_enc_init: using 'hardware (1)' implementation, API: 1.11
[12:24:02] sync: first pts subtitle 0x3 is 292770
[12:24:03] sync: reached audio 0x1 pts 900180, exiting early
[12:24:03] sync: reached audio 0x2 pts 900180, exiting early
[12:24:04] sync: reached video pts 900900, exiting early
[12:24:04] work: average encoding speed for job is 0.000000 fps
[12:24:04] vfr: 240 frames output, 0 dropped and 0 duped for CFR/PFR
[12:24:04] vfr: lost time: 0 (0 frames)
[12:24:04] vfr: gained time: 0 (0 frames) (0 not accounted for)
[12:24:04] dca-decoder done: 1333 frames, 0 decoder errors
[12:24:04] ac3-decoder done: 445 frames, 0 decoder errors
[12:24:04] h264_qsv-decoder done: 324 frames, 0 decoder errors
[12:24:04] sync: got 240 frames, 263 expected
[12:24:04] sync: framerate min 23.981 fps, max 23.981 fps, avg 23.976 fps
[12:24:04] mux: track 0, 240 frames, 9405495 bytes, 7516.88 kbps, fifo 256
[12:24:04] mux: track 1, 310 frames, 555520 bytes, 443.97 kbps, fifo 512
[12:24:04] mux: track 2, 310 frames, 555520 bytes, 443.97 kbps, fifo 512
[12:24:04] mux: track 3, 5 frames, 55297 bytes, 44.19 kbps, fifo 8
[12:24:04] libhb: work result = 0

# Encode Completed ...

 

tjsuominen
Posts: 68
Joined: Fri Jan 04, 2013 9:29 pm

Re: Intel QSV (H.264) Coding generates messy outputs

Post by tjsuominen » Wed Dec 28, 2016 1:15 pm

And to add: The messy output (messynes blinking) comes every 1-2 sec, then back to OK 1-2 sec, then again messy...

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

Re: Intel QSV (H.264) Coding generates messy outputs

Post by Woodstock » Wed Dec 28, 2016 3:23 pm

Does it do better if you disable QSV decode?

The assumption is that this video issue does NOT exist in the source; if it does, that would be a MakeMKV issue, rather than handbrake.

tjsuominen
Posts: 68
Joined: Fri Jan 04, 2013 9:29 pm

Re: Intel QSV (H.264) Coding generates messy outputs

Post by tjsuominen » Wed Dec 28, 2016 4:25 pm

Without QSV decode OK (= with other decode). But I wanna use QSV due to it's performance.
The problem is NOT in the MakeMKV generated .mkv source, checked with VLC (as stated in my original post).

Possible bug?

The Intel Video drivers are latest one from Lenovo (= no change from previous HB version where this was working ok).

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

Re: Intel QSV (H.264) Coding generates messy outputs

Post by maxim_d33 » Thu Dec 29, 2016 12:35 am

can you try to disable any filter, as resize/shaper ?

in any case - a sample of input video would be good to look at.

tjsuominen
Posts: 68
Joined: Fri Jan 04, 2013 9:29 pm

Re: Intel QSV (H.264) Coding generates messy outputs

Post by tjsuominen » Thu Dec 29, 2016 8:25 am

Hi maxim_d33,

I have not used any resize / shaping filters. Only automatic crop.

QSV encoding is the only that fails by producing these messy outputs (no matter what .mkv source I use). Running now with H.265 but it's _so_ slow, only 8-15 FPS... With QSV on HB 0.10.5 I got ~200 FPS. So I definitely hope this gets sorted out. Here for help! :)

//timo

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

Re: Intel QSV (H.264) Coding generates messy outputs

Post by maxim_d33 » Thu Dec 29, 2016 3:57 pm

tjsuominen,
see in your log: H.265 encoder: no
it is general characteristic of your HW,
h265/HEVC supported in HW only from recent HW and regardless of HB version.

h264 support is the same and will be yet improved in upcoming HB versions

messy output - can you try to remove any crop ?

tjsuominen
Posts: 68
Joined: Fri Jan 04, 2013 9:29 pm

Re: Intel QSV (H.264) Coding generates messy outputs

Post by tjsuominen » Thu Dec 29, 2016 10:15 pm

I'm using QSV H.264, It's so much faster (with good quality) than anything else on my HW.

Messy output: I put manually the cropping to 0 (top & bottom). Result is still the same (messy). The weird thing is that this messyness and OK swap every 1-2 sec (OK 1-2 sec, messy, 1-2, OK 1-2 sec...)

Here is sample Screen record of Preview from Handbrake (played by VLC) to see what actually happens (= messy):
https://1drv.ms/u/s!AuMivHwSi2p1irFQUty9TkFOU8HaVA - the file is ~12 mb .WEBM file.

It seems to be strangely "cropping", but the weird thing is this swapping between OK and messyness...

And to clarify: this happens ONLY with QSV coding... with 1.0.0 (or latest nightly) but NOT with 0.10.5...

If only I'd knew what's wrong ;) Let's continue... :)

scarax
New User
Posts: 1
Joined: Fri Dec 30, 2016 11:33 pm

Re: Intel QSV (H.264) Coding generates messy outputs

Post by scarax » Fri Dec 30, 2016 11:34 pm

Just letting you know I experience the exact same issue reported here. I've reverted to 0.10.5 as there are many other bugs in 1.0.1 as well.

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

Re: Intel QSV (H.264) Coding generates messy outputs

Post by maxim_d33 » Sat Dec 31, 2016 11:20 am

thanks for the output but to fix the issue - any input sample will be appreciated and helpful

ashleylai87
Posts: 33
Joined: Tue Jul 30, 2013 3:54 am

Re: Intel QSV (H.264) Coding generates messy outputs

Post by ashleylai87 » Sat Dec 31, 2016 1:38 pm

I also encounter the same problem with original poster ever since installing 1.0.0.0 . It happen with all my videos.

Notice this section :
[12:24:01] * video track
[12:24:01] + decoder: h264_qsv


and

[12:24:01] + Crop and Scale (width=1920:height=1040:crop-top=22:crop-bottom=22:crop-left=0:crop-right=0)
[12:24:01] + source: 1920 * 1080, crop (22/22/0/0): 1920 * 1036, scale: 1920 * 1040
[12:24:01] + Output geometry
[12:24:01] + storage dimensions: 1920 x 1040
[12:24:01] + pixel aspect ratio: 260 : 259
[12:24:01] + display dimensions: 1927 x 1040



However, further down the log:
[12:24:01] encqsvInit: using encode-only path
[12:24:01] encqsvInit: H.264/AVC High profile @ level 4.0


Why does "encode-only path" being used when the decoder is "h264_qsv"?
Where is the Intel VPP Resizer?

Previous version :
Using full-path when decoder is h264_qsv + encoder QSV

and

Intel VPP Resizer for resizing.

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

Re: Intel QSV (H.264) Coding generates messy outputs

Post by Woodstock » Sat Dec 31, 2016 2:27 pm

Video does not stay in the QSV hardware - it is decoded, filtered according to your settings, then encoded. QSV doesn't implement the filters.

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

Re: Intel QSV (H.264) Coding generates messy outputs

Post by s55 » Sat Dec 31, 2016 2:49 pm

To extend. The QSV Cropscale / deinterlace filters are current disabled and not used. These will hopefully be restored in a future 1.0.x version.

ashleylai87
Posts: 33
Joined: Tue Jul 30, 2013 3:54 am

Re: Intel QSV (H.264) Coding generates messy outputs

Post by ashleylai87 » Sat Dec 31, 2016 3:31 pm

s55 wrote:To extend. The QSV Cropscale / deinterlace filters are current disabled and not used. These will hopefully be restored in a future 1.0.x version.
Oh...Okay....nothing big about the QSV cropscale.

But how about h264_qsv decoder?
I can't seem to get qsv decoder working. (Reverting to previous version works fine where both decode+encode are done in QSV, only 10-15% cpu usage which is probably due to audio conversion usage)

The log said "decoder: h264_qsv", but further down the log "encqsvInit: using encode-only path"
It does seem to me, h264_qsv decoder is not being used to decode the video because my CPU usage is 80-90%. QSV is being used for encoding just fine.

*Note:Video source is 100% 8bit L4.1 AVC BD compliant. ^.^

Edit: By the way, when the messy output as mentioned by original poster happens....sometime, the log also mentions:
[h264 @ 000002dfa20828a0] reference picture missing during reorder
[h264 @ 000002dfa20828a0] reference picture missing during reorder
[h264 @ 000002dfa20828a0] reference picture missing during reorder
[h264 @ 000002dfa20828a0] Missing reference picture
[h264 @ 000002dfa20828a0] Missing reference picture
[h264 @ 000002dfa20828a0] Missing reference picture
[h264 @ 000002dfa2081760] reference picture missing during reorder
[h264 @ 000002dfa2081760] reference picture missing during reorder
[h264 @ 000002dfa2081760] reference picture missing during reorder
[h264 @ 000002dfa2081760] reference picture missing during reorder
[h264 @ 000002dfa2081760] Missing reference picture
[h264 @ 000002dfa2081760] Missing reference picture
[h264 @ 000002dfa2081760] Missing reference picture
[h264 @ 000002dfa2081760] Missing reference picture
[h264 @ 000002dfa2082440] reference picture missing during reorder
[h264 @ 000002dfa2082440] reference picture missing during reorder
[h264 @ 000002dfa2082440] reference picture missing during reorder
[h264 @ 000002dfa2082440] Missing reference picture
[h264 @ 000002dfa2082440] Missing reference picture
[h264 @ 000002dfa2082440] Missing reference picture
[h264 @ 000002dfa2081760] reference picture missing during reorder
[h264 @ 000002dfa2081760] reference picture missing during reorder
[h264 @ 000002dfa2081760] reference picture missing during reorder
[h264 @ 000002dfa2081760] Missing reference picture
[h264 @ 000002dfa2081760] Missing reference picture
[h264 @ 000002dfa2081760] Missing reference picture
Interestingly....tjsuominen images on messy output has 4 distinct horizontal colors (probably due to BD compliant "4 slices" stuff).

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

Re: Intel QSV (H.264) Coding generates messy outputs

Post by s55 » Sat Dec 31, 2016 3:59 pm

ZeroCopy is also disabled for now. So extra overhead copying data in memory is probably part of it. So it's not going to do full path. Just QSV decode -> HandBrake Pipeline -> QSV Encode.

Also note if you have any other filters on, they'll eat CPU as well. For example, decomb is on by default not for a lot of presets.

We are basically waiting for some work on LibAV to be completed before we get full functionality back. It just wasn't worth holding back the 1.0 release any further due to it. It should be working, but there is an overhead so may be a bit slower than usual and use higher CPU until full path is restored.

ashleylai87
Posts: 33
Joined: Tue Jul 30, 2013 3:54 am

Re: Intel QSV (H.264) Coding generates messy outputs

Post by ashleylai87 » Sat Dec 31, 2016 4:21 pm

s55 wrote:ZeroCopy is also disabled for now. So extra overhead copying data in memory is probably part of it. So it's not going to do full path. Just QSV decode -> HandBrake Pipeline -> QSV Encode.

Also note if you have any other filters on, they'll eat CPU as well. For example, decomb is on by default not for a lot of presets.

We are basically waiting for some work on LibAV to be completed before we get full functionality back. It just wasn't worth holding back the 1.0 release any further due to it. It should be working, but there is an overhead so may be a bit slower than usual and use higher CPU until full path is restored.
Oh...so that is what Woodstock means.......I could live without zerocopy and vpp cropscale filter.

Anyway.......is there no way to fix the messy weird pixelation output? This is the show stopper for me.
The messy output (blinking) comes every 2-3 sec mentioned by jsuominen probably caused by the weird reorder + reference picture bug I mentioned just now.

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

Re: Intel QSV (H.264) Coding generates messy outputs

Post by maxim_d33 » Sun Jan 01, 2017 5:29 pm

ashleylai87 wrote: ....
Anyway.......is there no way to fix the messy weird pixelation output? This is the show stopper for me.
...
feel free to share any sample , needed for fix.

ashleylai87
Posts: 33
Joined: Tue Jul 30, 2013 3:54 am

Re: Intel QSV (H.264) Coding generates messy outputs

Post by ashleylai87 » Mon Jan 02, 2017 11:36 am

How am I suppose to send sample (10 - 16gb) with my slow adsl upload speed (512kbps)?
Sigh, I give up, might as use old version.

tjsuominen
Posts: 68
Joined: Fri Jan 04, 2013 9:29 pm

Re: Intel QSV (H.264) Coding generates messy outputs

Post by tjsuominen » Mon Jan 02, 2017 12:37 pm

Could you ashleylai87 cut that sample a shorter one :)?

taptaptappie
Posts: 2
Joined: Mon Jan 02, 2017 6:18 pm

Re: Intel QSV (H.264) Coding generates messy outputs

Post by taptaptappie » Mon Jan 02, 2017 6:23 pm

https://postimg.org/image/3vhpwimmb/


is this what you're seeing?

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

Re: Intel QSV (H.264) Coding generates messy outputs

Post by maxim_d33 » Mon Jan 02, 2017 10:52 pm

even a couple of seconds input video with messy output produced will help and allow to start working with the issue,
no need in full video.

ashleylai87
Posts: 33
Joined: Tue Jul 30, 2013 3:54 am

Re: Intel QSV (H.264) Coding generates messy outputs

Post by ashleylai87 » Tue Jan 03, 2017 3:10 am

taptaptappie wrote:https://postimg.org/image/3vhpwimmb/


is this what you're seeing?
Well yes. Sometimes full 4 distinct messy lines, few seconds later 4 messy line exactly the same you posted.

I am starting to think the fault might not lie solely with QSV engine itself.
We got another person posting similar bug viewtopic.php?f=12&t=35603 , but he doesn't make use of QSV decoding and encoding.
As for oRBIT2002 , his original source doesn't use 4 slices, just a single slice which causes entire screen pixelation instead of 4 distinct slices.

Something is wrong at decoding or after decoding postprocessing stage.

taptaptappie
Posts: 2
Joined: Mon Jan 02, 2017 6:18 pm

Re: Intel QSV (H.264) Coding generates messy outputs

Post by taptaptappie » Tue Jan 03, 2017 4:45 pm

Yes- those (4) bars show up about once a second for me.

I just updated handbrake- not using QSV, from an MKV file- and no issues. Decoding to apple TV 4 preset. That seemed to work- for what it's worth.

tjsuominen
Posts: 68
Joined: Fri Jan 04, 2013 9:29 pm

Re: Intel QSV (H.264) Coding generates messy outputs

Post by tjsuominen » Fri Jan 06, 2017 6:02 pm

Any progress on isolating the issue?

The issue still remains with latest Nightly Build (2017010601 - 64 bit)

Other info / help needed?

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

Re: Intel QSV (H.264) Coding generates messy outputs

Post by maxim_d33 » Sun Jan 08, 2017 6:08 pm

@tjsuominen , it is hard to have any progress with no input file to reproduce
oRBIT2002's case looks to be quite different
or you have the same issue with QSV-path ?

Post Reply