In this video I take the practical concept of chroma subsampling and take it to the extreme to show just how powerful it is.
One of the design philosophies behind the YUV (and similar such as YIQ) was that color information (UV, IQ, basically the other two channels besides Y) could be stored/transmitted with lower resolution in order to save space/bandwidth since the eye is less sensitive to changes in color than lightness. In the popular pixel format yuv420p, the U and V channels (together representing the color) are stored at a quarter of the resolution as Y (the lightness), half the width and half the height in pixels.
Here, I manually carry out chroma subsampling with a twist: instead of just reducing the UV resolutions by a factor of 4, I reduce the resolution of U by 3600 (60²) and the resolution of V by 900 (30²). (I chose to reduce the U resolution further since it's most correlated with blue, which our eyes are the least sensitive to.) This means that for this 4K video, only Y has a resolution of 3840x2160, while U and V are comparatively miniscule at resolutions of 64x36 and 128x72 respectively. So, in theory, the color information should look completely off.
But... it doesn't!
For the most part, I barely noticed the drop in quality, to the point where I actually had to pause the video at specific points and check that I even successfully applied the effect. Yeah, there are certain points where the blockiness in the video is visible, but the motion in the video really helps it blend in. Even choosing a thumbnail was difficult, because I couldn't find many places where the wacky color stood out, and when I did I really had to zoom in to make it obvious.
It's a subtle effect, but that's a good thing. It not only verifies that the original idea to reduce the color resolution in YUV has some merit, but also shows that this can be taken much, much further if desired. Maybe it could even be considered an optical illusion of sorts, seeing as it tricks you into percieving the video as having a higher quality than it does. (Unless you don't fall for it, of course. I sure did!)
This effect is definitely more educational than spectacular. Hopefully with my description I've convinced you why it's so cool that this video looks so... normal.
Here's the script I used to pull it together:
----------
#! /bin/sh
ffmpeg -i $1 -i corner.mov -lavfi '[0:v]format=rgb48be,crop=w=.95*iw:h=.95*ih,scale=w=1280:h=720:force_original_aspect_ratio=disable,minterpolate=fps=60:mi_mode=mci:mc_mode=aobmc:me_mode=bidir:vsbmc=1,scale=w=3840:h=2160,format=rgba64be,colorlevels=aomin=1,colorchannelmixer=.299:.587:.114:0:-.16873:-.33127:.5:.5:.5:-.41869:-.08131:.5:0:0:0:1,format=rgb48be,extractplanes=r+g+b[y][u][vv];[y]format=rgb48be,colorlevels=gomax=0:bomax=0[yt];[u]format=rgb48be,scale=w=iw/60:h=ih/60,scale=w=60*iw:h=60*ih:flags=neighbor,colorlevels=romax=0:bomax=0[ut];[vv]format=rgb48be,scale=iw/30:h=ih/30,scale=w=30*iw:h=30*ih:flags=neighbor,colorlevels=romax=0:gomax=0[vt];[yt][ut]blend=all_mode=addition[yu];[yu][vt]blend=all_mode=addition,format=rgba64be,colorlevels=aomin=1,colorchannelmixer=1:-.00001:1.402:-.701:1:-.34413:-.71413:.52913:1:1.772:-.00002:-.88599:0:0:0:1[nl];[1:v]scale=w=3840:h=2160[lg];[nl][lg]overlay[fv];[0:a]aresample=48000,aexciter,afftdn[fa]' -map '[fv]' -c:v libx264 -s 3840x2160 -aspect 16:9 -r 60 -profile:v high -preset placebo -qp 18 -pix_fmt yuv420p -flags +cgop -g 30 -bf 2 -coder cabac -colorspace bt709 -color_primaries bt709 -color_trc bt709 -map '[fa]' -c:a libopus -ar 48000 -f mp4 -movflags +faststart output.mp4
----------
UNIVERSAL DISCLAIMER IN POEM FORM:
All credit goes to their owners
whoever they may be
and all the 9K logos
are the only things from me!
Информация по комментариям в разработке