using colr atom to fix quicktime's H.264 gamma?

Random chit-chat and anything that doesn't belong elsewhere
Post Reply
refulgentis
Bright Spark User
Posts: 342
Joined: Mon Apr 14, 2008 5:08 am

using colr atom to fix quicktime's H.264 gamma?

Post by refulgentis »

Hi all,
I recently reverted my quicktime install (removing perian), and realized how bad Quicktime's H.264 gamma handling is. Rather than tie myself into one solution that isn't a solution (reinstalling Perian which will shift the gamma, which will only work on my Mac), I'd rather add the colr atom that Handbrake/Visual Hub used to have, using the ffmpeg muxer to add it.

Unfortunately, I have absolutely no clue how to do this. Is there a patch to ffmpeg I can add to do it, and recopy the video and audio tracks over so that the media remains intact while the color atom is added? Or can I just use Dumpster to add/change an atom somewhere? Would Lostify do it?

Here's the most complete message (from the VisualHub author) I've seen on the topic so for: http://groups.google.com/group/perian-d ... e7549583de.

I know there's been a few threads on this already, but all of them seem to be users just asking Handbrake to do it for them. I want it do it myself with ffmpeg.

Thanks for your time!
realityking
Veteran User
Posts: 680
Joined: Tue Apr 24, 2007 12:36 pm

Re: using colr atom to fix quicktime's H.264 gamma?

Post by realityking »

ffmpeg would be the wrong place since HandBrake doesn't use ffmpegs mp4 muxer, instead it uses libmp4v2 from the mpeg4ip project.
refulgentis
Bright Spark User
Posts: 342
Joined: Mon Apr 14, 2008 5:08 am

Re: using colr atom to fix quicktime's H.264 gamma?

Post by refulgentis »

realityking wrote:ffmpeg would be the wrong place since HandBrake doesn't use ffmpegs mp4 muxer, instead it uses libmp4v2 from the mpeg4ip project.
I know, that's why Handbrake can't do it anymore. When it used ffmpeg, it could, so I'm hoping some of the people here who used it then could help.
jbrjake
Veteran User
Posts: 4805
Joined: Wed Dec 13, 2006 1:38 am

Re: using colr atom to fix quicktime's H.264 gamma?

Post by jbrjake »

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

Re: using colr atom to fix quicktime's H.264 gamma?

Post by rhester »

I took a look at this, and it doesn't look difficult, just tedious and time-consuming...and unfortunately life gets in the way of availability. :/ The patch jbrjake linked to is all that a developer should need to know to make this work (really).

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

Re: using colr atom to fix quicktime's H.264 gamma?

Post by jbrjake »

rhester wrote:The patch jbrjake linked to is all that a developer should need to know to make this work (really).
Yep, but it seems to be cursed. Every time I try to interest a developer in porting it to libmp4v2, they disappear ;p
refulgentis
Bright Spark User
Posts: 342
Joined: Mon Apr 14, 2008 5:08 am

Re: using colr atom to fix quicktime's H.264 gamma?

Post by refulgentis »

awesome, thanks. i'll give it a shot later
EDIT: works like a charm on svn ffmpeg. i didn't actually patch though, just dropped in the code in the right places, since the patch was on ffmpeg as of two years ago. if you want to do this without reencoding, you can just use ffmpeg (inputfilename).mp4 -acodec copy -vcodec copy (output file name).mp4.

I'm excited, once Apple TV supports soft subtitles and we can mux AC3 to an MP4 freely (or I figure out how to get a downmix to Dolby ProLogic II), or Front Row renders soft subtitles (or doesn't render any) properly, there will be a complete Mac media center solution with no holes.
Post Reply