Author Topic: Colors are not preserved after exporting tif's > video  (Read 4005 times)

pavelpp

  • Freshman
  • **
  • Posts: 92
Colors are not preserved after exporting tif's > video
« on: June 26, 2013, 05:29:57 PM »
I tried ProRes and x264 via ffmpeg, but still can't get the same colors I see on tif files I processed with Lightroom. Any ideas, why? It's as if resulting video lacks saturation or warmth.


Hazer

  • Freshman
  • **
  • Posts: 56
Re: Colors are not preserved after exporting tif's > video
« Reply #1 on: June 26, 2013, 05:47:59 PM »
Yes -- this is an issue with ffmpeg.  I haven't tested After Effects, but Apple's Motion and FCPX reliably preserve the color of the original .tif images.  See my comments here:

http://www.magiclantern.fm/forum/index.php?topic=6276.msg49963#msg49963

pavelpp

  • Freshman
  • **
  • Posts: 92
Re: Colors are not preserved after exporting tif's > video
« Reply #2 on: June 26, 2013, 08:30:42 PM »
I'd like to avoid buying more programs than I already have.

Yoshiyuki Blade

  • Member
  • ***
  • Posts: 103
  • 5D2
Re: Colors are not preserved after exporting tif's > video
« Reply #3 on: June 26, 2013, 09:33:25 PM »
I generally convert the RGB frames to the Rec. 709 Reference Display profile (http://www.color.org/rec709.xalter), import it to RGB24 video using Avisynth and finally convert it to the YV12 (4:2:0) space with Rec. 709 coefficients. For x264 encoding, you have to set a few flags to "bt709" for proper playback.

The most accurate colors I was able to reproduce (images look almost like they do in a color managed app like photoshop) was by using the MPC-HC video player with color management enabled and gamma set to 2.4. The gamma thing may be explained here: http://en.wikipedia.org/wiki/Rec._709#Transfer_characteristics

BTW, this was all guesswork and I have no clue if it's the right way to do things.

deleted.account

  • Member
  • ***
  • Posts: 154
Re: Colors are not preserved after exporting tif's > video
« Reply #4 on: June 28, 2013, 07:03:42 AM »
Image preview will assume sRGB gamma of approx 2.2 and images really should be 'handled', processed and stored in that way, rather than rec709 display profile which is video space realm unless working in a color managed chain ie: as photoshop reference above. But it can lead to confusion.

Throwing rec709 gamma'd imagery into the mix and encoder can lead to mishandling and result in off colors and contrast.

There's no issue with ffmpeg's Prores that I have seen, ffmpeg uses BT601 luma coefficients for prores not rec709 if that assignment gets lost in processing or flagged incorrectly at encode and actually acted on in the player, re: MPC mention above then color and contrast will be off.

As avisynth is not interested or color managed we need to take care what we put in is same as we flag at encode. ffmpeg prores to x264 I'd suggest transferring the matrix in avisynth and see if that helps.

Or if encoding to x264 without use of avisynth ensure correct input 'color space' info is chosen.

Personally I wouldn't judge or assume anything Apple QT based products produce as being any way correct, especially if on pre Mountain Lion. Color management at OS level is dodgy prior to that. :-)

And be careful when dealing with processing in the chain that isn't color managed or ignores color matrix declarations and instead bases that choice on the fallback of color matrix by resolution. ie: BT601 being assumed for below HD res ie: 1280x720P and BT709 for HD resolutions. For example handling 550D / T2i 1152x482 image frames might result in an encoder / player assuming BT601 color matrix to the processing.