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

Post by hawkman »

Apparently so. I haven't really compared, myself, but that's what's reported and it makes sense from a technical point of view.
Dr.Pepper

Post by Dr.Pepper »

This is why I will not use HB, the scenes are waaaaay too dark. It's horrible, and of course I use QT to watch my movies. Frontrow and iTunes uses QT, so it's just logical.

I stick to MPEG STREAMCLIP and QT pro. The compression speed is of no important to me, and QT is just slightly slower than HB anyway.

Image
hawkman
Veteran User
Posts: 609
Joined: Sat Feb 17, 2007 9:46 pm

Post by hawkman »

What I don't understand is why this is dragging on when the solution is stated right here: if the darkness bugs you, install Perian.
Push Eject
Posts: 17
Joined: Sat Aug 18, 2007 4:05 pm

Post by Push Eject »

hawkman wrote:Apparently so. I haven't really compared, myself, but that's what's reported and it makes sense from a technical point of view.
Thank you guys for the help (and you developers for a great program).

Perian fixed the gamma issue perfectly and I recommend it to anyone who thinks HB is at fault.

I played the dvd from a player into one input of my tv and my HB file via Front Row into another input and A-B'ed between them. The color is right on.

Thanks again!
ABhatnagar
Posts: 4
Joined: Mon Apr 21, 2008 2:14 pm

Re: dark h.264 video (only in mp4 container)

Post by ABhatnagar »

I just registered to reply to this thread...

I'm a PC user converting to MAC. So I am still a bit newbish at all the terminology (e.g. Not sure what VLC is???). One of the main reasons for getting a MAC was for movies, photo's, and music. I did a bit of research on the DVD tools out there and found Handbrake. This is an awesome piece of software!!!! I can't say enough about how good it is!

Ok, well I did purchase Cinematize Pro 2 and gave it a whirl too. I had to use MactheRipper first, not that big of a deal. Anyways, I finished ripping Star Wars Episode IV (BTW: I own it) with both Handbrake and Cinematize Pro.

Handbrake was a lot faster to complete. Anyways after doing some comparisons, the picture quality was spot on in both cases. Handbrake encoded AC3 while Cinematize Pro did not. Also, Handbrake cropped off those ugly black bars on the top and bottom of the picture automatically, Cinematize Pro did not. However in defense for Cinematize Pro, this maybe due to using MacTheRipper first I am unsure of this. Lastly, Handbrake automatically added Chapter markers while Cinematize Pro missed the boat here.

The one thing that Cinematize Pro had over Handbrake was that the picture was more true to brightness in comparison. I compared the Original DVD using DVD player and then using Quicktime I compared both rip's from Handbrake and Cinematize Pro. I do have Perian installed so not sure if this is the reason. Anyways, I'm doing some more testing to see if certain tweaks will make a difference.

1st Tweak: Encode for QuickTime Movie preset versus ipod preset. (the rip is occuring right now)
2nd Tweak: Turn Deinterlace ON (read somewhere that this should be done).

Not related to this topic, but one other observation is that the file size from Handbrake was almost 1-2 GB larger. So not sure about this, but will tweak the Bit Rate down to hopefully lower this. Right now I'm setting at 2500.

Any suggestions out there are always welcome. I will post any significant results as they appear :lol: (Get it appear?!)

Oh I almost forgot, I am using a Sony XBR4 46" LCD. I read somewhere that this issue is related to the LCD monitors.
ABhatnagar
Posts: 4
Joined: Mon Apr 21, 2008 2:14 pm

Re: dark h.264 video (only in mp4 container)

Post by ABhatnagar »

Ok....I said I would post again when I found out more. Well I got some significant more...before I'm flogged, I'm posting a workaround so please hear me out.

Being a fellow developer I do a lot of troubleshooting, nearly everyday. So pretty simple stuff to do the fact gathering and eliminate 'stuff'.

Short answer:
Handbrake is and forever will be the most awesome software! The H.264 encoding is true to its source. What does this mean? Well, if the original DVD has a dark picture, then that's what you get 1:1 from Handbrake. Would it be nice to have some brightness control? Sure it would, but take that up with the enhancement request department.

Long answer:
Here is a snapshot. The top left image is Cinematize Pro 2 (which by the way I'm getting a full refund for and plan to never use). The right one is H.264 encoding from Handbrake (looks darker huh?) The bottom left image is H.264 encoding from QuickTime Pro (this is the workaround). I will explain more down below the image.

Hmmmm...went to insert an image and I can't directly. I will work on this tomorrow. In the meanwhile, please trust me if you wish.

1. The H.264 encoding from Handbrake seems darker, but when you use the DVD Player that is part of the MAC it is exactly the same brightness.

2. The Cinematize Pro looks brighter, why? Well it uses Quicktime Pro for its encoding. That's the basic reason. To go just a bit deeper into it, the filter setting for the video has an option for ColorSync. Of course, the default setting here is: 'Current monitor'. Are the pieces beginning to fall into place?

So what about VLC, which I recently learned is an open-source media player. Good stuff, huh?! This player uses hardware acceleration and the power of your graphics card along with a similar ColorSync filter.

Conclusions are: Is there a problem with H.264 encoding from Handbrake...I don't think so. Is there compatibility problems with QuickTime and movies encoded with H.264...well, maybe? The interesting fact is, an H.264 movie encoded from QuickTime adjusts the ColorSync with some setting in the mux. Are the movies encoded by Handbrake missing this setting...I do not know and this would be a great question to know by our fabulous Handbrake developers?

Workaround:
Facts are facts and here is what I came up with which produces a much better quality movie using HandBrake and Quicktime Pro. Even though the source is dark, QuickTime has a way of enhancing this that HandBrake doesn't. So let's leverage that.


Handbrake v0.9.2

Step 1: Using HandBrake encode an MPEG-4 Video / AC-3 Audio as an MKV file. I set the Average bitrate to about 2500 kbps. You can go higher, but it's pretty pointless beyond 2500. Framerate is 'Same as source' and Encoder is FFmpeg. Of course you want to have 2-pass encoding on to avoid audio synch issues. In the picture settings I make sure the Anamorphic is set to Strict and the rest is default or adjusted as necessary.

Step 2: In the Audio/Subtitles section set your Subtitles as needed. Audio rate is typically 48 khz with a 160 bitrate. The higher we go here the better, because later this will be downsized just like the video. Make sure AC3 Passthru is on, of course, if the source supports this.

Step 3: Chapters are default and nothing in the Advanced. Queue it up and Start. The process is fairly quick, certainly not as long as H.264 encoding.

Step 4: Ok you have an mkv file. Great start. Ensure you have the Perian add-on for Quicktime Pro and of course Quicktime Pro. Now if you playback the mkv file with quicktime, you will still notice it is dark. That's ok, because as I said before HandBrake did a 1:1 conversion from the source.

Step 5: Now its time to take advantage of the H.264 encoding of Quicktime Pro along with that filter 'stuff'. So open the mkv in QuickTime Pro and Export Movie to QuickTime Movie.

Step 6: Select Options and for Video choose:
Compression: H.264
Frame Rate: Current, typically every 24 frames with Frame Reordering On
Compressor Quality: Best quality (multi-pass), again to avoid synch issues with the audio
Data Rate (Important): Restrict to: 1500 and optimize for CD/DVD-ROM. This will decrease the size of the file to something more manageable.

Step 7: Select Sound settings and choose:
Format: AAC
Channels: Typically 5.1
Rate: Typically 48 khz
Show Advanced Settings: On
Quality: Best (This is what makes a good movie great!)
Encoding: Avg Bit Rate
Target Bit Rate: 160 or whatever was set in HandBrake

Step 8: Uncheck the Prepare for Internet Streaming

Step 9: You are now ready to export. So Save that puppy and let QuickTime Pro go to work. This is fairly quick from an mkv file.

Step 10: So now you should have a .mov file for quicktime or iTunes or AppleTV. Well, what about iPods and that m4v file? You can use either QuickTime Pro again or iTunes to convert it. This should be fairly straight forward without any need to change any settings.

Well Hope this helps someone out there? The key is, check your source first before jumping to any conclusions, and of course do a little forum searching! :mrgreen:

Cheers
Last edited by ABhatnagar on Tue Apr 22, 2008 2:04 pm, edited 2 times in total.
ABhatnagar
Posts: 4
Joined: Mon Apr 21, 2008 2:14 pm

Re:

Post by ABhatnagar »

Dr.Pepper wrote:This is why I will not use HB, the scenes are waaaaay too dark. It's horrible, and of course I use QT to watch my movies. Frontrow and iTunes uses QT, so it's just logical.

I stick to MPEG STREAMCLIP and QT pro. The compression speed is of no important to me, and QT is just slightly slower than HB anyway.

Image
Hi...

I too noticed similar 'stuff' and as I just posted, Handbrake is doing it's job correctly. The conversion from MPEG StreamClip similar to Cinematize Pro is using QuickTime 7's H.264 encoder with a filter. This filter is what is giving you the brighter picture. If you use the built-in DVD player with the source, you will see the same dark picture as you produced using HandBrake.

The following reference, shows that QuickTime 7 is a requirement for MPEG StreamClip.
Ref: http://www.squared5.com/svideo/mpeg-streamclip-mac.html

Take care.
rhester
Veteran User
Posts: 2888
Joined: Tue Apr 18, 2006 10:24 pm

Re: dark h.264 video (only in mp4 container)

Post by rhester »

This is rather old news. HandBrake (a very, very long time ago) inserted a COLR atom for this. It stopped when we had to fall back to the old muxer, and it's never been reinserted. The value of the atom is well-documented and well-understood, it's just been a matter of time and priority. Anyone's welcome to submit a patch. :)

Rodney
ABhatnagar
Posts: 4
Joined: Mon Apr 21, 2008 2:14 pm

Re: dark h.264 video (only in mp4 container)

Post by ABhatnagar »

Hi Rodney,

Sorry I'm a bit new here and to the MAC world too. Thanks for clarifying.

Arvin
JimTV
Posts: 4
Joined: Sun Jun 15, 2008 2:50 am

Re: dark h.264 video (only in mp4 container)

Post by JimTV »

Hi.

I am new to video conversion, as I am now really getting to like my AppleTV. I want to convert all my DVDs using my new MacPro. I tried Handbrake, and I must say the quality is fantastic. Speed is great. I tried other converters (Movavi, Streamclip), but Handbrake is easily the best, with the quality even "better" than the original at times! Very impressive.

The only thing stopping me from converting everything, is the "darkness" of the video played in iTunes or AppleTV. I watch a ton of Sci-Fi, which tends to be filmed in low lighting. The only solution I found was to Hack the AppleTV (requiring removal of the hard drive) and installing the Perian codec. My friend is also getting an AppleTV, and I was hoping for a solution that does not require the hack. He already converted a ton of DVDs into video using a Windows Media Server, but it is very problematic.

I am hoping the COLR atom or something gets worked into the software soon. Any chance of that? I am hoping for a 1-click solution before I spend a month of nights going nuts with video editing!

Thanks for any info.
van
Veteran User
Posts: 417
Joined: Wed Aug 29, 2007 6:35 am

Re: dark h.264 video (only in mp4 container)

Post by van »

JimTV wrote: I am hoping the COLR atom or something gets worked into the software soon. Any chance of that? I am hoping for a 1-click solution before I spend a month of nights going nuts with video editing!
It's just waiting for testers:
http://forum.handbrake.fr/viewtopic.php?f=4&t=6352
JimTV
Posts: 4
Joined: Sun Jun 15, 2008 2:50 am

Re: dark h.264 video (only in mp4 container)

Post by JimTV »

van wrote: It's just waiting for testers:
http://forum.handbrake.fr/viewtopic.php?f=4&t=6352
Cool! I can't wait to try a beta build with it in.

Thanx Van!
JimTV
Posts: 4
Joined: Sun Jun 15, 2008 2:50 am

Re: dark h.264 video (only in mp4 container)

Post by JimTV »

BTW, I tried the .mkv procedure above by ABhatnagar on chapter 8 of "ST Voyager, Scorpion part 1"*, except you can export directly to AppleTV in QT now, and on that chapter, it worked great. But when I try to do the entire episode, it has messed up timing on the intro scene and the video is corrupted at the very beginning. I even tried AVI - and the timing was off with audio (both with 2-pass). The best quality also seems to be only available with mp4 conversions. So right now the COLR atom is our best hope!

*If you are a Star Trek fan, and you skipped Voyager, this is arguably the best story-show in all of the versions of ST. Check it out!
erise
Posts: 32
Joined: Thu Feb 21, 2008 6:07 am

Re: dark h.264 video (only in mp4 container)

Post by erise »

van wrote:
JimTV wrote: I am hoping the COLR atom or something gets worked into the software soon. Any chance of that? I am hoping for a 1-click solution before I spend a month of nights going nuts with video editing!
It's just waiting for testers:
http://forum.handbrake.fr/viewtopic.php?f=4&t=6352
Has the COLR atom make it into a HandBrake snapshot yet? I couldn't find an option to include it as of Snapshot 3. It seems that everyone else has the color darkness playback in Quicktime fixed with Perian installed, but I installed Perian 1.1.1 and Quicktime is still darker than DVD Player or VLC. The top screenshot is what my h.264 video (encoded in Snapshot 3) looks like in Quicktime (with or without Perian installed). The bottom screenshot is what it looks like in VLC (which is the same as in DVD Player). Thanks for any assistance that can be given.

Image
Image
jbrjake
Veteran User
Posts: 4805
Joined: Wed Dec 13, 2006 1:38 am

Re: dark h.264 video (only in mp4 container)

Post by jbrjake »

erise wrote:Has the COLR atom make it into a HandBrake snapshot yet?
Yes. That's why I put it on the change set in the snapshot 3 announcement:
- Better gamma in QuickTime through the use of the COLR MP4 atom
erise
Posts: 32
Joined: Thu Feb 21, 2008 6:07 am

Re: dark h.264 video (only in mp4 container)

Post by erise »

jbrjake wrote:Yes. That's why I put it on the change set in the snapshot 3 announcement:
- Better gamma in QuickTime through the use of the COLR MP4 atom
Sorry about that. I can't find whether the atom is inserted automatically to encodes in Snapshot 3. Because if it is, Quicktime is still darker than the DVD source and VLC in my MP4 encodes with Snapshot 3.
hawkman
Veteran User
Posts: 609
Joined: Sat Feb 17, 2007 9:46 pm

Re: dark h.264 video (only in mp4 container)

Post by hawkman »

Hi guys, I've been hiding.

Sorry, but I'm definitely noticing this again too. With 0.9.3, the colour is now pretty indistinguishable with/sans Perian 1.1.2; but it's consistently darker than when VLC plays the same encode. Btw, VLC's colour matches the DVD as played in DVD Player or VLC.

I guess this means the COLR atom is doing its job, but maybe it's not set correctly for the material I'm using? Encoding mainly PAL movies, if it makes any difference.

Can upload grabs if it'd be helpful.
lansharked
Posts: 6
Joined: Mon Jul 27, 2009 6:04 pm

Re: dark h.264 video (only in mp4 container)

Post by lansharked »

Hi all,

I'm a pretty non-technical user when it comes to video. I was wondering if I can get snapshot 3 or snapshot 4 already compiled, or if someone can take mercy on me and show me how to do it.

From all the posts it sounds like I need a HB build with the COLR atom, too. All of my 0.9.3 DVD rips are coming out darker than the originals.

thanks much!
TedJ
Veteran User
Posts: 5388
Joined: Wed Feb 20, 2008 11:25 pm

Re: dark h.264 video (only in mp4 container)

Post by TedJ »

nightstrm
Veteran User
Posts: 1887
Joined: Fri Mar 23, 2007 5:43 am

Re: dark h.264 video (only in mp4 container)

Post by nightstrm »

lansharked wrote:Hi all,

I'm a pretty non-technical user when it comes to video. I was wondering if I can get snapshot 3 or snapshot 4 already compiled, or if someone can take mercy on me and show me how to do it.

From all the posts it sounds like I need a HB build with the COLR atom, too. All of my 0.9.3 DVD rips are coming out darker than the originals.

thanks much!
There is already a much newer snapshot available (the posts in this thread are nearly a year old). Follow the link given in the post above for the latest one.
lansharked
Posts: 6
Joined: Mon Jul 27, 2009 6:04 pm

Re: dark h.264 video (only in mp4 container)

Post by lansharked »

thx TedJ, nightstrm for the snapshot link.

I came up with a workaround for the darkness issue I'm pretty happy with so I thought I'd share it. :idea:

I tried using ffdshow tryouts for playback video decoding (http://sourceforge.net/projects/ffdshow-tryout/) and found that it has a 'luminance level fix' feature that restores the brightness of .mp4 DVD rips compared to the DVD source (IMHO).

Cheers.
Post Reply