title: Correcting color cast with ffmpeg
body: <p>I have two videos that have a pretty significant blue cast to them. I took some stills at the same time and I'm happy enough with the colors on those and I'd like to re-encode the videos, adjusting the colors to something similar to the stills.</p>
  
  <ul>
  <li>A frame from the original video can be seen here: <a href="http://www.dotrose.com/temp/img_20180513_153484_original.png" rel="nofollow noreferrer">http://www.dotrose.com/temp/img_20180513_153484_original.png</a></li>
  <li>An attempt at correcting the color, which would be acceptable: <a href="http://www.dotrose.com/temp/img_20180513_153484_corrected.png" rel="nofollow noreferrer">http://www.dotrose.com/temp/img_20180513_153484_corrected.png</a></li>
  <li>A still image taken at the same time (but with some help from a flash): <a href="http://www.dotrose.com/temp/img_20180513_153476.jpg" rel="nofollow noreferrer">http://www.dotrose.com/temp/img_20180513_153476.jpg</a></li>
  </ul>
  
  <p>I understand I could either create a large collection of jpg images from the video and color correct them before reassembling them into a new video or I could use ffmpeg's color level's filter to do it directly. What I don't know is how to get the numbers to pass to the filter. I'm assuming I want to do something like this:</p>
  
  <pre><code>ffmpeg -i video.mov -vf "colorlevels=rimin=##/255:gimin=##/255:bimin=#/255:rimax=###/255:gimax=###/255:bimax=###/255, eq=gamma=#.##" -y out.mov
  </code></pre>
  
  <p>How do I get the values to use for each of the r, g, and b min and max settings and gamma to use in place of the ###s? Assuming this is the right approach, of course.</p>
  
  <p><strong>Update</strong>: Perhaps this question would be better asked in a forum for gimp or photoshop. But I know how to adjust the color in those. What I need to know is how I translate those changes to what ffmpeg is expecting.</p>