Page 1 of 2

dark h.264 video (only in mp4 container)

Posted: Sun Apr 15, 2007 3:40 pm
by macd00d
I know this has been discussed in these forums before, but I have been unable to find a definite answer. It should be obvious to anyone that has done the side-by-side testing, that handbrake h.264 encoded video is quite a bit darker then the original source. Please don't dispute this if you haven't done the side-by-side testing. This is true at all bitrates and framerates using the latest svn 0.8b2.

My question is, are there any current plans to tweak the brightness level? Thanks for the continued development on this app!

Re: dark h.264 video

Posted: Sun Apr 15, 2007 4:41 pm
by jbrjake
macd00d wrote:Please don't dispute this if you haven't done the side-by-side testing.
I'll dispute this.

I just did a side-by-side test to check, with lossless .png snapshots from VLC 0.8.6. I see absolutely no difference in color, playing an h.264 video from HandBrake versus the actual .vob it was encoded from, on my Westinghouse LVM-37W3 monitor. I dunno, I'm not a career graphics guy, I don't have a professionally calibrated display or anything, and maybe there are differences but there's just too subtle for me to notice...

DVD:
Image
HB:
Image

Posted: Sun Apr 15, 2007 6:40 pm
by baggss
My observation is that the degree of darkness varies from movie to movie and it not at all consistent. On some it is slight to none, on others it is quite noticeable.

Posted: Sun Apr 15, 2007 7:14 pm
by TheBum
It also appears to depend on the player you're using. I ripped Monty Python and the Holy Grail and it's quite dark when opened in QuickTime Player but considerably brighter when opened in VLC. Since I intend to eventually use these movies with an Apple TV, which is QuickTime-based, I'm more inclined to make them appear OK in QuickTime Player than in VLC. Are there any advanced options for the x264 encoder that might brighten the encodes?

Posted: Sun Apr 15, 2007 7:21 pm
by baggss
I have always understood, perhaps incorrectly, that this is a Quicktime/H,264 issue.

Posted: Sun Apr 15, 2007 9:08 pm
by hawkman
I don't use VLC regularly (not polished enough for me - I know, I'm shallow and stupid), but movies definitely look dark when I play them back in QuickTime. Fact of life I guess? Annoying though, especially with a film that's fairly dark to start with - can get very difficult to see.

definitely quicktime, but...

Posted: Sun Apr 15, 2007 11:15 pm
by macd00d
So after more extensive testing it does indeed appear that this is some sort of quicktime issue. At least the "darkness" that I am seeing in my videos is not at all present when they are viewed with VLC.

Another observation is that this appears only limited to h.264 in an mp4 container. h.264 in an avi container does not exhibit the darkening when viewed in quicktime.

Any ideas as to why? For those of us poor soles that want to stay within the Apple world of mp4/h.264/quicktime... any plans of a switch/workaround from within HB?

Posted: Sun Apr 15, 2007 11:17 pm
by baggss
As I understand it, it is not something that can be "fixed" in HB itself.

Posted: Mon Apr 16, 2007 12:57 am
by jbrjake
I've asked maurj, before, to look into adding a colr atom for QuickTime--to spell out the gamma to it--and I hope he'll get a chance to do it, some day. The code was there in some post-0.7.1 revisions of HB but requires ffmpeg for muxing, so it's a matter of translating it to libmp4v2ese.

And in the future, remember that it doesn't take "extensive testing" to try a different video player before claiming HandBrake has an "obvious" problem. It's simply good troubleshooting, the same as trying a different cable before claiming a network card is dead.

In this case, the problem isn't obvious at all--it's QuickTime wanting a little piece of metadata in the mp4 header. And that means the solution isn't hacking in a video filter to artificially brighten the encode, it's a small patch to the mp4 muxing code. Or using a video player that doesn't suck.

Posted: Mon Apr 16, 2007 1:58 am
by remyhelsinki
I'm stuck in the same position in that I'd like to use Quicktime/iTunes/AppleTV for my rips and I wish Apple would fix Quicktime to not do what it is doing (making it darker than the original if the metadata isn't found). I did just try changing the extension from mp4 to m4v thinking there may be a slight chance Quicktime/iTunes would treat it differently. Of course since it isn't a different container that was useless and it still comes out a bit darker but I thought it was worth the 2 secs to try it. I also thought that maybe this issue arises because I use the 2.2 gamma on my monitor instead of the 1.8 gamma. Of course that would make everything darker but unless Quicktime takes that information and does something strange is still doesn't explain the why VLC gets it correct.

Thanks jbrjake for explaining what is going on since this issue has been frustrating for me. This is the only thing that has stopped me from ripping my entire dvd collection onto my harddrive and I hope that a future version of Quicktime handles the files differently or that maurj (or another dev) will sometime have time to add the colr atom (not sure how hard that is since I'm a designer not a programmer).

Still, kudos to the Handbrake dev team for all their work. It is fun to see what will be coming on the horizon in the next releases (I compiled 0.8b2 so I've been able to play around a bit with it).

Look on the (bright side.)

Posted: Tue Apr 17, 2007 2:50 am
by deckeda
Since the encode isn't the problem, adjust your TV or monitor. Many TVs have custom user presets and of course OS X can use different custom profiles to switch in a jiffy. And then in 5 years when Apple fixes it you can forget all that and still watch your old encodes as-is.

Re: Look on the (bright side.)

Posted: Tue Apr 17, 2007 3:05 am
by macd00d
deckeda wrote:Since the encode isn't the problem, adjust your TV or monitor. Many TVs have custom user presets and of course OS X can use different custom profiles to switch in a jiffy. And then in 5 years when Apple fixes it you can forget all that and still watch your old encodes as-is.
Very good point. It would be a shame to wind up with a bunch of movies that are too BRIGHT in 5 years when Apple fixes the problem with Quicktime. Of course by then, we'll all be ripping Blu-Rays and be on to a whole new subset of problems.

Posted: Tue Apr 17, 2007 5:31 am
by lagomatic
I've noticed that handbaked moves can look darker in quickime player on the mac however when viewing though an AppleTV the darkness is not as pronounced, so I've stopped worrying about it quite so much. Must be some different rendering between a Mac & an AppleTV.

Posted: Thu Apr 19, 2007 2:52 am
by tubbyman
It's mostly been said above by jbrjake, but it's your player, and it's not limited to quicktime.

Assuming that the display is constant and the gamma is unchanged, players display with different gammas and brightness. Forget about the HB transcode, look at a single original VOB file with different players. VOB display on VLC is different than mplayer is different than DIVX Player is different than Quicktime, etc...and that's with the exact same source media. For a ridiculous example of this, watch a video podcast in a browser with the quicktime plugin, then quicktime, then in itunes, then in itunes fullscreen. It's night and day, the differences. Well, on calibrated monitors, it's night and day, anyway. Many players, in full screen mode, override your display calibrations, so that just a simple switch from 100% windowed size playback to fullscreen can drastically change the gamma.

My advice is to choose a player that uses a gamma you like and stick with it. Otherwise, you can easily modify the gamma of a movie with a video editor, and even a lot of transcoders (mencoder is free and it has gamma). I don't think ffmpeg or HB have gamma settings, but many others do. VLC has opengl gamma in "Extended Controls" for realtime playback gamma setting changes.

Posted: Tue May 01, 2007 8:00 pm
by qwerty123
Gotta say, I love searching the forum for a 'problem' I have and finding such a clear answer. Thanks guys! I hope Maurj needs to use QuickTime Player soon and then fancies doing the colr fix...

PS. I nearly wet myself at the request and response (in another locked thread) to the screensaver idea!!

quicktime player needed for turbo speed playing, vids dark

Posted: Mon Jun 25, 2007 6:07 am
by stuffer
This little bug of videos playing darker in quicktime player is a real deal breaker for me. I mainly rip my dvds to mpeg so that i can play them turbo, and quicktime player gives a nice speed control in the av controls window that lets you go from 1x to 3x with a nice slider, pitch staying constant the whole time. after 2x you start losing parts of words, but 2x with the correct pitch as quicktime player devivers is intense. vlc or other players don't have the speed control, so i am stuck using quicktime player and tweaking the brightness and contrast if i want to watch turbo, or vlc if for some reason my brain is feeling slow and i want to watch the video at the slow speed deemed acceptable for the majority of the slow american population at the correct brightness... please, it can't be too hard to tweak the tag that makes quicktime be stupid.

H.264 in .MP4 brighter with Perian 1.0 installed?

Posted: Sat Aug 04, 2007 3:04 pm
by thanatopsis
It appears to me that installing Perian 1.0 circumvents this QuickTime darkness bug.
Somebody on the Perian forum said Perian doesn't do anything with .MP4 since QuickTime already handles that, but it must do something. When Perian is installed my H.264 MP4s look as bright as they do in VLC or MPlayer, and the "Format" display in the QuickTime Inspector window display a bunch of garbage. Without Perian the video is noticeably darker in QuickTime and the the format says "H.264 Decoder."
I haven't compared any movies in Front Row, but since it is QT based, they should also be brighter. I know people have hacked AppleTV and added Perian 0.5. Maybe 1.0 will solve the "too dark" problem for that as well.

Posted: Sun Aug 05, 2007 11:03 am
by bhaal
I've noticed the same thing. Perian really is a godsend.

Posted: Sat Aug 18, 2007 4:11 pm
by Push Eject
Great information in this thread... I am right in the middle of this issue.

A week ago I decided to rip all our dvds to a mini connected hdmi to a sharp aquos and boy is the gamma problem evident when playing back in Front Row.

So who knows of a good/fast gamma switching app? I could make display profiles, but I'd like something quick and easy for the fam'.

Thanks!

Posted: Sat Aug 18, 2007 4:14 pm
by hawkman
Perian's not quick and easy enough for you? :/

Posted: Sat Aug 18, 2007 4:23 pm
by Push Eject
hawkman wrote:Perian's not quick and easy enough for you? :/
What's Perian?

Just found DarkAdapted... any one try that?

Posted: Sat Aug 18, 2007 4:26 pm
by Push Eject
Just perused Perian.org and I don't see anything about it adjusting your monitor gamma. Am I missing something?

Thanks for the fast feedback! :)

Posted: Sat Aug 18, 2007 4:34 pm
by Push Eject
BTW, just manually adjusted gamma in display preferences and it seems a gamma of 1.4 looks like the dvd the file was ripped from. Sound like others' experience too?

Cheers.

Posted: Sat Aug 18, 2007 5:10 pm
by hawkman
Perian is a component for QuickTime, which - amongst other benefits - does not suffer from the darkening effect you're noticing.

Posted: Sat Aug 18, 2007 5:16 pm
by Push Eject
hawkman wrote:Perian is a component for QuickTime, which - amongst other benefits - does not suffer from the darkening effect you're noticing.
Thanks, hawkman. So simply installing Perian will adjust QuickTime playback in Front Row?