Re: [FFmpeg-user] Fluorescent White Balance Video Filters
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
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
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
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
> 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".
[FFmpeg-user] d4cd8830bd breaks build on AMD Ryzen
I have an AMD Ryzen Threadripper PRO 3975WX (32-Cores). I tried to build HEAD (4fc806bbe612784286f123af92a0d5d0da333064), but it fails: ``` $ git clone git://source.ffmpeg.org/ffmpeg.git ffmpeg $ cd ffmpeg $ PKG_CONFIG_PATH=/usr/local/lib64/pkgconfig:/usr/local/lib/pkgconfig ./configure --enable-bzlib --enable-zlib --enable-postproc --enable-runtime-cpudetect --enable-gray --enable-gpl --enable-nonfree --enable-libzimg --enable-libx264 --enable-libx265 --enable-libtheora --enable-libvpx --enable-libaom --enable-libdav1d --enable-libopenh264 --enable-libkvazaar --enable-libvmaf --enable-libvorbis --enable-libmp3lame --enable-libass --enable-libspeex --enable-libvo-amrwbenc --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopus --enable-libsoxr --enable-libpulse --enable-libfreetype --enable-libopenjpeg --enable-version3 --enable-libsvtav1 # ffmpeg configure $ make -j ... libavcodec/x86/hevc_mc.asm:1806: error: symbol `..@88236.table' not defined libavcodec/x86/hevc_mc.asm:1761: ... from macro `HEVC_PUT_HEVC_QPEL_HV_AVX512ICL' defined here libavcodec/x86/hevc_mc.asm:1710: ... from macro `QPEL_FILTER_V' defined here libavcodec/x86/hevc_mc.asm:1806: error: symbol `..@88236.table' not defined libavcodec/x86/hevc_mc.asm:1761: ... from macro `HEVC_PUT_HEVC_QPEL_HV_AVX512ICL' defined here libavcodec/x86/hevc_mc.asm:1710: ... from macro `QPEL_FILTER_V' defined here libavcodec/x86/hevc_mc.asm:1806: error: symbol `..@88236.table' not defined libavcodec/x86/hevc_mc.asm:1761: ... from macro `HEVC_PUT_HEVC_QPEL_HV_AVX512ICL' defined here libavcodec/x86/hevc_mc.asm:1710: ... from macro `QPEL_FILTER_V' defined here libavcodec/x86/hevc_mc.asm:1806: error: symbol `..@88236.table' not defined libavcodec/x86/hevc_mc.asm:1761: ... from macro `HEVC_PUT_HEVC_QPEL_HV_AVX512ICL' defined here libavcodec/x86/hevc_mc.asm:1710: ... from macro `QPEL_FILTER_V' defined here libavcodec/x86/hevc_mc.asm:1806: error: symbol `..@88236.table' not defined libavcodec/x86/hevc_mc.asm:1761: ... from macro `HEVC_PUT_HEVC_QPEL_HV_AVX512ICL' defined here libavcodec/x86/hevc_mc.asm:1710: ... from macro `QPEL_FILTER_V' defined here libavcodec/x86/hevc_mc.asm:1806: error: symbol `..@88236.table' not defined libavcodec/x86/hevc_mc.asm:1761: ... from macro `HEVC_PUT_HEVC_QPEL_HV_AVX512ICL' defined here libavcodec/x86/hevc_mc.asm:1710: ... from macro `QPEL_FILTER_V' defined here libavcodec/x86/hevc_mc.asm:1806: error: symbol `..@88236.table' not defined libavcodec/x86/hevc_mc.asm:1761: ... from macro `HEVC_PUT_HEVC_QPEL_HV_AVX512ICL' defined here libavcodec/x86/hevc_mc.asm:1710: ... from macro `QPEL_FILTER_V' defined here libavcodec/x86/hevc_mc.asm:1806: error: symbol `..@88236.table' not defined libavcodec/x86/hevc_mc.asm:1761: ... from macro `HEVC_PUT_HEVC_QPEL_HV_AVX512ICL' defined here libavcodec/x86/hevc_mc.asm:1710: ... from macro `QPEL_FILTER_V' defined here make: *** [ffbuild/common.mak:100: libavcodec/x86/hevc_mc.o] Error 1 make: *** Waiting for unfinished jobs ``` I bisected the build, and can see: ``` $ git reset --hard d4cd8830bda $ PKG_CONFIG_PATH=/usr/local/lib64/pkgconfig:/usr/local/lib/pkgconfig ./configure --enable-bzlib --enable-zlib --enable-postproc --enable-runtime-cpudetect --enable-gray --enable-gpl --enable-nonfree --enable-libzimg --enable-libx264 --enable-libx265 --enable-libtheora --enable-libvpx --enable-libaom --enable-libdav1d --enable-libopenh264 --enable-libkvazaar --enable-libvmaf --enable-libvorbis --enable-libmp3lame --enable-libass --enable-libspeex --enable-libvo-amrwbenc --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopus --enable-libsoxr --enable-libpulse --enable-libfreetype --enable-libopenjpeg --enable-version3 --enable-libsvtav1 # ffmpeg configure $ make -j ... libavcodec/x86/hevc_mc.asm:1806: error: symbol `..@88236.table' not defined libavcodec/x86/hevc_mc.asm:1761: ... from macro `HEVC_PUT_HEVC_QPEL_HV_AVX512ICL' defined here libavcodec/x86/hevc_mc.asm:1710: ... from macro `QPEL_FILTER_V' defined here libavcodec/x86/hevc_mc.asm:1806: error: symbol `..@88236.table' not defined libavcodec/x86/hevc_mc.asm:1761: ... from macro `HEVC_PUT_HEVC_QPEL_HV_AVX512ICL' defined here libavcodec/x86/hevc_mc.asm:1710: ... from macro `QPEL_FILTER_V' defined here libavcodec/x86/hevc_mc.asm:1806: error: symbol `..@88236.table' not defined libavcodec/x86/hevc_mc.asm:1761: ... from macro `HEVC_PUT_HEVC_QPEL_HV_AVX512ICL' defined here libavcodec/x86/hevc_mc.asm:1710: ... from macro `QPEL_FILTER_V' defined here libavcodec/x86/hevc_mc.asm:1806: error: symbol `..@88236.table' not defined libavcodec/x86/hevc_mc.asm:1761: ... from macro `HEVC_PUT_HEVC_QPEL_HV_AVX512ICL' defined here libavcodec/x86/hevc_mc.asm:1710: ... from macro `QPEL_FILTER_V' defined here libavcodec/x86/hevc_mc.asm:1806: error: symbol `..@88236.table' not defined libavcodec/x86/hevc_mc.asm:1761: ... from macro `HEVC_PUT_HEVC_QPEL_HV_AVX512ICL' defined here libavcodec/x86/hevc_mc.asm:1710: ... from macro `QPEL_FILTER_V' define