Re: [FFmpeg-user] Fluorescent White Balance Video Filters

2022-04-27 Thread Michael Koch

Am 27.04.2022 um 21:52 schrieb Roger:

Chapter 2.28 uses filter_complex without white spaces or colons?

$ ffmpeg -i 20220421_163910-meet.mp4 -i image_with_clut-meet-edited-clut.png 
-filter_complex [0]eq=brightness=0.06[a];[a][1]haldclut -y 
20220421_163910-meet-edited.mp4

Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '20220421_163910-meet.mp4':
...
Filter eq has an unconnected output
bash: [a][1]haldclut: command not found


My example is for Windows batch file. I think (but I'm not sure) that in 
Linux you must encapsulate the whole filtergraph in " " double quotes:


ffmpeg -i 20220421_163910-meet.mp4 -i image_with_clut-meet-edited-clut.png 
-filter_complex "[0]eq=brightness=0.06[a];[a][1]haldclut" -y 
20220421_163910-meet-edited.mp4

Michael

___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-user] Fluorescent White Balance Video Filters

2022-04-27 Thread Michael Koch

Am 27.04.2022 um 20:46 schrieb Roger:

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



What if the video is interlaced, the extracted image will be interlaced!


I don't know. I did never work with interlaced videos in FFmpeg.



I think I got this now, in lamens terms, just start at Chapter 2.28 when
creating a modified CLUT, as you initially stated.


That's right. Just start with chapter 2.28 because it's easier.

Michael

___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-user] Fluorescent White Balance Video Filters

2022-04-27 Thread Roger

Chapter 2.28 uses filter_complex without white spaces or colons?

$ ffmpeg -i 20220421_163910-meet.mp4 -i image_with_clut-meet-edited-clut.png 
-filter_complex [0]eq=brightness=0.06[a];[a][1]haldclut -y 
20220421_163910-meet-edited.mp4

Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '20220421_163910-meet.mp4': 

   
...
Filter eq has an unconnected output 

   
bash: [a][1]haldclut: command not found



Notice, "haldclut command not found"

Including white space for filter_complex:

$ ffmpeg -i 20220421_163910-meet.mp4 -i image_with_clut-meet-edited-clut.png 
-filter_complex '[0]eq=brightness=0.06 [a];[a] [1] haldclut' -y 20220421_1
63910-meet-edited.mp4

man ffmpeg-filters

Looks like you syntax omits the single quotes around the filter_complex option 
AND has missing white spaces and/or colons.

Not sure if "[a];[a]" should have white spaces.



For sake of simplicity, here's what I have:

/* OWN MODIFIED LUT OR WHITE BALANCE FILTER */

Snip or extract portion of video requiring white balance, color or brightness 
corrections.
$ ffmpeg -ss 590 -i 20220421_163910.mp4 -t 867 -codec copy 
20220421_163910-meet.mp4

Frame of (VHS) video requiring white balance or color/brightness correction, 
creating a CLUT embedded extracted image:
This is frame at "11:00" for this specific video

$ ffmpeg -ss 11:00 -i 20220421_163910.mp4 -f lavfi -i haldclutsrc=8 
-filter_complex 
"[1]format=pix_fmts=rgb48be[a];[a][0]xstack=inputs=2:layout=0_0|w0_0" -frames 1 
-y image_with_clut-meet.png

Open image_with_clut-meet.png within Gimp, edit Color > Color Temperature 
and/or Color > Levels > Output Levels, export as "16bpc RGB" 
image_with_clut-meet-edited.png.

Crop the CLUT (512:512) from the Gimp exported image.
$ ffmpeg -i image_with_clut-meet-edited.png -vf crop=512:512:0:0 -y 
image_with_clut-meet-edited-clut.png

Apply the resulting CLUT using FFmpeg's filter_complex.
TIP: Use acodec copy as this is only modifying the video stream.
TODO: Brightness reduction for color retention?
TODO: Added white space to filter_complex, likely could also use colons, but 
white spacing is better for readability.

$ ffmpeg -i 20220421_163910-meet.mp4 -i image_with_clut-meet-edited-clut.png 
-filter_complex '[0]eq=brightness=0.06 [a];[a] [1] haldclut' -y 
20220421_163910-meet-edited.mp4



signature.asc
Description: PGP signature
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-user] Fluorescent White Balance Video Filters

2022-04-27 Thread Paul B Mahol
On Tue, Apr 19, 2022 at 8:41 PM Carl Zwanzig  wrote:

> On 4/19/2022 11:37 AM, Paul B Mahol wrote:
> > colorcorrect filter operates in YUV colorspace and not RGB colorspace
> > So green tint can be adjusted with it.
>
> How would you do that when there are only parameters for R and B?
>
>
You seem to know very little about video and ffmpeg in general.

certain chroma blue and chroma red combinations can give green tint.

But I will refrain from helping aggressive users that like to name call
ffmpeg and ffmpeg developers stupid.


z!
> ___
> ffmpeg-user mailing list
> ffmpeg-user@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
>
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-user] Fluorescent White Balance Video Filters

2022-04-27 Thread Roger
> 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.



signature.asc
Description: PGP signature
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-user] Fluorescent White Balance Video Filters

2022-04-21 Thread Michael Koch

Am 21.04.2022 um 04:25 schrieb Roger:

...

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

Sorry.  I had a little difficulty with understanding the text within the
Chapter 2.28.  Just couldn't scan and understand easily.  Although I thoroughly
understand SH/Bash, the variable assignments for simple filenames also slowed
reading, as I had to scan/reference back to the top of the page for the
definition/intent of the variable used.  Easier understanding for the reader to
read, "input_video.ext" and "output_video.ext", or use a similar named variable
such as $_input_video.ext and $_output_video.ext. Note: using a prefixed
underscore within SH/Bash variables separates/isolates from any possible
conflicts.  Heard of using this syntax from the Bash mailing list when doing C
style defines in SH/Bash.  However, for the sake of easy readability for
readers, it's probably best to use simple non-isolated variables.


My examples are for Windows batch files. For example, the line

set "IN=P100.mov"

sets the variable IN to the value P100.mov

If this variable is used in the command line, for example

ffmpeg -i %IN% -vf crop=...

then %IN% will be replaced by the filename, so that the command line for 
ffmpeg becomes


ffmpeg -i P100.mov -vf crop=...

Michael

___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-user] Fluorescent White Balance Video Filters

2022-04-20 Thread Roger
>> Found through Google,
>> https://lutify.me/free-white-balance-correction-luts-for-everyone/
>> Download: Free White Balance Correction LUTs
>> Lutify-me-Free-White-Balance-Correction-3D-LUTs.zip
>> 
>> 2800 Kelvin - 3200 Kelvin - 0.34 CTO.cube
>> 2800 Kelvin - 4300 Kelvin - 0.95 CTO.cube
>> 2800 Kelvin - 5500 Kelvin - 1.34 CTO.cube
>> 2800 Kelvin - 6500 Kelvin - 1.56 CTO.cube
>> 3200 Kelvin - 2800 Kelvin - 0.34 CTB.cube
>> 3200 Kelvin - 4300 Kelvin - 0.61 CTO.cube
>> 3200 Kelvin - 5500 Kelvin - 1.00 CTO.cube
>> 3200 Kelvin - 6500 Kelvin - 1.21 CTO.cube
>> 4300 Kelvin - 2800 Kelvin - 0.95 CTB.cube
>> 4300 Kelvin - 3200 Kelvin - 0.61 CTB.cube
>> 4300 Kelvin - 5500 Kelvin - 0.39 CTO.cube
>> 4300 Kelvin - 6500 Kelvin - 0.60 CTO.cube
>> 5500 Kelvin - 2800 Kelvin - 1.34 CTB.cube
>> 5500 Kelvin - 3200 Kelvin - 1.00 CTB.cube
>> 5500 Kelvin - 4300 Kelvin - 0.39 CTB.cube
>> 5500 Kelvin - 6500 Kelvin - 0.21 CTO.cube
>> 6500 Kelvin - 2800 Kelvin - 1.56 CTB.cube
>> 6500 Kelvin - 3200 Kelvin - 1.21 CTB.cube
>> 6500 Kelvin - 4300 Kelvin - 0.60 CTB.cube
>> 6500 Kelvin - 5500 Kelvin - 0.21 CTB.cube
...
>> Are these LUTS my best options?  Or does the paid subscription offer better?
>> Or are there other white balance/color correcting LUTS elsewhere?
>

Think I figured-out, the previously listed kelvin cube files above, seem to be 
a compilation of gradual generic tint lut/cube files.

>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

Sorry.  I had a little difficulty with understanding the text within the 
Chapter 2.28.  Just couldn't scan and understand easily.  Although I thoroughly 
understand SH/Bash, the variable assignments for simple filenames also slowed 
reading, as I had to scan/reference back to the top of the page for the 
definition/intent of the variable used.  Easier understanding for the reader to 
read, "input_video.ext" and "output_video.ext", or use a similar named variable 
such as $_input_video.ext and $_output_video.ext. Note: using a prefixed 
underscore within SH/Bash variables separates/isolates from any possible 
conflicts.  Heard of using this syntax from the Bash mailing list when doing C 
style defines in SH/Bash.  However, for the sake of easy readability for 
readers, it's probably best to use simple non-isolated variables.

Some of the terminology used at this chapter is above my head, but I've been 
looking to do something exactly as you described when using my Nikon D5600 when 
taking raw photos and attaining similar results to it's Capture NX-D/Studio.

I've flagged this Email and will hopefully return to it when I get more free 
time.  I waste a full day on these larger tasks, especially on first time 
workflows.

Don't worry, I did figure-out how to apply LUTS, either from the chapter or 
from additional Google searching for ffmpeg Stack Exchange examples, etc.

Roger

___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-user] Fluorescent White Balance Video Filters

2022-04-19 Thread Michael Koch

Am 19.04.2022 um 23:06 schrieb Roger:

On Tue, Apr 19, 2022 at 08:25:17PM +0200, Michael Koch wrote:
Am 19.04.2022 um 03:34 schrieb Roger:

I'm not finding much about fixing video having incorrect white space, more
specifically video with incorrect or forgotten fluorescent white balance
setting during recording.

...

Question, what is the proper method of applying such a missing white balance
fluorescent filter to a video file using ffmpeg?

I would do that with a color-look-up-table. The procedure is described
step-by-step in chapter 2.27 and an easier simplified version is described in
chapter 2.28 in my book:
http://www.astro-electronic.de/FFmpeg_Book.pdf

Michael

No stranger to these color tables for correction white balance, as my Nikon
DSLR and likely most recent DLSR cameras use some correcting color profiles
these days!

However, seems there's few options for video files.

Found through Google,
https://lutify.me/free-white-balance-correction-luts-for-everyone/
Download: Free White Balance Correction LUTs
Lutify-me-Free-White-Balance-Correction-3D-LUTs.zip

2800 Kelvin - 3200 Kelvin - 0.34 CTO.cube
2800 Kelvin - 4300 Kelvin - 0.95 CTO.cube
2800 Kelvin - 5500 Kelvin - 1.34 CTO.cube
2800 Kelvin - 6500 Kelvin - 1.56 CTO.cube
3200 Kelvin - 2800 Kelvin - 0.34 CTB.cube
3200 Kelvin - 4300 Kelvin - 0.61 CTO.cube
3200 Kelvin - 5500 Kelvin - 1.00 CTO.cube
3200 Kelvin - 6500 Kelvin - 1.21 CTO.cube
4300 Kelvin - 2800 Kelvin - 0.95 CTB.cube
4300 Kelvin - 3200 Kelvin - 0.61 CTB.cube
4300 Kelvin - 5500 Kelvin - 0.39 CTO.cube
4300 Kelvin - 6500 Kelvin - 0.60 CTO.cube
5500 Kelvin - 2800 Kelvin - 1.34 CTB.cube
5500 Kelvin - 3200 Kelvin - 1.00 CTB.cube
5500 Kelvin - 4300 Kelvin - 0.39 CTB.cube
5500 Kelvin - 6500 Kelvin - 0.21 CTO.cube
6500 Kelvin - 2800 Kelvin - 1.56 CTB.cube
6500 Kelvin - 3200 Kelvin - 1.21 CTB.cube
6500 Kelvin - 4300 Kelvin - 0.60 CTB.cube
6500 Kelvin - 5500 Kelvin - 0.21 CTB.cube

Yea, horrendously named file names!

$ ffmpeg -i 3.avi -vf lut3d=/tmp/lut/Lutify.me\ Free\ White\ Balance\ 
Correction\ 3D\ LUTs/3D\ LUTs/6500\ Kelvin\ -\ 5500\ Kelvin\ -\ 0.21\ CTB.cube 
-crf 27 -preset veryfast -c:a copy test2.mp


On my second try, tried "6500 Kelvin - 5500 Kelvin - 0.21" and this is very 
close to RawTherapee's Philips TL85 fluorescent white balance setting results, if not 
better than RawTherapee!  Still not absolutely perfect likely more due to VHS tape 
degradation or re-recorded degradation, as this section/sesesion of the VHS tape was a 
recording of a recording of a recording during the 1990's.

For reference for those wondering how I digitized without a time correcting 
device, I used ffmpeg on the compressed original video captures to augment the 
video/audio sync problem and was trial and error.  Subsequently using the yadif 
deinterlace filter and specifying the double pass option.
  -filter:v "setpts=0.8015*PTS",yadif=1

Are these LUTS my best options?  Or does the paid subscription offer better?
Or are there other white balance/color correcting LUTS elsewhere?


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
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-user] Fluorescent White Balance Video Filters

2022-04-19 Thread Carl Zwanzig

On 4/19/2022 2:06 PM, Roger wrote:

5500 Kelvin - 6500 Kelvin - 0.21 CTO.cube
6500 Kelvin - 2800 Kelvin - 1.56 CTB.cube
6500 Kelvin - 5500 Kelvin - 0.21 CTB.cube

Yea, horrendously named file names!


Not bad, actually :)

Harkens back to photography and motion pictures-
Color Temperature Blue (CTB) and Color Temperature Orange (CTO) gels were 
used to correct lights of one type to the 'color' of another and the number 
is the amount of correction*. Have a couple of tungsten desk lights in a 
scene with a bunch of windows? Wrap the bulbs with some CTB! (Or cover the 
windows with CTO, both of which come in 50' x 48" rolls and smaller sheets.) 
At one time, Rosco even made colored tubes for T-12 florescent lamps (about 
a 1/2 CTO IIRC).


*based on 3200 <-> 5500 kelvin

Later,

z!

___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-user] Fluorescent White Balance Video Filters

2022-04-19 Thread Roger
> On Tue, Apr 19, 2022 at 06:32:39PM +, Carl Zwanzig wrote:
>On 4/19/2022 11:07 AM, Roger wrote:
>> I noticed the colorcorrect filter, for use with augmenting the Red and Blue
>> channels.
>
>Touching on that- in most video systems green is the fixed* level and R/B are
>adjusted to that. Makes sense that ffmpeg does the same.
>
>*not separately adjustable
>
>z!

Ah!  That makes sense as I was manually playing with RGB linear values, and 
noticed a pattern.

___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-user] Fluorescent White Balance Video Filters

2022-04-19 Thread Roger
> On Tue, Apr 19, 2022 at 08:25:17PM +0200, Michael Koch wrote:
>Am 19.04.2022 um 03:34 schrieb Roger:
>> I'm not finding much about fixing video having incorrect white space, more
>> specifically video with incorrect or forgotten fluorescent white balance
>> setting during recording.
...
>> 
>> Question, what is the proper method of applying such a missing white balance
>> fluorescent filter to a video file using ffmpeg?
>
>I would do that with a color-look-up-table. The procedure is described
>step-by-step in chapter 2.27 and an easier simplified version is described in
>chapter 2.28 in my book:
>http://www.astro-electronic.de/FFmpeg_Book.pdf
>
>Michael

No stranger to these color tables for correction white balance, as my Nikon 
DSLR and likely most recent DLSR cameras use some correcting color profiles 
these days!

However, seems there's few options for video files.

Found through Google,
https://lutify.me/free-white-balance-correction-luts-for-everyone/
Download: Free White Balance Correction LUTs
Lutify-me-Free-White-Balance-Correction-3D-LUTs.zip

2800 Kelvin - 3200 Kelvin - 0.34 CTO.cube
2800 Kelvin - 4300 Kelvin - 0.95 CTO.cube
2800 Kelvin - 5500 Kelvin - 1.34 CTO.cube
2800 Kelvin - 6500 Kelvin - 1.56 CTO.cube
3200 Kelvin - 2800 Kelvin - 0.34 CTB.cube
3200 Kelvin - 4300 Kelvin - 0.61 CTO.cube
3200 Kelvin - 5500 Kelvin - 1.00 CTO.cube
3200 Kelvin - 6500 Kelvin - 1.21 CTO.cube
4300 Kelvin - 2800 Kelvin - 0.95 CTB.cube
4300 Kelvin - 3200 Kelvin - 0.61 CTB.cube
4300 Kelvin - 5500 Kelvin - 0.39 CTO.cube
4300 Kelvin - 6500 Kelvin - 0.60 CTO.cube
5500 Kelvin - 2800 Kelvin - 1.34 CTB.cube
5500 Kelvin - 3200 Kelvin - 1.00 CTB.cube
5500 Kelvin - 4300 Kelvin - 0.39 CTB.cube
5500 Kelvin - 6500 Kelvin - 0.21 CTO.cube
6500 Kelvin - 2800 Kelvin - 1.56 CTB.cube
6500 Kelvin - 3200 Kelvin - 1.21 CTB.cube
6500 Kelvin - 4300 Kelvin - 0.60 CTB.cube
6500 Kelvin - 5500 Kelvin - 0.21 CTB.cube

Yea, horrendously named file names!

$ ffmpeg -i 3.avi -vf lut3d=/tmp/lut/Lutify.me\ Free\ White\ Balance\ 
Correction\ 3D\ LUTs/3D\ LUTs/6500\ Kelvin\ -\ 5500\ Kelvin\ -\ 0.21\ CTB.cube 
-crf 27 -preset veryfast -c:a copy test2.mp


On my second try, tried "6500 Kelvin - 5500 Kelvin - 0.21" and this is very 
close to RawTherapee's Philips TL85 fluorescent white balance setting results, 
if not better than RawTherapee!  Still not absolutely perfect likely more due 
to VHS tape degradation or re-recorded degradation, as this section/sesesion of 
the VHS tape was a recording of a recording of a recording during the 1990's.

For reference for those wondering how I digitized without a time correcting 
device, I used ffmpeg on the compressed original video captures to augment the 
video/audio sync problem and was trial and error.  Subsequently using the yadif 
deinterlace filter and specifying the double pass option.
 -filter:v "setpts=0.8015*PTS",yadif=1

Are these LUTS my best options?  Or does the paid subscription offer better?  
Or are there other white balance/color correcting LUTS elsewhere?


___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-user] Fluorescent White Balance Video Filters

2022-04-19 Thread Carl Zwanzig

On 4/19/2022 12:08 PM, Bouke / edit 'B wrote:

Could be I’m missing the point, but cutting / extending two legs of a
three legged chair will close to NEVER make the desired height.Agreed, but...



But yes, it will level it if needed, to stick to the reference.
And that's the point of color/white-balance correction; if the overall 
levels are wrong, it's a different adjustment.


I'm missing out on the ‘analog’ reference. 
Going back to analog video production systems but carried through to modern 
ones- green is not independently adjustable. The controls on a camera 
control will be black level, white level (usually controls the lens iris), 
sc (color) & horiz. phase, then blue and red min/max. No twiddles just for 
green.


One of the true tests of a broadcast engineer was doing outdoor sports and 
getting all the cameras to show the grass as the color/intensity and the 
uniforms to look good. Add shifting sunlight and they have a lot of work ahead.


Later,

z!
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-user] Fluorescent White Balance Video Filters

2022-04-19 Thread Bouke / edit 'B
On 19 Apr 2022, at 20:44, Jim DeLaHunt  wrote:
> 
> Not that the FFmpeg tool is stupid overall — it is quite capable and useful 
> in many ways. But there are aspects of the tool, and its documentation, and 
> its contributors' behaviour, and the project culture, which are indeed quite 
> stupid.

Hear hear!

Now, IMHO, audio mapping in FFmpeg is plain stupid. FFMBC’s approach what so 
much easier / better.
(On top of that, ripping just sound from an AV file with FFMBC was WAY faster, 
as FFMBC was able to ignore the video data, where FFmpeg seems to feel a need 
to plough trough it.)

Bouke

___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-user] Fluorescent White Balance Video Filters

2022-04-19 Thread Bouke / edit 'B

> On 19 Apr 2022, at 21:00, Carl Zwanzig  wrote:
> 
> On 4/19/2022 11:52 AM, Bouke / edit 'B wrote:
>>> How would you do that when there are only parameters for R and B?
> 
>> AFAIK, YUV = R-Y B-Y, so it’s just math.
>> Doing corrections in RGB is simpler for a mortal,
> 
> and in analog :)
> 
> What I'm getting at is there are no green terms on that filter's controls so 
> I don't see a way to directly adjust green (my point). This makes sense for a 
> filter that's trying to correct what we call white balance- like a 
> three-legged stool, you only ever have to adjust two legs to make the top 
> level.
> 
Could be I’m missing the point, but cutting / extending two legs of a three 
legged chair will close to NEVER make the desired height.
But yes, it will level it if needed, to stick to the reference.

I'm missing out on the ‘analog’ reference. AFAIK, YUV is still in use in 
(digital) codecs.
And it’s hard to grasp if you do color correction, and are used to fancy tools 
like Resolve. (That used to be a 100.000+ tool not so long ago.)

Bouke



___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-user] Fluorescent White Balance Video Filters

2022-04-19 Thread Carl Zwanzig

On 4/19/2022 11:52 AM, Bouke / edit 'B wrote:

How would you do that when there are only parameters for R and B?



AFAIK, YUV = R-Y B-Y, so it’s just math.
Doing corrections in RGB is simpler for a mortal,


and in analog :)

What I'm getting at is there are no green terms on that filter's controls so 
I don't see a way to directly adjust green (my point). This makes sense for 
a filter that's trying to correct what we call white balance- like a 
three-legged stool, you only ever have to adjust two legs to make the top level.


Later,

z!
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-user] Fluorescent White Balance Video Filters

2022-04-19 Thread Bouke / edit 'B


> On 19 Apr 2022, at 20:41, Carl Zwanzig  wrote:
> 
> On 4/19/2022 11:37 AM, Paul B Mahol wrote:
>> colorcorrect filter operates in YUV colorspace and not RGB colorspace
>> So green tint can be adjusted with it.
> 
> How would you do that when there are only parameters for R and B?
> 
> z!

AFAIK, YUV = R-Y B-Y, so it’s just math.
Doing corrections in RGB is simpler for a mortal, but should / could result 
exactly the same. Now, let someone write something to convert the matrix to 
support RGB.

Bouke

___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-user] Fluorescent White Balance Video Filters

2022-04-19 Thread Michael Koch

Am 19.04.2022 um 20:44 schrieb Jim DeLaHunt:


On 2022-04-19 11:38, Paul B Mahol wrote:
On Tue, Apr 19, 2022 at 8:25 PM Michael 
Koch

wrote:

I would do that with a color-look-up-table. The procedure is described
step-by-step in chapter 2.27 and an easier simplified version is
described in chapter 2.28 in my book:
http://www.astro-electronic.de/FFmpeg_Book.pdf


Your book multiple times calls multiple functionality in FFmpeg stupid.


Paul,

You say that as if it were a bad thing.

I have not read Micheal's FFmpeg Book, so I don't know what you are 
referring to. But I would like to know. Would you care to cite the 
specific places where the book calls FFmpeg stupid?


Having not read the passages, I cannot be sure. But my initial 
impression is that this might be accurate description. Not that the 
FFmpeg tool is stupid overall — it is quite capable and useful in many 
ways. But there are aspects of the tool, and its documentation, and 
its contributors' behaviour, and the project culture, which are indeed 
quite stupid. This is useful for users new to FFmpeg to know. If the 
book describes these aspects accurately as stupid, that makes it a 
better book.



Jim,

if you search in the book for the word "stupid" you will find two 
instances, which both refer to the same thing.


Michael

___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-user] Fluorescent White Balance Video Filters

2022-04-19 Thread Jim DeLaHunt


On 2022-04-19 11:38, Paul B Mahol wrote:

On Tue, Apr 19, 2022 at 8:25 PM Michael Koch
wrote:

I would do that with a color-look-up-table. The procedure is described
step-by-step in chapter 2.27 and an easier simplified version is
described in chapter 2.28 in my book:
http://www.astro-electronic.de/FFmpeg_Book.pdf


Your book multiple times calls multiple functionality in FFmpeg stupid.


Paul,

You say that as if it were a bad thing.

I have not read Micheal's FFmpeg Book, so I don't know what you are 
referring to. But I would like to know. Would you care to cite the 
specific places where the book calls FFmpeg stupid?


Having not read the passages, I cannot be sure. But my initial 
impression is that this might be accurate description. Not that the 
FFmpeg tool is stupid overall — it is quite capable and useful in many 
ways. But there are aspects of the tool, and its documentation, and its 
contributors' behaviour, and the project culture, which are indeed quite 
stupid. This is useful for users new to FFmpeg to know. If the book 
describes these aspects accurately as stupid, that makes it a better book.


Best regards,
 —Jim DeLaHunt

___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-user] Fluorescent White Balance Video Filters

2022-04-19 Thread Michael Koch

Am 19.04.2022 um 20:38 schrieb Paul B Mahol:

On Tue, Apr 19, 2022 at 8:25 PM Michael Koch 
wrote:


Am 19.04.2022 um 03:34 schrieb Roger:

I'm not finding much about fixing video having incorrect white space,

more

specifically video with incorrect or forgotten fluorescent white balance
setting during recording.

I have a very old VHS recorded tape without a fluorescent white balance
applied, and as such a green mask throughout the video.

I started examing one frame of the video, luckily having distinct red,

white,

blue colors and was viewing the frame within RawTherapee and tinkering

with

white balance settings.  Low and behold, after applying the "Philips TL85
fluorescent" (designated as "F10 - Philips TL85") white balance preset

profile,

the red/green/blue values all appeared exact!

However, I cannot find this preset profile within RawTherapee installed

files,

nor do the *.pp3 sidecar files indicate specific values, hinting the

values are

either hard-coded or further buried within the installed system files,

for

which fgrep insensitive searching still fails to find the specifics of

this

filter.

Question, what is the proper method of applying such a missing white

balance

fluorescent filter to a video file using ffmpeg?

I would do that with a color-look-up-table. The procedure is described
step-by-step in chapter 2.27 and an easier simplified version is
described in chapter 2.28 in my book:
http://www.astro-electronic.de/FFmpeg_Book.pdf



Your book multiple times calls multiple functionality in FFmpeg stupid.


Not multiple functionality. Only one thing is called stupid.

Michael

___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-user] Fluorescent White Balance Video Filters

2022-04-19 Thread Carl Zwanzig

On 4/19/2022 11:37 AM, Paul B Mahol wrote:

colorcorrect filter operates in YUV colorspace and not RGB colorspace
So green tint can be adjusted with it.


How would you do that when there are only parameters for R and B?

z!
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-user] Fluorescent White Balance Video Filters

2022-04-19 Thread Paul B Mahol
On Tue, Apr 19, 2022 at 8:25 PM Michael Koch 
wrote:

> Am 19.04.2022 um 03:34 schrieb Roger:
> > I'm not finding much about fixing video having incorrect white space,
> more
> > specifically video with incorrect or forgotten fluorescent white balance
> > setting during recording.
> >
> > I have a very old VHS recorded tape without a fluorescent white balance
> > applied, and as such a green mask throughout the video.
> >
> > I started examing one frame of the video, luckily having distinct red,
> white,
> > blue colors and was viewing the frame within RawTherapee and tinkering
> with
> > white balance settings.  Low and behold, after applying the "Philips TL85
> > fluorescent" (designated as "F10 - Philips TL85") white balance preset
> profile,
> > the red/green/blue values all appeared exact!
> >
> > However, I cannot find this preset profile within RawTherapee installed
> files,
> > nor do the *.pp3 sidecar files indicate specific values, hinting the
> values are
> > either hard-coded or further buried within the installed system files,
> for
> > which fgrep insensitive searching still fails to find the specifics of
> this
> > filter.
> >
> > Question, what is the proper method of applying such a missing white
> balance
> > fluorescent filter to a video file using ffmpeg?
>
> I would do that with a color-look-up-table. The procedure is described
> step-by-step in chapter 2.27 and an easier simplified version is
> described in chapter 2.28 in my book:
> http://www.astro-electronic.de/FFmpeg_Book.pdf



Your book multiple times calls multiple functionality in FFmpeg stupid.


>
>
> Michael
>
> ___
> ffmpeg-user mailing list
> ffmpeg-user@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
>
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-user] Fluorescent White Balance Video Filters

2022-04-19 Thread Paul B Mahol
On Tue, Apr 19, 2022 at 8:32 PM Carl Zwanzig  wrote:

> On 4/19/2022 11:07 AM, Roger wrote:
> > I noticed the colorcorrect filter, for use with augmenting the Red and
> Blue
> > channels.
>
> Touching on that- in most video systems green is the fixed* level and R/B
> are adjusted to that. Makes sense that ffmpeg does the same.
>
>
colorcorrect filter operates in YUV colorspace and not RGB colorspace
So green tint can be adjusted with it.


> *not separately adjustable
>
> z!
> ___
> ffmpeg-user mailing list
> ffmpeg-user@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
>
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-user] Fluorescent White Balance Video Filters

2022-04-19 Thread Carl Zwanzig

On 4/19/2022 11:07 AM, Roger wrote:

I noticed the colorcorrect filter, for use with augmenting the Red and Blue
channels.


Touching on that- in most video systems green is the fixed* level and R/B 
are adjusted to that. Makes sense that ffmpeg does the same.


*not separately adjustable

z!
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-user] Fluorescent White Balance Video Filters

2022-04-19 Thread Michael Koch

Am 19.04.2022 um 03:34 schrieb Roger:

I'm not finding much about fixing video having incorrect white space, more
specifically video with incorrect or forgotten fluorescent white balance
setting during recording.

I have a very old VHS recorded tape without a fluorescent white balance
applied, and as such a green mask throughout the video.

I started examing one frame of the video, luckily having distinct red, white,
blue colors and was viewing the frame within RawTherapee and tinkering with
white balance settings.  Low and behold, after applying the "Philips TL85
fluorescent" (designated as "F10 - Philips TL85") white balance preset profile,
the red/green/blue values all appeared exact!

However, I cannot find this preset profile within RawTherapee installed files,
nor do the *.pp3 sidecar files indicate specific values, hinting the values are
either hard-coded or further buried within the installed system files, for
which fgrep insensitive searching still fails to find the specifics of this
filter.

Question, what is the proper method of applying such a missing white balance
fluorescent filter to a video file using ffmpeg?


I would do that with a color-look-up-table. The procedure is described 
step-by-step in chapter 2.27 and an easier simplified version is 
described in chapter 2.28 in my book:

http://www.astro-electronic.de/FFmpeg_Book.pdf

Michael

___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-user] Fluorescent White Balance Video Filters

2022-04-19 Thread Roger
For those wondering about the fluorescent color settings, for filtering 
different standard fluorescent lighting scenarios within photography or videos:

Color temperature white points Wikipedia
https://en.wikipedia.org/wiki/Template:Color_temperature_white_points

This includes my video containing "F10 Philips TL85, Ultralume 50", having 
overly green saturated or green masking.

Looks like I'll need to somehow convert those CIE color space values to RGB?

I noticed the colorcorrect filter, for use with augmenting the Red and Blue 
channels.  Again, doesn't appear much is talked about colorcorrect when 
searching via Google.
  
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-user] Fluorescent White Balance Video Filters

2022-04-19 Thread Paul B Mahol
On Tue, Apr 19, 2022 at 3:34 AM Roger  wrote:

> I'm not finding much about fixing video having incorrect white space, more
> specifically video with incorrect or forgotten fluorescent white balance
> setting during recording.
>
> I have a very old VHS recorded tape without a fluorescent white balance
> applied, and as such a green mask throughout the video.
>
> I started examing one frame of the video, luckily having distinct red,
> white,
> blue colors and was viewing the frame within RawTherapee and tinkering
> with
> white balance settings.  Low and behold, after applying the "Philips TL85
> fluorescent" (designated as "F10 - Philips TL85") white balance preset
> profile,
> the red/green/blue values all appeared exact!
>
> However, I cannot find this preset profile within RawTherapee installed
> files,
> nor do the *.pp3 sidecar files indicate specific values, hinting the
> values are
> either hard-coded or further buried within the installed system files, for
> which fgrep insensitive searching still fails to find the specifics of
> this
> filter.
>
> Question, what is the proper method of applying such a missing white
> balance
> fluorescent filter to a video file using ffmpeg?
>

You could try colorcorrect filter. But note that it operates by default in
YUV colorspace.
While other software probably use Lab colorspace.


>
> I'm surprised there's so little mentioned via a Google search, as users
> are
> always mucking-up the white balance settings while video recording or
> taking
> photos, unless using a color/gray card.
>
>
> Roger
>
> ___
> ffmpeg-user mailing list
> ffmpeg-user@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
>
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".


[FFmpeg-user] Fluorescent White Balance Video Filters

2022-04-18 Thread Roger
I'm not finding much about fixing video having incorrect white space, more 
specifically video with incorrect or forgotten fluorescent white balance 
setting during recording.

I have a very old VHS recorded tape without a fluorescent white balance 
applied, and as such a green mask throughout the video.

I started examing one frame of the video, luckily having distinct red, white, 
blue colors and was viewing the frame within RawTherapee and tinkering with 
white balance settings.  Low and behold, after applying the "Philips TL85 
fluorescent" (designated as "F10 - Philips TL85") white balance preset profile, 
the red/green/blue values all appeared exact!

However, I cannot find this preset profile within RawTherapee installed files, 
nor do the *.pp3 sidecar files indicate specific values, hinting the values are 
either hard-coded or further buried within the installed system files, for 
which fgrep insensitive searching still fails to find the specifics of this 
filter.

Question, what is the proper method of applying such a missing white balance 
fluorescent filter to a video file using ffmpeg?

I'm surprised there's so little mentioned via a Google search, as users are 
always mucking-up the white balance settings while video recording or taking 
photos, unless using a color/gray card.


Roger



signature.asc
Description: PGP signature
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".