Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pixelation problem #787

Closed
jstebbins opened this issue Jun 15, 2017 · 6 comments
Closed

Pixelation problem #787

jstebbins opened this issue Jun 15, 2017 · 6 comments
Assignees
Milestone

Comments

@jstebbins
Copy link
Contributor

Please describe the problem or feature request in detail:

Transcoded video has pixelation that is not seen in source
See https://forum.handbrake.fr/viewtopic.php?f=12&t=36511

What are the steps to reproduce this problem:

Sample provided
https://drive.google.com/drive/folders/0B3INX0MTCyLbR3BiZGxxbVR4OEE

What version of HandBrake you are running:

1.0.7

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

OSX 10.11.6

Was there any error message or error dialog, if so please detail or provide screenshots:

Please provide the full activity log for the encode or scan attempt. You may attach the log as a file, post a pastebin URL to the log, or place the log inline below:

[23:08:13] macgui: Handbrake Version: 1.0.7  (2017040900)
[23:08:13] hb_init: starting libhb thread
[23:08:13] hb_init: starting libhb thread
[23:08:16] macgui: trying to open a folder or file
[23:08:16] macgui: ScanCore scanning titles with a duration of 2 seconds or more
[23:08:16] CPU: Intel(R) Core(TM) i7-4960HQ CPU @ 2.60GHz
[23:08:16]  - Intel microarchitecture Haswell
[23:08:16]  - logical processor count: 8
[23:08:16] hb_scan: path=/Users/MilanHoppe/Desktop/test.mkv, title_index=0
udfread ERROR: ECMA 167 Volume Recognition failed
disc.c:274: failed opening UDF image /Users/MilanHoppe/Desktop/test.mkv
disc.c:352: error opening file BDMV/index.bdmv
disc.c:352: error opening file BDMV/BACKUP/index.bdmv
[23:08:16] bd: not a bd - trying as a stream/file instead
libdvdnav: Using dvdnav version 5.0.1
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
[23:08:16] dvd: not a dvd - trying as a stream/file instead
Input #0, matroska,webm, from '/Users/MilanHoppe/Desktop/test.mkv':
  Duration: 00:00:29.94, start: 0.000000, bitrate: N/A
    Stream #0:0(eng): Video: h264 (High)
      yuv420p, 1920x1080 [PAR 1:1 DAR 16:9], PAR 1:1 DAR 16:9
      25 fps, 1k tbn
    Metadata:
      BPS             : 4457706
      BPS-eng         : 4457706
      DURATION        : 00:00:29.920000000
      DURATION-eng    : 00:00:29.920000000
      NUMBER_OF_FRAMES: 748
      NUMBER_OF_FRAMES-eng: 748
      NUMBER_OF_BYTES : 16671824
      NUMBER_OF_BYTES-eng: 16671824
      _STATISTICS_WRITING_APP: mkvmerge v12.0.0 ('Trust / Lust') 64bit
      _STATISTICS_WRITING_APP-eng: mkvmerge v12.0.0 ('Trust / Lust') 64bit
      _STATISTICS_WRITING_DATE_UTC: 2017-06-09 21:05:35
      _STATISTICS_WRITING_DATE_UTC-eng: 2017-06-09 21:05:35
      _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
    Stream #0:1(ger): Audio: ac3
      48000 Hz, stereo, fltp, 384 kb/s (default)
    Metadata:
      BPS             : 384000
      BPS-eng         : 384000
      DURATION        : 00:00:29.920000000
      DURATION-eng    : 00:00:29.920000000
      NUMBER_OF_FRAMES: 935
      NUMBER_OF_FRAMES-eng: 935
      NUMBER_OF_BYTES : 1436160
      NUMBER_OF_BYTES-eng: 1436160
      _STATISTICS_WRITING_APP: mkvmerge v12.0.0 ('Trust / Lust') 64bit
      _STATISTICS_WRITING_APP-eng: mkvmerge v12.0.0 ('Trust / Lust') 64bit
      _STATISTICS_WRITING_DATE_UTC: 2017-06-09 21:05:35
      _STATISTICS_WRITING_DATE_UTC-eng: 2017-06-09 21:05:35
      _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
[23:08:16] scan: decoding previews for title 1
[23:08:16] scan: audio 0x1: ac3, rate=48000Hz, bitrate=384000 Deutsch (AC3) (2.0 ch)
[23:08:16] scan: 10 previews, 1920x1080, 25.000 fps, autocrop = 0/0/0/0, aspect 16:9, PAR 1:1
[23:08:17] libhb: scan thread found 1 valid title(s)
[23:08:17] macgui: ScanCore scan done
[23:08:36] macgui: QueueCore scanning specifically for title: 1
[23:08:36] CPU: Intel(R) Core(TM) i7-4960HQ CPU @ 2.60GHz
[23:08:36]  - Intel microarchitecture Haswell
[23:08:36]  - logical processor count: 8
[23:08:36] hb_scan: path=/Users/MilanHoppe/Desktop/test.mkv, title_index=1
udfread ERROR: ECMA 167 Volume Recognition failed
disc.c:274: failed opening UDF image /Users/MilanHoppe/Desktop/test.mkv
disc.c:352: error opening file BDMV/index.bdmv
disc.c:352: error opening file BDMV/BACKUP/index.bdmv
[23:08:36] bd: not a bd - trying as a stream/file instead
libdvdnav: Using dvdnav version 5.0.1
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
[23:08:36] dvd: not a dvd - trying as a stream/file instead
Input #0, matroska,webm, from '/Users/MilanHoppe/Desktop/test.mkv':
  Duration: 00:00:29.94, start: 0.000000, bitrate: N/A
    Stream #0:0(eng): Video: h264 (High)
      yuv420p, 1920x1080 [PAR 1:1 DAR 16:9], PAR 1:1 DAR 16:9
      25 fps, 1k tbn
    Metadata:
      BPS             : 4457706
      BPS-eng         : 4457706
      DURATION        : 00:00:29.920000000
      DURATION-eng    : 00:00:29.920000000
      NUMBER_OF_FRAMES: 748
      NUMBER_OF_FRAMES-eng: 748
      NUMBER_OF_BYTES : 16671824
      NUMBER_OF_BYTES-eng: 16671824
      _STATISTICS_WRITING_APP: mkvmerge v12.0.0 ('Trust / Lust') 64bit
      _STATISTICS_WRITING_APP-eng: mkvmerge v12.0.0 ('Trust / Lust') 64bit
      _STATISTICS_WRITING_DATE_UTC: 2017-06-09 21:05:35
      _STATISTICS_WRITING_DATE_UTC-eng: 2017-06-09 21:05:35
      _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
    Stream #0:1(ger): Audio: ac3
      48000 Hz, stereo, fltp, 384 kb/s (default)
    Metadata:
      BPS             : 384000
      BPS-eng         : 384000
      DURATION        : 00:00:29.920000000
      DURATION-eng    : 00:00:29.920000000
      NUMBER_OF_FRAMES: 935
      NUMBER_OF_FRAMES-eng: 935
      NUMBER_OF_BYTES : 1436160
      NUMBER_OF_BYTES-eng: 1436160
      _STATISTICS_WRITING_APP: mkvmerge v12.0.0 ('Trust / Lust') 64bit
      _STATISTICS_WRITING_APP-eng: mkvmerge v12.0.0 ('Trust / Lust') 64bit
      _STATISTICS_WRITING_DATE_UTC: 2017-06-09 21:05:35
      _STATISTICS_WRITING_DATE_UTC-eng: 2017-06-09 21:05:35
      _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
[23:08:36] scan: decoding previews for title 1
[23:08:36] scan: audio 0x1: ac3, rate=48000Hz, bitrate=384000 Deutsch (AC3) (2.0 ch)
[23:08:37] scan: 10 previews, 1920x1080, 25.000 fps, autocrop = 0/0/0/0, aspect 16:9, PAR 1:1
[23:08:37] libhb: scan thread found 1 valid title(s)
[23:08:37] macgui: QueueCore scan done
[23:08:37] macgui: QueueCore started encoding test_export.mkv
[23:08:37] macgui: QueueCore with preset MKV H.265 CFps VBR 5000
[23:08:37] 1 job(s) to process
[23:08:37] starting job
[23:08:37] decomb filter thread started for segment 0
[23:08:37] decomb filter thread started for segment 1
[23:08:37] decomb filter thread started for segment 2
[23:08:37] decomb filter thread started for segment 3
[23:08:37] decomb filter thread started for segment 4
[23:08:37] decomb filter thread started for segment 5
[23:08:37] decomb filter thread started for segment 6
[23:08:37] decomb filter thread started for segment 7
[23:08:37] decomb check thread started for segment 0
[23:08:37] decomb check thread started for segment 1
[23:08:37] decomb check thread started for segment 2
[23:08:37] decomb check thread started for segment 3
[23:08:37] decomb check thread started for segment 4
[23:08:37] decomb check thread started for segment 5
[23:08:37] decomb check thread started for segment 6
[23:08:37] decomb check thread started for segment 7
[23:08:37] mask filter thread started for segment 0
[23:08:37] mask filter thread started for segment 1
[23:08:37] mask filter thread started for segment 2
[23:08:37] mask filter thread started for segment 4
[23:08:37] mask filter thread started for segment 3
[23:08:37] mask filter thread started for segment 5
[23:08:37] mask filter thread started for segment 6
[23:08:37] mask filter thread started for segment 7
[23:08:37] mask erode thread started for segment 0
[23:08:37] mask erode thread started for segment 1
[23:08:37] mask erode thread started for segment 2
[23:08:37] mask erode thread started for segment 3
[23:08:37] mask erode thread started for segment 4
[23:08:37] mask erode thread started for segment 5
[23:08:37] mask erode thread started for segment 7
[23:08:37] mask erode thread started for segment 6
[23:08:37] mask dilate thread started for segment 0
[23:08:37] mask dilate thread started for segment 1
[23:08:37] mask dilate thread started for segment 2
[23:08:37] mask dilate thread started for segment 3
[23:08:37] mask dilate thread started for segment 4
[23:08:37] mask dilate thread started for segment 5
[23:08:37] mask dilate thread started for segment 6
[23:08:37] mask dilate thread started for segment 7
[23:08:37] yadif thread started for segment 0
[23:08:37] yadif thread started for segment 1
[23:08:37] yadif thread started for segment 2
[23:08:37] yadif thread started for segment 3
[23:08:37] yadif thread started for segment 4
[23:08:37] yadif thread started for segment 5
[23:08:37] yadif thread started for segment 6
[23:08:37] yadif thread started for segment 7
[23:08:37] work: only 1 chapter, disabling chapter markers
[23:08:37] job configuration:
[23:08:37]  * source
[23:08:37]    + /Users/MilanHoppe/Desktop/test.mkv
[23:08:37]    + title 1, chapter(s) 1 to 1
[23:08:37]    + container: matroska,webm
[23:08:37]  * destination
[23:08:37]    + /Users/MilanHoppe/Desktop/test_export.mkv
[23:08:37]    + container: Matroska (libavformat)
[23:08:37]  * video track
[23:08:37]    + decoder: h264
[23:08:37]    + filters
[23:08:37]      + 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)
[23:08:37]      + Decomb (mode=39)
[23:08:37]      + Framerate Shaper (mode=1:rate=27000000/1080000)
[23:08:37]        + frame rate: 25.000 fps -> constant 25.000 fps
[23:08:37]      + Crop and Scale (width=1920:height=1080:crop-top=0:crop-bottom=0:crop-left=0:crop-right=0)
[23:08:37]        + source: 1920 * 1080, crop (0/0/0/0): 1920 * 1080, scale: 1920 * 1080
[23:08:37]    + Output geometry
[23:08:37]      + storage dimensions: 1920 x 1080
[23:08:37]      + pixel aspect ratio: 1 : 1
[23:08:37]      + display dimensions: 1920 x 1080
[23:08:37]    + encoder: H.265 (libx265)
[23:08:37]      + preset:  ultrafast
[23:08:37]      + bitrate: 5000 kbps, pass: 0
[23:08:37]  * audio track 1
[23:08:37]    + decoder: Deutsch (AC3) (2.0 ch) (track 1, id 0x1)
[23:08:37]      + bitrate: 384 kbps, samplerate: 48000 Hz
[23:08:37]    + mixdown: Stereo
[23:08:37]    + encoder: AC3 (libavcodec)
[23:08:37]      + bitrate: 640 kbps, samplerate: 48000 Hz
[23:08:37] sync: expecting 748 video frames
x265 [info]: HEVC encoder version 2.1
x265 [info]: build info [Mac OS X][clang 8.1.0][64 bit] 8bit
x265 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX AVX2 FMA3 LZCNT BMI2
x265 [info]: Main profile, Level-4 (Main tier)
x265 [info]: Thread pool created using 8 threads
x265 [info]: Slices                              : 1
x265 [info]: frame threads / pool features       : 3 / wpp(34 rows)
x265 [info]: Coding QT: max CU size, min CU size : 32 / 16
x265 [info]: Residual QT: max TU size, max depth : 32 / 1 inter / 1 intra
x265 [info]: ME / range / subpel / merge         : dia / 57 / 0 / 2
x265 [info]: Keyframe min / max / scenecut       : 25 / 250 / 0
x265 [info]: Lookahead / bframes / badapt        : 5 / 3 / 0
x265 [info]: b-pyramid / weightp / weightb       : 1 / 0 / 0
x265 [info]: References / ref-limit  cu / depth  : 1 / off / off
x265 [info]: AQ: mode / str / qg-size / cu-tree  : 1 / 0.0 / 32 / 1
x265 [info]: Rate Control / qCompress            : ABR-5000 kbps / 0.60
x265 [info]: tools: rd=2 psy-rd=2.00 early-skip rskip tmvp fast-intra
x265 [info]: tools: strong-intra-smoothing lslices=6 deblock
[23:08:37] sync: first pts video is 0
[23:08:37] sync: "Chapter 1" (1) at frame 1 time 0
[23:08:37] sync: first pts audio 0x1 is 2160
[h264 @ 0x7fdae5941600] reference picture missing during reorder
[h264 @ 0x7fdae5941600] reference picture missing during reorder
[h264 @ 0x7fdae5941600] reference picture missing during reorder
[h264 @ 0x7fdae5941600] Missing reference picture
[h264 @ 0x7fdae5941600] Missing reference picture
[h264 @ 0x7fdae5941600] Missing reference picture
[23:08:57] reader: done. 1 scr changes
[23:08:58] work: average encoding speed for job is 34.021812 fps
[23:08:58] comb detect: heavy 97 | light 262 | uncombed 389 | total 748
[23:08:59] decomb: deinterlaced 97 | blended 262 | unfiltered 389 | total 748
[23:08:59] vfr: 748 frames output, 0 dropped and 0 duped for CFR/PFR
[23:08:59] vfr: lost time: 0 (0 frames)
[23:08:59] vfr: gained time: 0 (0 frames) (0 not accounted for)
[23:08:59] ac3-decoder done: 935 frames, 0 decoder errors
[23:08:59] h264-decoder done: 748 frames, 0 decoder errors
[23:08:59] sync: got 748 frames, 748 expected
[23:08:59] sync: framerate min 25.000 fps, max 25.000 fps, avg 25.000 fps
x265 [info]: frame I:      3, Avg QP:26.63  kb/s: 6871.53 
x265 [info]: frame P:    186, Avg QP:23.84  kb/s: 9850.96 
x265 [info]: frame B:    559, Avg QP:26.19  kb/s: 5724.19 
x265 [info]: consecutive B-frames: 0.5% 1.1% 0.5% 97.9% 

encoded 748 frames in 21.87s (34.20 fps), 6754.97 kb/s, Avg QP:25.61
[23:08:59] mux: track 0, 748 frames, 25266564 bytes, 6746.75 kbps, fifo 512
[23:08:59] mux: track 1, 934 frames, 2391040 bytes, 638.46 kbps, fifo 1024
[23:08:59] libhb: work result = 0
[23:08:59] macgui: QueueCore work done
[23:08:59] macgui: Queue Done, there are no more pending encodes
@sr55 sr55 added the Bug label Jun 17, 2017
@Synapto
Copy link

Synapto commented Jun 19, 2017

Issue is replicated precisely when playing the supplied test.mkv through AVPLAY.EXE (v13_dev0-1047-g9e4a5eb)

Issue is absent completely when playing the supplied test.mkv through FFPLAY.EXE (N-86447-gfeb13ae)

@jstebbins
Copy link
Contributor Author

Yes. I came to the same conclusion. Forgot to get back to this and mark as an upstream bug. I'll do a deeper dive when I get some time to see if I can locate the source of the problem in the libav decoder.

@bradleysepos
Copy link
Contributor

bradleysepos commented Aug 16, 2017

I tried back-porting some recent commits I thought may solve this issue, but they do not. Seems it's still a problem with current upstream.

@bradleysepos
Copy link
Contributor

Should be fixed in the next nightly build.

@CollinChaffin
Copy link

Can I ask how significant was this bug? Does this mean the anything encoded with say nightlies for quite some time now have produced severely reduced quality encodes and now would need to be trashed and re-encoded, or is this issue not that severe? Great job tracking it down and fixing it BTW!

@bradleysepos
Copy link
Contributor

It's fairly severe, but also quite uncommon. Only appears to happen in very specific circumstances. I wouldn't worry about it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

5 participants