My Google Pixel phone records MP4 H.264 video with yuvj420p flag. The videos directly from the Pixel play fine on VLC. When I use HandBrake to re-encode the videos to H.264 or H.265 the flag is changed to yuv420p but the videos are washed out when played with VLC.
To eliminate playback issues I converted the same video with ffmpeg using
-vf scale=w=-1:h=-1:in_range=pc:out_range=tv
That video plays with correct colors in VLC. Only the HandBrake video plays with washed out colors.
1.3.0 (2019110900)
Windows 10 1909
N/A
An Activity Log is required for support. Please read https://handbrake.fr/docs/en/latest/help/activity-log.html for more information.
~~~
HandBrake 1.3.0 (2019110900)
OS: Microsoft Windows NT 10.0.18363.0
CPU: AMD Ryzen 9 3900X 12-Core Processor
Ram: 32687 MB,
GPU Information:
NVIDIA GeForce GT 710 - 26.21.14.3200
Screen: 1920x1200
Temp Dir: C:\Users\xxx\AppData\Local\Temp\
Install Dir: C:\Program Files\HandBrake 1.3.0
Data Dir: C:\Users\xxxx\AppData\Roaming\HandBrake
[06:15:35] base preset: Super HQ 1080p30 Surround
[18:15:35] hb_init: starting libhb thread
[18:15:35] Starting work at: Sun Jan 05 18:15:35 2020
[18:15:35] 1 job(s) to process
[18:15:35] json job:
{
"Audio": {
"AudioList": [
{
"Bitrate": 160,
"DRC": 0.0,
"Encoder": "av_aac",
"Gain": 0.0,
"Mixdown": 1,
"NormalizeMixLevel": false,
"Samplerate": 0,
"Track": 0,
"DitherMethod": 0
},
{
"Bitrate": 640,
"DRC": 0.0,
"Encoder": "ac3",
"Gain": 0.0,
"Mixdown": 1,
"NormalizeMixLevel": false,
"Samplerate": 0,
"Track": 0,
"DitherMethod": 0
}
],
"CopyMask": [
"copy:aac",
"copy:ac3",
"copy:dtshd",
"copy:dts",
"copy:eac3",
"copy:flac",
"copy:mp3",
"copy:truehd"
],
"FallbackEncoder": "ac3"
},
"Destination": {
"ChapterList": [
{
"Name": "Chapter 1"
}
],
"ChapterMarkers": true,
"AlignAVStart": true,
"File": "E:\Video\VID 20191227 095015.mp4",
"Mp4Options": {
"IpodAtom": false,
"Mp4Optimize": false
},
"Mux": "mp4"
},
"Filters": {
"FilterList": [
{
"ID": 4,
"Settings": {
"mode": "7"
}
},
{
"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": 12,
"Settings": {
"crop-bottom": "0",
"crop-left": "0",
"crop-right": "0",
"crop-top": "0",
"height": "1080",
"width": "1080"
}
},
{
"ID": 6,
"Settings": {
"mode": "2",
"rate": "27000000/900000"
}
}
]
},
"PAR": {
"Num": 9,
"Den": 16
},
"Metadata": {},
"SequenceID": 0,
"Source": {
"Angle": 1,
"Range": {
"Type": "chapter",
"Start": 1,
"End": 1
},
"Title": 1,
"Path": "E:\Media\VID_20191227_095015.mp4"
},
"Subtitle": {
"Search": {
"Burn": true,
"Default": false,
"Enable": true,
"Forced": true
},
"SubtitleList": []
},
"Video": {
"Encoder": "x264",
"Level": "4.0",
"TwoPass": false,
"Turbo": false,
"ColorMatrixCode": 0,
"Options": "ref=5:bframes=5",
"Preset": "veryslow",
"Profile": "high",
"Quality": 18.0,
"QSV": {
"Decode": false,
"AsyncDepth": 0
}
}
}
[18:15:35] CPU:
[18:15:35] - logical processor count: 24
[18:15:35] Intel Quick Sync Video support: no
[18:15:35] hb_scan: path=E:\Media\VID_20191227_095015.mp4, title_index=1
udfread ERROR: ECMA 167 Volume Recognition failed
src/libbluray/disc/disc.c:323: failed opening UDF image E:\Media\VID_20191227_095015.mp4
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
src/libbluray/bluray.c:2585: nav_get_title_list(E:\Media\VID_20191227_095015.mp4) failed
[18:15:35] bd: not a bd - trying as a stream/file instead
libdvdnav: Using dvdnav version 6.0.1
libdvdread: Encrypted DVD support unavailable.
libdvdread:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.IFO failed
libdvdread:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.BUP failed
libdvdread: Can't open file VIDEO_TS.IFO.
libdvdnav: vm: failed to read VIDEO_TS.IFO
[18:15:35] dvd: not a dvd - trying as a stream/file instead
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'E:\Media\VID_20191227_095015.mp4':
Metadata:
major_brand : mp42
minor_version : 0
compatible_brands: isommp42
creation_time : 2019-12-27T17:50:15.000000Z
location : +xxxxxxx/
location-eng : +xxxxxxxx/
com.android.version: 7.1.2
com.android.capture.fps: 30.000000
Duration: 00:00:49.26, start: 0.000000, bitrate: 21730 kb/s
Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuvj420p(pc, smpte170m), 1920x1080, 21629 kb/s, SAR 1:1 DAR 16:9, 30.02 fps, 120 tbr, 90k tbn, 180k tbc (default)
Metadata:
rotate : 90
creation_time : 2019-12-27T17:50:15.000000Z
handler_name : VideoHandle
Side data:
displaymatrix: rotation of -90.00 degrees
Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, mono, fltp, 96 kb/s (default)
Metadata:
creation_time : 2019-12-27T17:50:15.000000Z
handler_name : SoundHandle
[18:15:35] scan: decoding previews for title 1
[18:15:35] scan: audio 0x1: aac, rate=48000Hz, bitrate=96017 English (AAC LC) (1.0 ch) (96 kbps)
[18:15:35] scan: 10 previews, 1080x1920, 30.028 fps, autocrop = 0/0/0/0, aspect 1:1.78, PAR 1:1
[18:15:35] scan: supported video decoders: avcodec qsv
[18:15:35] libhb: scan thread found 1 valid title(s)
[18:15:35] Skipping subtitle scan. No suitable subtitle tracks.
[18:15:35] Starting Task: Encoding Pass
[18:15:35] work: only 1 chapter, disabling chapter markers
[18:15:35] job configuration:
[18:15:35] * source
[18:15:35] + E:\Media\VID_20191227_095015.mp4
[18:15:35] + title 1, chapter(s) 1 to 1
[18:15:35] + container: mov,mp4,m4a,3gp,3g2,mj2
[18:15:35] + data rate: 21730 kbps
[18:15:35] * destination
[18:15:35] + E:\Video\VID 20191227 095015.mp4
[18:15:35] + container: MPEG-4 (libavformat)
[18:15:35] + align initial A/V stream timestamps
[18:15:35] * video track
[18:15:35] + decoder: h264
[18:15:35] + bitrate 21629 kbps
[18:15:35] + filters
[18:15:35] + 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)
[18:15:35] + Decomb (mode=39)
[18:15:35] + Framerate Shaper (mode=2:rate=27000000/900000)
[18:15:35] + frame rate: 30.028 fps -> peak rate limited to 30.000 fps
[18:15:35] + Crop and Scale (width=1080:height=1080:crop-top=0:crop-bottom=0:crop-left=0:crop-right=0)
[18:15:35] + source: 1080 * 1920, crop (0/0/0/0): 1080 * 1920, scale: 1080 * 1080
[18:15:35] + Output geometry
[18:15:35] + storage dimensions: 1080 x 1080
[18:15:35] + pixel aspect ratio: 9 : 16
[18:15:35] + display dimensions: 607 x 1080
[18:15:35] + encoder: H.264 (libx264)
[18:15:35] + preset: veryslow
[18:15:35] + options: ref=5:bframes=5
[18:15:35] + profile: high
[18:15:35] + level: 4.0
[18:15:35] + quality: 18.00 (RF)
[18:15:35] + color profile: 6-6-6
[18:15:35] * audio track 1
[18:15:35] + decoder: English (AAC LC) (1.0 ch) (96 kbps) (track 1, id 0x1)
[18:15:35] + bitrate: 96 kbps, samplerate: 48000 Hz
[18:15:35] + mixdown: Mono
[18:15:35] + dither: none
[18:15:35] + encoder: AAC (libavcodec)
[18:15:35] + bitrate: 160 kbps, samplerate: 48000 Hz
[18:15:35] * audio track 2
[18:15:35] + decoder: English (AAC LC) (1.0 ch) (96 kbps) (track 1, id 0x1)
[18:15:35] + bitrate: 96 kbps, samplerate: 48000 Hz
[18:15:35] + mixdown: Mono
[18:15:35] + dither: none
[18:15:35] + encoder: AC3 (libavcodec)
[18:15:35] + bitrate: 640 kbps, samplerate: 48000 Hz
[18:15:35] sync: expecting 1479 video frames
[18:15:35] encx264: min-keyint: 30, keyint: 300
[18:15:35] encx264: encoding at constant RF 18.000000
[18:15:35] encx264: unparsed options: ref=5:bframes=5:level=4.0:b-adapt=2:direct=auto:analyse=all:me=umh:merange=24:subme=10:trellis=2:vbv-bufsize=31250:vbv-maxrate=25000:rc-lookahead=60
x264 [info]: using SAR=9/16
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
x264 [info]: profile High, level 4.0, 4:2:0, 8-bit
[18:15:36] sync: first pts video is 0
[18:15:36] sync: first pts audio 0x1 is 0
[18:15:36] sync: first pts audio 0x1 is 0
[18:15:36] sync: "Chapter 1" (1) at frame 2 time 4951
[18:15:59] reader: done. 1 scr changes
[18:16:02] work: average encoding speed for job is 59.523811 fps
[18:16:02] comb detect: heavy 0 | light 0 | uncombed 1476 | total 1476
[18:16:02] decomb: deinterlaced 0 | blended 0 | unfiltered 1476 | total 1476
[18:16:02] vfr: 1475 frames output, 1 dropped and 0 duped for CFR/PFR
[18:16:02] vfr: lost time: 0 (0 frames)
[18:16:02] vfr: gained time: 0 (0 frames) (0 not accounted for)
[18:16:03] aac-decoder done: 2309 frames, 0 decoder errors
[18:16:03] aac-decoder done: 2309 frames, 0 decoder errors
[18:16:03] h264-decoder done: 1475 frames, 0 decoder errors
[18:16:03] sync: got 1476 frames, 1479 expected
[18:16:03] sync: framerate min 18.178 fps, max 30.028 fps, avg 29.989 fps
x264 [info]: frame I:6 Avg QP:14.45 size: 78946
x264 [info]: frame P:334 Avg QP:18.64 size: 34639
x264 [info]: frame B:1135 Avg QP:21.01 size: 9799
x264 [info]: consecutive B-frames: 0.7% 1.6% 5.7% 43.9% 20.0% 28.1%
x264 [info]: mb I I16..4: 23.7% 60.1% 16.2%
x264 [info]: mb P I16..4: 5.2% 15.3% 1.4% P16..4: 49.5% 15.8% 9.5% 0.2% 0.1% skip: 2.9%
x264 [info]: mb B I16..4: 0.8% 1.7% 0.1% B16..8: 39.7% 7.0% 1.2% direct: 9.1% skip:40.5% L0:44.1% L1:48.1% BI: 7.8%
x264 [info]: 8x8 transform intra:68.0% inter:67.0%
x264 [info]: direct mvs spatial:98.6% temporal:1.4%
x264 [info]: coded y,uvDC,uvAC intra: 50.1% 52.4% 7.9% inter: 17.2% 30.8% 0.2%
x264 [info]: i16 v,h,dc,p: 13% 35% 10% 42%
x264 [info]: i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 8% 16% 12% 7% 10% 8% 14% 8% 17%
x264 [info]: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 6% 15% 6% 7% 13% 10% 17% 8% 18%
x264 [info]: i8c dc,h,v,p: 41% 33% 14% 13%
x264 [info]: Weighted P-Frames: Y:14.4% UV:4.5%
x264 [info]: ref P L0: 49.0% 9.6% 21.8% 9.3% 9.1% 1.2%
x264 [info]: ref B L0: 80.0% 13.9% 4.6% 1.5%
x264 [info]: ref B L1: 95.6% 4.4%
x264 [info]: kb/s:3765.23
[18:16:03] mux: track 0, 1475 frames, 23165041 bytes, 3759.03 kbps, fifo 1024
[18:16:03] mux: track 1, 2310 frames, 989913 bytes, 160.63 kbps, fifo 2048
[18:16:03] mux: track 2, 1539 frames, 3939840 bytes, 639.32 kbps, fifo 1024
[18:16:03] Finished work at: Sun Jan 05 18:16:03 2020
[18:16:03] libhb: work result = 0
~~~
Same behavior with Windows Media Player.
Use the following to quickly knock up test files that prove Handbrake does, indeed, not handle PC range very well:
ffmpeg -f lavfi -i testsrc -vf setdar=0,setsar=0,scale=1920:1080 -t 30 -pix_fmt yuvj420p -color_primaries bt709 -color_trc bt709 -colorspace bt709 "0-255.mp4"
EDIT: here's one I prepared earlier...
You can also change -pix_fmt & the -color to whatever you want to test, or try -i smptebars:
TL;DR: yes, handbrake doesn't handle those tags, but phones shouldn't be using "full range" in that tag either, they should use "limited".
I used to have the same "problem". When my phone had nougat, it saved all videos with the color range tag set to full instead of limited. Converting them with handbrake would make the final videos appear "washed out", but i actually think that was the real way they should look.
To my understanding, the reason why the videos seemed to have more contrast when they had the "full range" tag is because players (or the filters decoding the video, idk) like VLC, MPC-HC, and WMP can actually read that tag and change the colors of the video in real time (the same way you can change from full to limited and vice versa in MPC-HC with shaders).
If you open those videos in a program like Movies and TV for windows 10 (the one that i think it comes pre installed) you will see that it will not read the tag and the colors will be washed out like the videos you converted with handbrake (at least in my computer it does), that's why i think those are their true colors and the way they really should look.
The reason why they "look" washed out is because you got used looking at them with higher contrast. I don't know if it's the same as your phone but the videos took with mine look way more natural when the tag is not being "used" by the video player (or when i convert them with handbrake). Compare the 2 versions and you will see that the videos with the color range tag set to full lose ALOT of detail in the darks and whites, they get clipped. The "washed out" ones maintain those details.
Afaik, phones should not be using "full" on that tag, most of them don't. In fact, iphones are known to have great (if not the best) video quality for a phone and they use "limited", not full.. My phone manufacturer also started using "limited" since oreo.
By the way, i may be wrong but i think you can change that tag back to "full" again without re-enconding the video again with ffmpeg. The videos will get the contrasty look again on supported players, if that's really what you want.
Based on the appearance of the videos after encoding with Handbrake, I'd have to disagree that it's how they're supposed to look. The shadows are pixelated and grey just like when you turn the brightness on a still image up too high.
The real test is to shoot video of pure black and pure white and see what color values are actually recorded in the video. If it is indeed 0-255, then encoding software should map those values rather than truncating them. In other words, the encoder should convert each RGB value by:
A = 16 +†0.8594B
Where A is the new translated value and B is the original value from the video.
Blacks are "supposed" to look black! End of story!
Prove this for yourself: Ranges.zip
That .zip contains both Full & Limited range test pattern sources.
It also contains samples of what Handbrake does to each one.
For those who can't be bothered doing the experiment for themselves, here's some framegrabs:
Full/PC Range (0-255) source on top, HB encode on bottom (flipped to make blacks adjacent):

Limited/TV Range (16-235) source on top, HB encode on bottom (flipped to make blacks adjacent):

Now, the vast majority of hardware & software will ASSUME limited range quantization in SD/HD sources, regardless of any tagging present, because 16-235 has been the default for all colourspace standards before BT.2020 (which uses 4-1019).
Handbrake is far, far from being alone in mishandling this.
I also think this may become more of a problem in the future, as I'm seeing a LOT of HDR->SDR transcodes using 0-255, in some lame effort to retain the appearance of the 10/12-bit colour gamut.
I can't reproduce the issue on the Mac version. I encoded your "Full_Range.mkv" file, and it was correctly converted to limited range.
Reproduced it, it happens only if you scale the video. If you don't scale it the colours are ok, if you scale it the colour conversion is wrong.
The issue is that cropscale.c at lines 136 sets the range conversion, but it seems the decoded frames are already in limited range before being passed to the cropscale filter.
decavcodec.c add a filter to set the pixel format to yuv420p, and it converts to limited range too.
We could simply remove the range conversion in cropscale, and leave it in decavcodec but I don't know if the QSV decoder output is always in limited range or not.
@jstebbins any insight?
I am not rescaling the videos and still see the issue.
Don't need to be. The filter is still in the chain so I'm guessing it's still doing something when it really shouldn't be doing anything.
I just returned from my trip. I'll have a look at this after I catch up on a number of other things.
I've been having the same issue converting GoPro footage from a HERO8 to any format.
Not sure if any of this will help you guys or anyone that comes across this in the future -- tl;dr if you're having issues try using Adobe Media Encoder for now if you have it, and make sure you disable a setting in VLC for it show up correctly.
The GoPro footage I was trying to convert would play fine in VLC, but looked washed out (blacks and whites were weak) after conversion in Handbrake. I tried using Adobe Media Encoder and continued to have the same issue. After I had disabled "Use hardware YUV->RGB conversions" in VLC, suddenly the video converted with Adobe Media Encoder looked correct, however the Handbrake one still looked the same.
I doubt we're the only ones having the issue! I ended up searching for about an hour on Google different terms before I ended up finding the correct terminology, then created an account just to reply. I was reading elsewhere that it didn't seem like much of a concern since it doesn't affect "most videos" but the ones it does affect are very frustrating!
Spent some time chasing down the nearly exact same problem as @prupp89 and for the moment I'm punting.
In my case I'm converting 4k video from a hero8 for use with Vegas Pro as proxy video. My laptop can't handle playing back 4k during editing so I have to downconvert.
It seems that I'll just have to remember to switch back to the original video when doing color grading
Hi, can we edit the title a little bit to make it more accurate? I almost made a duplicate ticket.
yuvj420p is not "RGB" video, it is YUV 4:2:0 full range .
I'm still seeing this issue in 1.3.2 when downscaling Panasonic G7 full range 4K footage. Setting fullrange=on sets full range in the output, but the same "washing out" is happening regardless of the output range. If I encode in the native resolution of the file, the color is normal. Reopen this bug?
Cannot reproduce the issue with 1.3.2 to resize a 1080p yuvj420p (full range) video to 720p.
Setting fullrange=on sets full range in the output
I don't think HB supports full range output at all?
@fireattack It does support full range output with that option (edit: I tried with and without this option; the output is washed out in both cases). Here's the encode log from a 5s preview with the scaling 4k -> 1080p in use:
HandBrake 1.3.2 (2020050300)
OS: Microsoft Windows NT 6.1.7601 Service Pack 1
CPU: AMD FX(tm)-9590 Eight-Core Processor
Ram: 16283 MB,
GPU Information:
Radeon (TM) RX 470 Graphics - 24.20.13019.1008
Screen: 2560x1440
Temp Dir: C:\Users\Owner\AppData\Local\Temp\
Install Dir: C:\Program Files\HandBrake
Data Dir: C:\Users\Owner\AppData\Roaming\HandBrake
-------------------------------------------
# Starting Encode ...
[22:37:55] hb_init: starting libhb thread
[22:37:55] Starting work at: Thu May 14 22:37:55 2020
[22:37:55] 1 job(s) to process
[22:37:55] json job:
{
"Audio": {
"AudioList": [
{
"DRC": 0.0,
"Encoder": "copy:aac",
"Gain": 0.0,
"Mixdown": -1,
"NormalizeMixLevel": false,
"Samplerate": 0,
"Track": 0,
"DitherMethod": 0
}
],
"CopyMask": [
"copy:aac",
"copy:ac3",
"copy:dtshd",
"copy:dts",
"copy:eac3",
"copy:flac",
"copy:mp3",
"copy:truehd"
],
"FallbackEncoder": "mp3"
},
"Destination": {
"ChapterList": [],
"ChapterMarkers": false,
"AlignAVStart": true,
"File": "D:\\processed\\P1330576_preview.mp4",
"Mp4Options": {
"IpodAtom": false,
"Mp4Optimize": true
},
"Mux": "av_mp4"
},
"Filters": {
"FilterList": [
{
"ID": 9,
"Settings": {
"cb-frame-count": 2,
"cb-origin-tune": 0.9,
"cb-patch-size": 7,
"cb-prefilter": 0,
"cb-range": 3,
"cb-strength": 4.0,
"y-frame-count": 2,
"y-origin-tune": 0.9,
"y-patch-size": 7,
"y-prefilter": 0,
"y-range": 3,
"y-strength": 3.0
}
},
{
"ID": 14,
"Settings": {
"cb-size": 7,
"cb-strength": 0.1,
"y-size": 9,
"y-strength": 0.165
}
},
{
"ID": 12,
"Settings": {
"crop-bottom": "0",
"crop-left": "0",
"crop-right": "0",
"crop-top": "0",
"height": "1080",
"width": "1920"
}
},
{
"ID": 6,
"Settings": {
"mode": "1"
}
}
]
},
"PAR": {
"Num": 1,
"Den": 1
},
"Metadata": {},
"SequenceID": 0,
"Source": {
"Angle": 1,
"Range": {
"Type": "preview",
"Start": 2,
"End": 450000,
"SeekPoints": 10
},
"Title": 1,
"Path": "\\anonymized\\Panasonic G7\\P1330576.MP4"
},
"Subtitle": {
"Search": {
"Burn": false,
"Default": false,
"Enable": false,
"Forced": false
},
"SubtitleList": []
},
"Video": {
"Encoder": "x264",
"Level": "auto",
"TwoPass": false,
"Turbo": false,
"ColorMatrixCode": 0,
"Options": "trellis=2:aq-mode=3:aq-strength=0.8:psy-rd=1.15,0.0:me=umh:subme=10:direct=auto:ref=4:bframes=4:b-adapt=2:fullrange=on",
"Preset": "slow",
"Profile": "high",
"Quality": 23.0,
"Tune": "film",
"QSV": {
"Decode": false,
"AsyncDepth": 0
}
}
}
[22:37:55] CPU:
[22:37:55] - logical processor count: 8
[22:37:55] Intel Quick Sync Video support: no
[22:37:55] hb_scan: path=\\anonymized\Panasonic G7\P1330576.MP4, title_index=1
udfread ERROR: ECMA 167 Volume Recognition failed
src/libbluray/disc/disc.c:323: failed opening UDF image anonymized\Panasonic G7\P1330576.MP4
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
src/libbluray/bluray.c:2585: nav_get_title_list(anonymized\Panasonic G7\P1330576.MP4\) failed
[22:37:55] bd: not a bd - trying as a stream/file instead
libdvdnav: Using dvdnav version 6.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
[22:37:56] dvd: not a dvd - trying as a stream/file instead
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'anonymized\Panasonic G7\P1330576.MP4':
Metadata:
major_brand : mp42
minor_version : 1
compatible_brands: mp42avc1
creation_time : 2018-07-06T19:03:06.000000Z
Duration: 00:05:59.86, start: 0.000000, bitrate: 94734 kb/s
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuvj420p(pc, bt709), 3840x2160 [SAR 1:1 DAR 16:9], 94600 kb/s, 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc (default)
Metadata:
creation_time : 2018-07-06T19:03:06.000000Z
Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 125 kb/s (default)
Metadata:
creation_time : 2018-07-06T19:03:06.000000Z
[22:37:56] scan: decoding previews for title 1
[22:37:58] scan: audio 0x1: aac, rate=48000Hz, bitrate=125356 Unknown (AAC LC) (2.0 ch) (125 kbps)
[22:38:03] scan: 10 previews, 3840x2160, 29.970 fps, autocrop = 0/0/0/0, aspect 16:9, PAR 1:1
[22:38:03] scan: supported video decoders: avcodec qsv
[22:38:03] libhb: scan thread found 1 valid title(s)
[22:38:03] Starting Task: Encoding Pass
[22:38:03] NLMeans using SSE2 optimizations
[22:38:03] NLMeans using 8 threads
[22:38:03] MTFrame thread started for segment 0
[22:38:03] MTFrame thread started for segment 1
[22:38:03] MTFrame thread started for segment 2
[22:38:03] MTFrame thread started for segment 3
[22:38:03] MTFrame thread started for segment 4
[22:38:03] MTFrame thread started for segment 5
[22:38:03] MTFrame thread started for segment 6
[22:38:03] MTFrame thread started for segment 7
[22:38:03] job configuration:
[22:38:03] * source
[22:38:03] + anonymized\Panasonic G7\P1330576.MP4
[22:38:03] + title 1, start 00:00:0.00 stop 00:00:5.00
[22:38:03] + container: mov,mp4,m4a,3gp,3g2,mj2
[22:38:03] + data rate: 94734 kbps
[22:38:03] * destination
[22:38:03] + D:\processed\P1330576_preview.mp4
[22:38:03] + container: MPEG-4 (libavformat)
[22:38:03] + optimized for HTTP streaming (fast start)
[22:38:03] + align initial A/V stream timestamps
[22:38:03] * video track
[22:38:03] + decoder: h264
[22:38:03] + bitrate 94600 kbps
[22:38:03] + filters
[22:38:03] + Framerate Shaper (mode=1)
[22:38:03] + frame rate: 29.970 fps -> constant 29.970 fps
[22:38:03] + Denoise (nlmeans) (y-strength=3:y-origin-tune=0.9:y-patch-size=7:y-range=3:y-frame-count=2:y-prefilter=0:cb-strength=4:cb-origin-tune=0.9:cb-patch-size=7:cb-range=3:cb-frame-count=2:cb-prefilter=0)
[22:38:03] + Crop and Scale (width=1920:height=1080:crop-top=0:crop-bottom=0:crop-left=0:crop-right=0)
[22:38:03] + source: 3840 * 2160, crop (0/0/0/0): 3840 * 2160, scale: 1920 * 1080
[22:38:03] + Sharpen (unsharp) (y-strength=0.165:y-size=9:cb-strength=0.1:cb-size=7)
[22:38:03] + Output geometry
[22:38:03] + storage dimensions: 1920 x 1080
[22:38:03] + pixel aspect ratio: 1 : 1
[22:38:03] + display dimensions: 1920 x 1080
[22:38:03] + encoder: H.264 (libx264)
[22:38:03] + preset: slow
[22:38:03] + tune: film
[22:38:03] + options: trellis=2:aq-mode=3:aq-strength=0.8:psy-rd=1.15,0.0:me=umh:subme=10:direct=auto:ref=4:bframes=4:b-adapt=2:fullrange=on
[22:38:03] + profile: high
[22:38:03] + level: auto
[22:38:03] + quality: 23.00 (RF)
[22:38:03] + color profile: 1-1-1
[22:38:03] * audio track 1
[22:38:03] + decoder: Unknown (AAC LC) (2.0 ch) (125 kbps) (track 1, id 0x1)
[22:38:03] + bitrate: 125 kbps, samplerate: 48000 Hz
[22:38:03] + AAC Passthru
[22:38:03] sync: expecting 179 video frames
[22:38:03] encx264: min-keyint: 30, keyint: 300
[22:38:03] encx264: encoding at constant RF 23.000000
[22:38:03] encx264: unparsed options: trellis=2:aq-mode=3:aq-strength=0.8:psy-rd=1.15,0:me=umh:subme=10:direct=auto:ref=4:bframes=4:b-adapt=2:fullrange=on:deblock=-1,-1:rc-lookahead=50
x264 [info]: using SAR=1/1
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX XOP FMA3 BMI1
x264 [info]: profile High, level 4.0, 4:2:0, 8-bit
[22:38:05] sync: first pts video is 0
[22:38:05] sync: first pts audio 0x1 is 75
[22:38:05] sync: Chapter 1 at frame 3 time 6006
[22:39:12] sync: reached video pts 450450, exiting early
[22:39:13] sync: reached audio 0x1 pts 451275, exiting early
[22:39:41] work: average encoding speed for job is 2.217162 fps
[22:39:41] vfr: 150 frames output, 0 dropped and 0 duped for CFR/PFR
[22:39:41] vfr: lost time: 0 (0 frames)
[22:39:41] vfr: gained time: 0 (0 frames) (0 not accounted for)
[22:39:41] aac-decoder done: 986 frames, 0 decoder errors
[22:39:41] h264-decoder done: 614 frames, 0 decoder errors
[22:39:41] sync: got 150 frames, 179 expected
[22:39:41] sync: framerate min 29.970 fps, max 29.970 fps, avg 29.970 fps
x264 [info]: frame I:1 Avg QP:23.90 size:122734
x264 [info]: frame P:36 Avg QP:24.76 size: 23924
x264 [info]: frame B:113 Avg QP:30.55 size: 2630
x264 [info]: consecutive B-frames: 3.3% 0.0% 4.0% 29.3% 63.3%
x264 [info]: mb I I16..4: 34.7% 49.7% 15.6%
x264 [info]: mb P I16..4: 0.1% 0.3% 0.1% P16..4: 24.2% 9.1% 10.6% 0.0% 0.0% skip:55.6%
x264 [info]: mb B I16..4: 0.0% 0.0% 0.0% B16..8: 21.8% 0.8% 0.2% direct: 0.3% skip:76.8% L0:33.6% L1:63.0% BI: 3.4%
x264 [info]: 8x8 transform intra:51.9% inter:54.9%
x264 [info]: direct mvs spatial:94.7% temporal:5.3%
x264 [info]: coded y,uvDC,uvAC intra: 56.5% 50.8% 27.2% inter: 3.7% 3.9% 0.3%
x264 [info]: i16 v,h,dc,p: 64% 8% 5% 23%
x264 [info]: i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 12% 6% 7% 13% 15% 14% 12% 13% 9%
x264 [info]: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 14% 5% 2% 11% 13% 15% 13% 15% 11%
x264 [info]: i8c dc,h,v,p: 34% 24% 30% 12%
x264 [info]: Weighted P-Frames: Y:0.0% UV:0.0%
x264 [info]: ref P L0: 59.2% 12.5% 21.9% 5.8% 0.5%
x264 [info]: ref B L0: 88.5% 9.0% 2.5%
x264 [info]: ref B L1: 94.7% 5.3%
x264 [info]: kb/s:2047.83
[22:39:41] mux: track 0, 150 frames, 1281132 bytes, 2034.20 kbps, fifo 256
[22:39:41] mux: track 1, 235 frames, 78558 bytes, 124.74 kbps, fifo 256
[22:39:42] Finished work at: Thu May 14 22:39:42 2020
[22:39:42] libhb: work result = 0
# Encode Completed ...
MediaInfo for the file being transcoded that is still triggering this bug when scaled:
General
Complete name : \\anonymized\Panasonic G7\P1330576.MP4
Format : MPEG-4
Format profile : Base Media / Version 2
Codec ID : mp42 (mp42/avc1)
File size : 3.97 GiB
Duration : 5 min 59 s
Overall bit rate mode : Variable
Overall bit rate : 94.7 Mb/s
Encoded date : UTC 2018-07-06 19:03:06
Tagged date : UTC 2018-07-06 19:03:06
Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : [email protected]
Format settings : CABAC / 2 Ref Frames
Format settings, CABAC : Yes
Format settings, Reference frames : 2 frames
Format settings, GOP : M=3, N=8
Codec ID : avc1
Codec ID/Info : Advanced Video Coding
Duration : 5 min 59 s
Bit rate mode : Variable
Bit rate : 94.6 Mb/s
Maximum bit rate : 106 Mb/s
Width : 3 840 pixels
Height : 2 160 pixels
Display aspect ratio : 16:9
Frame rate mode : Constant
Frame rate : 29.970 (30000/1001) FPS
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.381
Stream size : 3.96 GiB (100%)
Encoded date : UTC 2018-07-06 19:03:06
Tagged date : UTC 2018-07-06 19:03:06
Color range : Full
Color primaries : BT.709
Transfer characteristics : BT.709
Matrix coefficients : BT.709
Codec configuration box : avcC
Audio
ID : 2
Format : AAC LC
Format/Info : Advanced Audio Codec Low Complexity
Codec ID : mp4a-40-2
Duration : 5 min 59 s
Source duration : 5 min 59 s
Bit rate mode : Constant
Bit rate : 128 kb/s
Channel(s) : 2 channels
Channel layout : L R
Sampling rate : 48.0 kHz
Frame rate : 46.875 FPS (1024 SPF)
Compression mode : Lossy
Stream size : 5.38 MiB (0%)
Source stream size : 5.38 MiB (0%)
Encoded date : UTC 2018-07-06 19:03:06
Tagged date : UTC 2018-07-06 19:03:06
I can provide a sample file if needed, but it'll necessarily be a bit big. Any Panasonic G7 footage is 0-255 by default, I think.
AFAIK that's an option for x264, and it doesn't really work for either FFMPEG or HB because they have their own way to set and/or feed the frame (with pix_fmt for FFMPEG for example).
It will produce the "wrong" file, yes, but like I said, HB is never designed to output full range video.
Previously, you said HB will produce washed out video "regardless of the output range", is that true?
Like, if you remove it option, can you output correct limited range video?
That's the part I can't reproduce (and the part HB is supposed to work correctly).
Without fullrange=on it produces a limited range file with the same color errors (0-255 -> 16-235), so in the case of default settings, it's being double-converted from full range to limited range and then marked as limited range.
I just did some more testing. It turns out that the problem is different than I thought. I tested a different clip and things worked fine, which surprised me. I played with a bunch of the options to see what might be triggering it, and narrowed it down to the fact that for this one batch of videos, I tried to use a Denoise option. Regardless of other settings I tried, both hqdn3d and NLMeans reliably trigger this "double range conversion" problem.
Here is footage that will reproduce the problem if you use any Denoise preset.
One more test: when NOT scaling, using Denoise doesn't cause this problem. Something is apparently happening only when scaling + Denoise are both being used.
Yeah, can confirm. Resizing + denoise = double color conversion.
I tried some other filters and they don't have this issue. Probably better to open a new ticket? I opened one at #2859
Thanks for that! I'll watch over there and stop polluting this closed thread. :-)
I am still having this problem on Windows 10 x64 with Handbrake 1.3.3. Should I file a new bug, or should this one be reopened?
To clarify, this is with no crop, no filters, no resizing.
Probably should open a new ticket with details or steps to produce for better tracking.
Most helpful comment
Yeah, can confirm. Resizing + denoise = double color conversion.
I tried some other filters and they don't have this issue. Probably better to open a new ticket? I opened one at #2859