x265 output is grey and no brilliant colors

HandBrake for Windows support
Forum rules
An Activity Log is required for support requests. Please read How-to get an activity log? for details on how and why this should be provided.
Post Reply
AndreiP
Posts: 20
Joined: Thu Nov 02, 2017 4:54 pm

x265 output is grey and no brilliant colors

Post by AndreiP »

Please detail your question or problem in as much detail as possible:

I have a intro (2160p UHD x265) which I would like to transcode to x265 (1080p crf18). However once I do that the output generated by handbrake is grey and I miss the brilliant colors as for example seen in the original or on Youtube.

The result I get is something like seen here.

Any idea why this is happening?

Tell us about your environment. What version of HandBrake? What version of Windows are you running. etc.

- Windows 7
- Handbrake 1.0.7

If there was any exception or error displayed, please copy it and paste it here:

no error
rollin_eng
Veteran User
Posts: 4854
Joined: Wed May 04, 2011 11:06 pm

Re: x265 output is grey and no brilliant colors

Post by rollin_eng »

Could you please post your logs, instructions can be found here:

https://handbrake.fr/docs/en/latest/hel ... y-log.html
AndreiP
Posts: 20
Joined: Thu Nov 02, 2017 4:54 pm

Re: x265 output is grey and no brilliant colors

Post by AndreiP »

Sure, here is the log:

Code: Select all

HandBrake 1.0.7 (2017040900) - 64bit
OS: Microsoft Windows NT 6.1.7601 Service Pack 1 - 64bit
CPU: Intel(R) Core(TM) i7-2600K CPU @ 3.40GHz
Ram: 19902 MB, 
GPU Information:
  Intel(R) HD Graphics 3000 - 9.17.10.4229
Screen: 1600x900
Temp Dir: C:\Users\Administrator\AppData\Local\Temp\
Install Dir: C:\Program Files\HandBrake
Data Dir: C:\Users\Administrator\AppData\Roaming\HandBrake Team\HandBrake\1.0.7.0

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


# Starting Encode ...

[05:13:26] hb_init: starting libhb thread
[05:13:26] 1 job(s) to process
[05:13:26] CPU: Intel(R) Core(TM) i7-2600K CPU @ 3.40GHz
[05:13:26]  - Intel microarchitecture Sandy Bridge
[05:13:26]  - logical processor count: 8
[05:13:26] Intel Quick Sync Video support: yes
[05:13:26]  - Intel Media SDK software: API 1.23 (minimum: 1.3)
[05:13:26]  - H.264 encoder: yes
[05:13:26]     - preferred implementation: software
[05:13:26]  - H.265 encoder: no
[05:13:26] hb_scan: path=C:\temp\temp-input.mkv, title_index=1
udfread ERROR: ECMA 167 Volume Recognition failed
src/libbluray/disc/disc.c:274: failed opening UDF image =C:\temp\temp-input.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
[05:13:26] bd: not a bd - trying as a stream/file instead
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.BUP.
[05:13:26] dvd: not a dvd - trying as a stream/file instead
Input #0, matroska,webm, from 'C:\temp\temp-input.mkv':
  Duration: 02:06:55.61, start: 0.000000, bitrate: N/A
    Chapter #0:0: start 0.000000, end 220.804000
    Metadata:
      title           : 00:00:00.000
    Chapter #0:1: start 220.804000, end 518.017000
    Metadata:
      title           : 00:03:40.804
    Chapter #0:2: start 518.017000, end 786.828000
    Metadata:
      title           : 00:08:38.017
    Chapter #0:3: start 786.828000, end 926.551000
    Metadata:
      title           : 00:13:06.828
    Chapter #0:4: start 926.551000, end 1187.478000
    Metadata:
      title           : 00:15:26.551
    Chapter #0:5: start 1187.478000, end 1403.652000
    Metadata:
      title           : 00:19:47.478
    Chapter #0:6: start 1403.652000, end 1667.040000
    Metadata:
      title           : 00:23:23.652
    Chapter #0:7: start 1667.040000, end 1866.448000
    Metadata:
      title           : 00:27:47.040
    Chapter #0:8: start 1866.448000, end 2076.783000
    Metadata:
      title           : 00:31:06.448
    Chapter #0:9: start 2076.783000, end 2374.998000
    Metadata:
      title           : 00:34:36.783
    Chapter #0:10: start 2374.998000, end 2562.810000
    Metadata:
      title           : 00:39:34.998
    Chapter #0:11: start 2562.810000, end 2765.638000
    Metadata:
      title           : 00:42:42.810
    Chapter #0:12: start 2765.638000, end 2916.497000
    Metadata:
      title           : 00:46:05.638
    Chapter #0:13: start 2916.497000, end 3256.462000
    Metadata:
      title           : 00:48:36.497
    Chapter #0:14: start 3256.462000, end 3441.480000
    Metadata:
      title           : 00:54:16.462
    Chapter #0:15: start 3441.480000, end 3723.261000
    Metadata:
      title           : 00:57:21.480
    Chapter #0:16: start 3723.261000, end 4100.847000
    Metadata:
      title           : 01:02:03.261
    Chapter #0:17: start 4100.847000, end 4469.006000
    Metadata:
      title           : 01:08:20.847
    Chapter #0:18: start 4469.006000, end 4734.063000
    Metadata:
      title           : 01:14:29.006
    Chapter #0:19: start 4734.063000, end 5055.300000
    Metadata:
      title           : 01:18:54.063
    Chapter #0:20: start 5055.300000, end 5322.442000
    Metadata:
      title           : 01:24:15.300
    Chapter #0:21: start 5322.442000, end 5591.753000
    Metadata:
      title           : 01:28:42.442
    Chapter #0:22: start 5591.753000, end 5789.033000
    Metadata:
      title           : 01:33:11.753
    Chapter #0:23: start 5789.033000, end 6043.788000
    Metadata:
      title           : 01:36:29.033
    Chapter #0:24: start 6043.788000, end 6369.238000
    Metadata:
      title           : 01:40:43.788
    Chapter #0:25: start 6369.238000, end 6815.308000
    Metadata:
      title           : 01:46:09.238
    Chapter #0:26: start 6815.308000, end 7234.394000
    Metadata:
      title           : 01:53:35.308
    Chapter #0:27: start 7234.394000, end 7615.616000
    Metadata:
      title           : 02:00:34.394
    Stream #0:0: Video: hevc (Main 10)
      yuv420p10le, tv, bt2020nc/bt2020/smpte2084
      3840x2076 [PAR 1:1 DAR 320:173], PAR 1:1 DAR 320:173
      23.98 fps, 1k tbn (default)
    Metadata:
      BPS             : 14642443
      BPS-eng         : 14642443
      DURATION        : 02:06:55.608000000
      DURATION-eng    : 02:06:55.608000000
      NUMBER_OF_FRAMES: 182592
      NUMBER_OF_FRAMES-eng: 182592
      NUMBER_OF_BYTES : 13938889072
      NUMBER_OF_BYTES-eng: 13938889072
      _STATISTICS_WRITING_APP: mkvmerge v17.0.0 ('Be Ur Friend') 64-bit
      _STATISTICS_WRITING_APP-eng: mkvmerge v17.0.0 ('Be Ur Friend') 64-bit
      _STATISTICS_WRITING_DATE_UTC: 2017-10-25 23:20:58
      _STATISTICS_WRITING_DATE_UTC-eng: 2017-10-25 23:20:58
      _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: dts (DTS)
      48000 Hz, 5.1, fltp, 768 kb/s (default)
    Metadata:
      BPS             : 767999
      BPS-eng         : 767999
      DURATION        : 02:06:55.606000000
      DURATION-eng    : 02:06:55.606000000
      NUMBER_OF_FRAMES: 713963
      NUMBER_OF_FRAMES-eng: 713963
      NUMBER_OF_BYTES : 731098112
      NUMBER_OF_BYTES-eng: 731098112
      _STATISTICS_WRITING_APP: mkvmerge v17.0.0 ('Be Ur Friend') 64-bit
      _STATISTICS_WRITING_APP-eng: mkvmerge v17.0.0 ('Be Ur Friend') 64-bit
      _STATISTICS_WRITING_DATE_UTC: 2017-10-25 23:20:58
      _STATISTICS_WRITING_DATE_UTC-eng: 2017-10-25 23:20:58
      _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: truehd
      48000 Hz, 7.1, s32
    Metadata:
      BPS             : 4396848
      BPS-eng         : 4396848
      DURATION        : 02:06:55.609000000
      DURATION-eng    : 02:06:55.609000000
      NUMBER_OF_FRAMES: 9138731
      NUMBER_OF_FRAMES-eng: 9138731
      NUMBER_OF_BYTES : 4185584454
      NUMBER_OF_BYTES-eng: 4185584454
      _STATISTICS_WRITING_APP: mkvmerge v17.0.0 ('Be Ur Friend') 64-bit
      _STATISTICS_WRITING_APP-eng: mkvmerge v17.0.0 ('Be Ur Friend') 64-bit
      _STATISTICS_WRITING_DATE_UTC: 2017-10-25 23:20:58
      _STATISTICS_WRITING_DATE_UTC-eng: 2017-10-25 23:20:58
      _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): Audio: ac3
      48000 Hz, 5.1, fltp, 640 kb/s
    Metadata:
      BPS             : 640000
      BPS-eng         : 640000
      DURATION        : 02:06:55.616000000
      DURATION-eng    : 02:06:55.616000000
      NUMBER_OF_FRAMES: 237988
      NUMBER_OF_FRAMES-eng: 237988
      NUMBER_OF_BYTES : 609249280
      NUMBER_OF_BYTES-eng: 609249280
      _STATISTICS_WRITING_APP: mkvmerge v17.0.0 ('Be Ur Friend') 64-bit
      _STATISTICS_WRITING_APP-eng: mkvmerge v17.0.0 ('Be Ur Friend') 64-bit
      _STATISTICS_WRITING_DATE_UTC: 2017-10-25 23:20:58
      _STATISTICS_WRITING_DATE_UTC-eng: 2017-10-25 23:20:58
      _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
    Stream #0:4(ger): Subtitle: hdmv_pgs_subtitle
    Metadata:
      BPS             : 27902
      BPS-eng         : 27902
      DURATION        : 02:05:47.790000000
      DURATION-eng    : 02:05:47.790000000
      NUMBER_OF_FRAMES: 2762
      NUMBER_OF_FRAMES-eng: 2762
      NUMBER_OF_BYTES : 26325637
      NUMBER_OF_BYTES-eng: 26325637
      _STATISTICS_WRITING_APP: mkvmerge v17.0.0 ('Be Ur Friend') 64-bit
      _STATISTICS_WRITING_APP-eng: mkvmerge v17.0.0 ('Be Ur Friend') 64-bit
      _STATISTICS_WRITING_DATE_UTC: 2017-10-25 23:20:58
      _STATISTICS_WRITING_DATE_UTC-eng: 2017-10-25 23:20:58
      _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
    Stream #0:5(eng): Subtitle: hdmv_pgs_subtitle
    Metadata:
      title           : SDH
      BPS             : 35114
      BPS-eng         : 35114
      DURATION        : 02:01:49.010000000
      DURATION-eng    : 02:01:49.010000000
      NUMBER_OF_FRAMES: 3610
      NUMBER_OF_FRAMES-eng: 3610
      NUMBER_OF_BYTES : 32081202
      NUMBER_OF_BYTES-eng: 32081202
      _STATISTICS_WRITING_APP: mkvmerge v17.0.0 ('Be Ur Friend') 64-bit
      _STATISTICS_WRITING_APP-eng: mkvmerge v17.0.0 ('Be Ur Friend') 64-bit
      _STATISTICS_WRITING_DATE_UTC: 2017-10-25 23:20:58
      _STATISTICS_WRITING_DATE_UTC-eng: 2017-10-25 23:20:58
      _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
[05:13:26] scan: decoding previews for title 1
[05:13:26] scan: audio 0x1: dca, rate=48000Hz, bitrate=768000 Deutsch (DTS) (5.1 ch)
[05:13:26] scan: audio 0x2: truehd, rate=48000Hz, bitrate=1 English (TrueHD) (7.1 ch)
[05:13:26] scan: audio 0x3: ac3, rate=48000Hz, bitrate=640000 English (AC3) (5.1 ch)
[05:13:32] scan: 10 previews, 3840x2076, 23.976 fps, autocrop = 0/0/0/0, aspect 16:9, PAR 1:1
[05:13:32] libhb: scan thread found 1 valid title(s)
[05:13:32] starting job
[05:13:32] decomb filter thread started for segment 0
[05:13:32] decomb filter thread started for segment 1
[05:13:32] decomb filter thread started for segment 2
[05:13:32] decomb filter thread started for segment 3
[05:13:32] decomb filter thread started for segment 4
[05:13:32] decomb filter thread started for segment 5
[05:13:32] decomb filter thread started for segment 6
[05:13:32] decomb filter thread started for segment 7
[05:13:32] decomb check thread started for segment 0
[05:13:32] decomb check thread started for segment 1
[05:13:32] decomb check thread started for segment 2
[05:13:32] decomb check thread started for segment 3
[05:13:32] decomb check thread started for segment 4
[05:13:32] decomb check thread started for segment 5
[05:13:32] decomb check thread started for segment 6
[05:13:32] decomb check thread started for segment 7
[05:13:32] mask filter thread started for segment 0
[05:13:32] mask filter thread started for segment 1
[05:13:32] mask filter thread started for segment 2
[05:13:32] mask filter thread started for segment 3
[05:13:32] mask filter thread started for segment 4
[05:13:32] mask filter thread started for segment 5
[05:13:32] mask filter thread started for segment 6
[05:13:32] mask filter thread started for segment 7
[05:13:32] mask erode thread started for segment 0
[05:13:32] mask erode thread started for segment 1
[05:13:32] mask erode thread started for segment 2
[05:13:32] mask erode thread started for segment 3
[05:13:32] mask erode thread started for segment 4
[05:13:32] mask erode thread started for segment 5
[05:13:32] mask erode thread started for segment 6
[05:13:32] mask erode thread started for segment 7
[05:13:32] mask dilate thread started for segment 0
[05:13:32] mask dilate thread started for segment 1
[05:13:32] mask dilate thread started for segment 2
[05:13:32] mask dilate thread started for segment 3
[05:13:32] mask dilate thread started for segment 4
[05:13:32] mask dilate thread started for segment 5
[05:13:32] mask dilate thread started for segment 6
[05:13:32] mask dilate thread started for segment 7
[05:13:32] yadif thread started for segment 0
[05:13:32] yadif thread started for segment 1
[05:13:32] yadif thread started for segment 2
[05:13:32] yadif thread started for segment 3
[05:13:32] yadif thread started for segment 4
[05:13:32] yadif thread started for segment 5
[05:13:32] yadif thread started for segment 6
[05:13:32] yadif thread started for segment 7
[05:13:32] work: track 1, dithering not supported by codec
[05:13:32] job configuration:
[05:13:32]  * source
[05:13:32]    + C:\temp\temp-input.mkv
[05:13:32]    + title 1, chapter(s) 1 to 28
[05:13:32]    + container: matroska,webm
[05:13:32]  * destination
[05:13:32]    + C:\temp\temp-output.mkv
[05:13:32]    + container: Matroska (libavformat)
[05:13:32]      + chapter markers
[05:13:32]  * video track
[05:13:32]    + decoder: hevc
[05:13:32]    + filters
[05:13:32]      + 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)
[05:13:32]      + Decomb (mode=39)
[05:13:32]      + Framerate Shaper (mode=2:rate=27000000/900000)
[05:13:32]        + frame rate: 23.976 fps -> peak rate limited to 30.000 fps
[05:13:32]      + Crop and Scale (width=1920:height=1080:crop-top=0:crop-bottom=0:crop-left=0:crop-right=0)
[05:13:32]        + source: 3840 * 2076, crop (0/0/0/0): 3840 * 2076, scale: 1920 * 1080
[05:13:32]    + Output geometry
[05:13:32]      + storage dimensions: 1920 x 1080
[05:13:32]      + pixel aspect ratio: 180 : 173
[05:13:32]      + display dimensions: 1997 x 1080
[05:13:32]    + encoder: H.265 (libx265)
[05:13:32]      + preset:  slow
[05:13:32]      + options: strong-intra-smoothing=0:rect=0
[05:13:32]      + profile: main
[05:13:32]      + quality: 18.00 (RF)
[05:13:32]  * subtitle track 1, German (track 0, id 0x4) Picture [PGS] -> Passthrough, Forced Only, Default
[05:13:32]  * audio track 1
[05:13:32]    + decoder: Deutsch (DTS) (5.1 ch) (track 1, id 0x1)
[05:13:32]      + bitrate: 768 kbps, samplerate: 48000 Hz
[05:13:32]    + mixdown: Stereo
[05:13:32]    + encoder: AAC (libavcodec)
[05:13:32]      + bitrate: 256 kbps, samplerate: 48000 Hz
[05:13:32] sync: expecting 182592 video frames
x265 [info]: HEVC encoder version 2.1
x265 [info]: build info [Windows][GCC 5.3.1][64 bit] 8bit
x265 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
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(17 rows)
x265 [info]: Coding QT: max CU size, min CU size : 64 / 8
x265 [info]: Residual QT: max TU size, max depth : 32 / 1 inter / 1 intra
x265 [info]: ME / range / subpel / merge         : star / 57 / 3 / 3
x265 [info]: Keyframe min / max / scenecut       : 24 / 240 / 40
x265 [info]: Lookahead / bframes / badapt        : 25 / 4 / 2
x265 [info]: b-pyramid / weightp / weightb       : 1 / 1 / 0
x265 [info]: References / ref-limit  cu / depth  : 4 / on / on
x265 [info]: AQ: mode / str / qg-size / cu-tree  : 1 / 1.0 / 32 / 1
x265 [info]: Rate Control / qCompress            : CRF-18.0 / 0.60
x265 [info]: tools: limit-modes rd=4 psy-rd=2.00 rdoq=2 psy-rdoq=1.00 rskip
x265 [info]: tools: signhide tmvp lslices=4 deblock sao
[05:13:33] sync: first pts video is 0
[05:13:33] sync: "00:00:00.000" (1) at frame 1 time 0
[05:13:33] sync: first pts audio 0x1 is 0
[05:31:12] sync: "00:03:40.804" (2) at frame 5295 time 19872352
[06:01:06] sync: "00:08:38.017" (3) at frame 12421 time 46621575
[06:19:29] sync: "00:13:06.828" (4) at frame 18866 time 70814493
[06:30:49] sync: "00:15:26.551" (5) at frame 22216 time 83389556
[06:54:18] sync: "00:19:47.478" (6) at frame 28472 time 106873016
[07:11:37] sync: "00:23:23.652" (7) at frame 33655 time 126328702
[07:32:02] sync: "00:27:47.040" (8) at frame 39970 time 150033633
[07:53:04] sync: "00:31:06.448" (9) at frame 44751 time 167980312
[08:11:08] sync: "00:34:36.783" (10) at frame 49794 time 186910473
[08:40:56] sync: "00:39:34.998" (11) at frame 56944 time 213749786
[08:56:47] sync: "00:42:42.810" (12) at frame 61447 time 230652922
[09:14:29] sync: "00:46:05.638" (13) at frame 66310 time 248907408
[09:28:30] sync: "00:48:36.497" (14) at frame 69927 time 262484722
[10:00:53] sync: "00:54:16.462" (15) at frame 78078 time 293081538
[10:14:16] sync: "00:57:21.480" (16) at frame 82514 time 309733173
[10:34:56] sync: "01:02:03.261" (17) at frame 89270 time 335093508
[11:17:35] sync: "01:08:20.847" (18) at frame 98323 time 369076207
[11:51:47] sync: "01:14:29.006" (19) at frame 107150 time 402210558
[12:14:58] sync: "01:18:54.063" (20) at frame 113505 time 426065640
[12:40:05] sync: "01:24:15.300" (21) at frame 121207 time 454977022
[13:06:05] sync: "01:28:42.442" (22) at frame 127612 time 479019791
[13:44:12] sync: "01:33:11.753" (23) at frame 134069 time 503257755
[13:59:49] sync: "01:36:29.033" (24) at frame 138799 time 521012992
[14:21:49] sync: "01:40:43.788" (25) at frame 144907 time 543940897
[14:57:45] sync: "01:46:09.238" (26) at frame 152710 time 573231408
[15:37:28] sync: "01:53:35.308" (27) at frame 163405 time 613377765
[16:11:31] sync: "02:00:34.394" (28) at frame 173453 time 651095445
[16:38:20] reader: done. 1 scr changes
[16:38:26] work: average encoding speed for job is 4.442787 fps
[16:38:26] comb detect: heavy 19656 | light 16280 | uncombed 146656 | total 182592
[16:38:26] decomb: deinterlaced 19656 | blended 16280 | unfiltered 146656 | total 182592
[16:38:26] vfr: 182592 frames output, 0 dropped and 0 duped for CFR/PFR
[16:38:26] vfr: lost time: 0 (0 frames)
[16:38:26] vfr: gained time: 0 (0 frames) (0 not accounted for)
[16:38:26] dca-decoder done: 713963 frames, 0 decoder errors
[16:38:26] hevc-decoder done: 182592 frames, 0 decoder errors
[16:38:27] sync: got 182592 frames, 182592 expected
[16:38:27] sync: framerate min 23.981 fps, max 23.981 fps, avg 23.976 fps
x265 [info]: frame I:   2281, Avg QP:15.12  kb/s: 19754.80
x265 [info]: frame P:  44059, Avg QP:16.90  kb/s: 7390.25
x265 [info]: frame B: 136252, Avg QP:22.52  kb/s: 1622.60
x265 [info]: Weighted P-Frames: Y:1.9% UV:0.8%
x265 [info]: consecutive B-frames: 8.0% 5.6% 10.6% 35.9% 39.9%
encoded 182592 frames in 41094.25s (4.44 fps), 3240.83 kb/s, Avg QP:21.08
[16:38:27] mux: track 0, 182592 frames, 3085843762 bytes, 3241.58 kbps, fifo 2048
[16:38:27] mux: track 1, 356982 frames, 243648925 bytes, 255.95 kbps, fifo 4096
[16:38:27] mux: track 2, 0 frames, 0 bytes, 0.00 kbps, fifo 8
[16:38:27] libhb: work result = 0

# Encode Completed ...
rollin_eng
Veteran User
Posts: 4854
Joined: Wed May 04, 2011 11:06 pm

Re: x265 output is grey and no brilliant colors

Post by rollin_eng »

Try a nightly build.
WhatZit
Experienced
Posts: 77
Joined: Sat Feb 13, 2016 2:45 am

Re: x265 output is grey and no brilliant colors

Post by WhatZit »

AndreiP wrote: Fri Nov 03, 2017 1:50 pm

Code: Select all

    Stream #0:0: Video: hevc (Main 10)
      yuv420p10le, tv, bt2020nc/bt2020/smpte2084
      3840x2076 [PAR 1:1 DAR 320:173], PAR 1:1 DAR 320:173
      23.98 fps, 1k tbn (default)
rollin_eng wrote: Fri Nov 03, 2017 2:29 pmTry a nightly build.
He could try a nightly build every night for the next 3 years and it would NOT HELP ONE JOT!!

A result like AndreiP's poor encode is a textbook, "picture perfect", blatantly obvious example of what happens when you try to transcode 10-bit 2020/ST208x HDR into 8-bit BT709 SDR without applying an intermediate colour grade conversion (either automagically or manually).

How/why do you do that? Well, got a few hours spare to explain it? I don't. You can simulate it for yourself using MadVR though, which has a "working" HDR->SDR level converter. Note that I chose the word "working" very carefully.

Now, if you were creating a 2160P BT2020 recode, you could manually specify x265's HDR mastering options, and then you'd only have to worry about how much HB's libav engine will butcher the process (pssst... it's a LOT).

So, short story for you, AndreiP: FORGET IT! HandBrake has ZERO HDR capabilities.

NOTE TO HB TEAM: If you want to avoid a massive number of spurious issues like this being raised in the future, you should detect 2084, 2086, 2100, or even master display SEI in the source and either direct HB to flag that source as incompatible for downscaling, or come up with your own automagical st208x->709 colourspace equalisation.
User avatar
Ritsuka
HandBrake Team
Posts: 1655
Joined: Fri Jan 12, 2007 11:29 am

Re: x265 output is grey and no brilliant colors

Post by Ritsuka »

AndreiP: can you upload a short sample file I can use to reproduce the issue?
HandBrake is 8-bit only and doesn't passthru the mastering metadata, but it should at least passthru the right color space.

WhatZit : I have no idea what you are talking about.
User avatar
JohnAStebbins
HandBrake Team
Posts: 5724
Joined: Sat Feb 09, 2008 7:21 pm

Re: x265 output is grey and no brilliant colors

Post by JohnAStebbins »

WhatZit wrote: Sat Nov 04, 2017 12:21 am NOTE TO HB TEAM: If you want to avoid a massive number of spurious issues like this being raised in the future, you should detect 2084, 2086, 2100, or even master display SEI in the source and either direct HB to flag that source as incompatible for downscaling, or come up with your own automagical st208x->709 colourspace equalisation.
HandBrake does the appropriate colorspace conversion, assuming libav supports the source colorspace. I haven't investigated this particular case yet, but 99% certain it's supported.

This kind of problem is most often a problem with the playback environment. It is usually a player that isn't interpreting the colorspace correctly.
WhatZit
Experienced
Posts: 77
Joined: Sat Feb 13, 2016 2:45 am

Re: x265 output is grey and no brilliant colors

Post by WhatZit »

Ritsuka wrote: Sat Nov 04, 2017 6:45 amWhatZit : I have no idea what you are talking about.
I'm talking about the stored colour gamut of a 2020 HDR source having the possibility of being anywhere from 35% (common) to 75% (rare/non-existent) of the total 1931 colour space, due to different mastering strategems.

The OP's desaturation problem is exactly what happens when a 709 encode clips the 2020's larger colourspace instead of converting it. The same can occur when HDR is displayed in SDR software. But make no mistake, it is absolutely possible to bake this into an encode.

I mentioned automagical quite specifically, because the 709 EQ required for a 40% will usually be different for a 50%, assuming that accuracy to source is your goal. I suppose a one-size-fits-all approach could certainly work for unsophisticated requirements.

Note that this is only a problem when going HDR->SDR, since 2020 is "wider" than 709, and how it ends up looking is dependant on how much colourimetry exists beyond 709.

Of course, 709's gamut fits entirely within 2020 when going SDR->HDR, and share the same white point, by design.
User avatar
Ritsuka
HandBrake Team
Posts: 1655
Joined: Fri Jan 12, 2007 11:29 am

Re: x265 output is grey and no brilliant colors

Post by Ritsuka »

No, that's not how HandBrake works.
HandBrake decodes the video to 8bit YUV and then encodes it with the selected encoder. At the end it tags it with the color primaries, transfer function and characteristics matrix of the source file.

So IT DOESN'T NEVER CONVERT THE COLOR SPACE AT ALL, there is not code to convert Bt. 2020 to Bt. 709 or whatever, and isn't needed because HandBrake tags the output file with the same color primaries, transfer function and characteristics matrix of the source file. And it doesn't set Bt. 709 color space to a Bt. 2020 input file either.

If colors are not right after a conversion it might means: the input file was not tagged or the input files used a color primaries, transfer function and characteristics matrix not available in HandBrake's list, or the player you use to playback doesn't support the color space.

The only thing lost in the process is accuracy (10 bit to 8 bit conversion) and mastering metadata.

Anyway, we need a sample file to investigate this.
User avatar
JohnAStebbins
HandBrake Team
Posts: 5724
Joined: Sat Feb 09, 2008 7:21 pm

Re: x265 output is grey and no brilliant colors

Post by JohnAStebbins »

So IT DOESN'T NEVER CONVERT THE COLOR SPACE AT ALL
Ritsuka is right here. I was referring to pixel formats. E.g. RGB to YUV 420. All pixel formats get converted to YUV 420 in HandBrake.

The 2 most common problems we see in this area are:
1. The source file is *not* tagged with any color space info. HandBrake makes a guess and gets it wrong.
2. The player ignores color space tags. Some broken players assume the same color space for everything. Some broken players guess the color space based on resolution.
AndreiP
Posts: 20
Joined: Thu Nov 02, 2017 4:54 pm

Re: x265 output is grey and no brilliant colors

Post by AndreiP »

WhatZit wrote: Sat Nov 04, 2017 12:21 am He could try a nightly build every night for the next 3 years and it would NOT HELP ONE JOT!!
WhatZit is correct with his assumption. I tried the latest nightly and got the same grey output here... :(

@WhatZit
Did there exists a Software you would recommend which can do the job? It musn´t be open source I´m open to pay for it, if its not higher then my salary ;)
Ritsuka wrote: Sat Nov 04, 2017 6:45 am AndreiP: can you upload a short sample file I can use to reproduce the issue?
HandBrake is 8-bit only and doesn't passthru the mastering metadata, but it should at least passthru the right color space.
If you can give me some small steps how I can cut the first 10 seconds or something from the movie without transcoding or changing anything which would be important for the reproduction from that issue I would be happy to do that.
JohnAStebbins wrote: Sat Nov 04, 2017 3:33 pm This kind of problem is most often a problem with the playback environment. It is usually a player that isn't interpreting the colorspace correctly.
I can rule that out. I have access to a wide range or test hardware (Mac, PC, ... ) and on ALL of them the 10sec from the movie looks terrible in colors (using VLC, MediaPlayer, KMPlayer, ...). And I tried everything there including gamma correcting or installing the monitor pattern if the playing device was a standard PC and no MAC or other device. So the bad output isn´t a problem from the device, it must happen during the transcoding.
Last edited by AndreiP on Wed Nov 08, 2017 6:24 pm, edited 1 time in total.
User avatar
Ritsuka
HandBrake Team
Posts: 1655
Joined: Fri Jan 12, 2007 11:29 am

Re: x265 output is grey and no brilliant colors

Post by Ritsuka »

You can use mkvmerge / mkvtoolnix to split it.
AndreiP
Posts: 20
Joined: Thu Nov 02, 2017 4:54 pm

Re: x265 output is grey and no brilliant colors

Post by AndreiP »

@all
WhatZit input seamed to be correct here. I can reproduce the issue on another movie.
Ritsuka wrote: Wed Nov 08, 2017 6:23 pm You can use mkvmerge / mkvtoolnix to split it.
Ok, the first 20sec part from an affected movie (not the one in the initial posting) would be 50MB, what is the best place to upload it?

Update:
Try this download here (should be ok for 30 days according to the website): https://ufile.io/38fm1
User avatar
Ritsuka
HandBrake Team
Posts: 1655
Joined: Fri Jan 12, 2007 11:29 am

Re: x265 output is grey and no brilliant colors

Post by Ritsuka »

Seems to work here. Encoded it, played back in mpv and the colors are right. As I said before, mastering metadata are lost (but you can set it manually in the extra options box) and it does a 10 -> 8 bit conversion, but the file is properly tagged.

VLC doesn't support HDR yet, I have no idea if MediaPlayer or KMPlayer do.
AndreiP
Posts: 20
Joined: Thu Nov 02, 2017 4:54 pm

Re: x265 output is grey and no brilliant colors

Post by AndreiP »

Ritsuka wrote: Wed Nov 08, 2017 7:12 pm As I said before, mastering metadata are lost (but you can set it manually in the extra options box) and it does a 10 -> 8 bit conversion, but the file is properly tagged.
Can you give me an example? This is quite new to me...
Ritsuka wrote: Wed Nov 08, 2017 7:12 pm Seems to work here. Encoded it, played back in mpv and the colors are right. VLC doesn't support HDR yet, I have no idea if MediaPlayer or KMPlayer do.
damn ... you are totally right. I can see brilliant colors when using MPV... So I assume only MPV is handling the file correctly then ... Is that something I should mentioned in the VLC forum so that this got sorted out in the future (maybe with some details which I can share with them)?
User avatar
Ritsuka
HandBrake Team
Posts: 1655
Joined: Fri Jan 12, 2007 11:29 am

Re: x265 output is grey and no brilliant colors

Post by Ritsuka »

Something like this:

hrd:master-display=G(13250,34500)B(7500,3000)R(34000,16000)WP(15635,16450)L(10000000,500)

VLC devs are already working on it, but it's hard to guess a timeframe for it (or for the official VLC 3.0 release)
AndreiP
Posts: 20
Joined: Thu Nov 02, 2017 4:54 pm

Re: x265 output is grey and no brilliant colors

Post by AndreiP »

Ritsuka wrote: Wed Nov 08, 2017 7:27 pm hrd:master-display=G(13250,34500)B(7500,3000)R(34000,16000)WP(15635,16450)L(10000000,500)
Great thanks.
Ritsuka wrote: Wed Nov 08, 2017 7:27 pm VLC devs are already working on it, but it's hard to guess a timeframe for it (or for the official VLC 3.0 release)
ok, so there is then no need to inform them about a bug?
WhatZit
Experienced
Posts: 77
Joined: Sat Feb 13, 2016 2:45 am

Re: x265 output is grey and no brilliant colors

Post by WhatZit »

AndreiP wrote: Wed Nov 08, 2017 7:23 pmSo I assume only MPV is handling the file correctly then...
MPV applies the same tone-mapped exposure bias that I was talking about: https://github.com/mpv-player/mpv/issues/2572

Not being familiar with mpv or its source code, I'm not sure if that's dynamically calculated or LUT derived.

Either way, instead of relying on the off-chance of suitable video post-processing support, if you want to bake decent-looking 8-bit SDR PC/TV levels into an encode based on the source's 10/12-bit HDR Perceptual Quantizer levels, then you'll need an additional compensation process or filter.

Note that SDR VPP's will display a genuine HDR source, AND a botched SDR encode pretending to be HDR, with the same apparent dynamic range, just like the "vivid" setting of an SDR television would do.

Anyway, if you want to understand what's involved with a HDR->SDR conversion, please read BT.2390, especially section 5.4:

http://www.itu.int/dms_pub/itu-r/opb/re ... -PDF-E.pdf

A couple of heads ups for the HandBrake team:

1) There are NO 8-bit signalling bounds established within ANY HDR digital representation, so tagging 8-bit encodes with any HDR matrix, primary or transfer flags results in broken out-of-spec files.

2) 1080P HDR pixel rates ONLY exist in BT.2100, so flagging 1080P encodes as BT.2020 based on pass-through 2160P tags results in broken out-of-spec files.
User avatar
Ritsuka
HandBrake Team
Posts: 1655
Joined: Fri Jan 12, 2007 11:29 am

Re: x265 output is grey and no brilliant colors

Post by Ritsuka »

1) It's up to the user right now to use the right settings. And HandBrake pipeline is 8bit yet, I wouldn't use it to convert HDR files. But you can use 10bit HEVC as encoder, so if you don't care you can create a in-spec file. I wouldn't ever watch HDR on a SDR screen.

2) Bt.2100 uses the same color primaries and matrix as Bt.2020, the only difference is the transfer function. Where do you see HandBrake flagging the 1080p encode as Bt.2020?
AndreiP
Posts: 20
Joined: Thu Nov 02, 2017 4:54 pm

Re: x265 output is grey and no brilliant colors

Post by AndreiP »

Ritsuka wrote: Thu Nov 09, 2017 6:57 am It's up to the user right now to use the right settings. And HandBrake pipeline is 8bit yet, I wouldn't use it to convert HDR files. But you can use 10bit HEVC as encoder, so if you don't care you can create a in-spec file. I wouldn't ever watch HDR on a SDR screen.
Got the point, however the device which I used to watch movies during my night shift isn´t really able to handle the original one. So what would you use if not HandBrake?

Edit:
As this seamed to be more VLC specified I have created a posting on the VLC forum as well, which can be found here. So this posting here could be closed if needed.
Post Reply