dark h.264 video (only in mp4 container)

HandBrake for Mac 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.
macd00d
Posts: 5
Joined: Sat Mar 24, 2007 5:09 am

dark h.264 video (only in mp4 container)

Post 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!
Last edited by macd00d on Sun Apr 15, 2007 11:25 pm, edited 1 time in total.
jbrjake
Veteran User
Posts: 4805
Joined: Wed Dec 13, 2006 1:38 am

Re: dark h.264 video

Post 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
baggss
Moderator
Posts: 886
Joined: Tue Jan 02, 2007 8:21 am

Post 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.
TheBum
Novice
Posts: 66
Joined: Tue Apr 10, 2007 12:03 am

Post 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?
baggss
Moderator
Posts: 886
Joined: Tue Jan 02, 2007 8:21 am

Post by baggss »

I have always understood, perhaps incorrectly, that this is a Quicktime/H,264 issue.
hawkman
Veteran User
Posts: 609
Joined: Sat Feb 17, 2007 9:46 pm

Post 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.
macd00d
Posts: 5
Joined: Sat Mar 24, 2007 5:09 am

definitely quicktime, but...

Post 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?
Last edited by macd00d on Sun Apr 15, 2007 11:21 pm, edited 1 time in total.
baggss
Moderator
Posts: 886
Joined: Tue Jan 02, 2007 8:21 am

Post by baggss »

As I understand it, it is not something that can be "fixed" in HB itself.
jbrjake
Veteran User
Posts: 4805
Joined: Wed Dec 13, 2006 1:38 am

Post 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.
remyhelsinki
Posts: 23
Joined: Mon Apr 16, 2007 1:35 am

Post 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).
deckeda
Enlightened
Posts: 138
Joined: Thu Feb 22, 2007 8:38 am

Look on the (bright side.)

Post 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.
macd00d
Posts: 5
Joined: Sat Mar 24, 2007 5:09 am

Re: Look on the (bright side.)

Post 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.
lagomatic
Posts: 5
Joined: Mon Mar 12, 2007 4:13 am

Post 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.
tubbyman
Posts: 42
Joined: Mon Apr 09, 2007 3:39 am

Post 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.
qwerty123
Posts: 26
Joined: Sun Feb 18, 2007 5:19 pm

Post 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!!
stuffer
Posts: 12
Joined: Mon Jun 25, 2007 5:58 am

quicktime player needed for turbo speed playing, vids dark

Post 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.
thanatopsis
Posts: 1
Joined: Sat Aug 04, 2007 5:12 am

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

Post 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.
bhaal
Posts: 49
Joined: Mon Mar 12, 2007 9:07 am

Post by bhaal »

I've noticed the same thing. Perian really is a godsend.
Push Eject
Posts: 17
Joined: Sat Aug 18, 2007 4:05 pm

Post 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!
hawkman
Veteran User
Posts: 609
Joined: Sat Feb 17, 2007 9:46 pm

Post by hawkman »

Perian's not quick and easy enough for you? :/
Push Eject
Posts: 17
Joined: Sat Aug 18, 2007 4:05 pm

Post by Push Eject »

hawkman wrote:Perian's not quick and easy enough for you? :/
What's Perian?

Just found DarkAdapted... any one try that?
Push Eject
Posts: 17
Joined: Sat Aug 18, 2007 4:05 pm

Post 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! :)
Push Eject
Posts: 17
Joined: Sat Aug 18, 2007 4:05 pm

Post 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.
hawkman
Veteran User
Posts: 609
Joined: Sat Feb 17, 2007 9:46 pm

Post by hawkman »

Perian is a component for QuickTime, which - amongst other benefits - does not suffer from the darkening effect you're noticing.
Push Eject
Posts: 17
Joined: Sat Aug 18, 2007 4:05 pm

Post 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?
Post Reply