[FFmpeg-user] Fluorescent White Balance Video Filters
Roger
rogerx.oss at gmail.com
Wed Apr 27 21:46:14 EEST 2022
> On Wed, Apr 20, 2022 at 07:35:22AM +0200, Michael Koch wrote:
>
>You can make your own LUT, as described in chapter 2.28 in my book.
>-- Extract one frame from your video.
>-- Insert a haldclut in a corner of the image, or use xstack to attach it to
>the side.
>-- Use the program of your choice to correct the colors in this image. When
>done, save it lossless as 16-bit PNG.
>-- Use FFmpeg to separate the haldclut from the image.
>-- Apply the LUT to the whole video.
>
>Michael
Chapter 2.27, p59;
Step 3) "The extracted image is opened in GIMP." (eg. image.png?)
Should mention the file name, else the reader has to turn back a page, eg.
image.png?
What if the video is interlaced, the extracted image will be interlaced!
Step 4) "The color table will be opened in GIMP, selected with "Select all" and
copied with ctrl-c."
I would imagine this color table is clut.png from Step 2?
"Select All" and "CTRL-C" is very ambiguous! For me, this does nothing.
Oh, now I see, instructions should read, "From within Gimp, open both,
image.png and clut.png images"; Right click on the clut.png Gimp tab, click
"Edit Select all" and then click "Edit > Copy". Pasting the clut.png image
into my extracted image of the Gimp image.png tab. Subsequently, I noticed the
extracted image.png image is 640x480 and the 512x512, covering almost the
entire extract image from the 640x480 video.
As far as the Windows' batch file syntax instead of using generic scripting, I
have my "Windows Batch file to Unix/Linux Script file" glasses on. Straining
one eye to the sky while holding my foot also seems to help!
Here's how many other books' format commands rather than inhibiting Windows or
Unix/Linux formats:
To extract frame 51.47 from 20220421_163910.mp4 video, saving to image.png
file:
$ ffmpeg -ss 51.47 -i 20220421_163910.mp4 -frames 1 -y image.png
Generate an identity Hald CLUT stream with eight levels:
$ ffmpeg -f lavfi -i haldclutsrc=8 -frames 1 -pix_fmt rgb48be clut.png
Chapter 2.28 p61;
Rather than, "The above workflow can be simplified as follows:", use "Chapter
2.27 can be condensed into a one line FFmpeg incanatation: ..."?
Instead of "Step 2: This image is now processed in GIMP", use "Step 2: Now open
the Image_with_CLUT.png within Gimp ... "
" .. then exported with the same file name as 16-bit
PNG ... "? This is another point of confusion. Most readers are expecting a
suffixed file name such as "image_with_clut-edited.png" (regardless of case),
as using the same filename lacks clear separation of performed tasks. For
example, most experienced users will try performing each scripted task without
reading the instructions.
I think I got this now, in lamens terms, just start at Chapter 2.28 when
creating a modified CLUT, as you initially stated.
I prefer, and is likely one of the most popular edits/modifications nowadays,
is automatic white balance or a specific white balance correction, and secondly
likely most popular/importance option is correcting age color fading,
brightness, etc.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-user/attachments/20220427/632d019e/attachment.sig>
More information about the ffmpeg-user
mailing list