Video Editing

What Are Color Spaces

  • YUV vs RGB vs …

Color Sub-Sampling

  • human visual perception is more sensitive to luminance (brightness- Y) than colour (chrominance- UV)
  • can throw away some of the chrominance data
  • intro to chroma sub-sampling

Capture Cards

  • lower cost low latency HDMI-USB adapters are 8 bit, no HDR, capture 4:2:2 or 4:2:0
  • BlackMagic and other prosumer/professional adapters can capture 10 bit, even 4:4:4; some cameras can capture/record in 10 bit 4:4:4
  • Elgato 4k capture studio has a secret menu (accessed via ctrl+shift+alt+u) that can, for some models, allow 4:2:2 capture. In OBS choose YUY2 as
    color format. Be careful with any of the settings in that menu! Ref

Capturing for Chroma Key

  • capturing at 4k 4:2:2 and downsampling the luminance and keeping chroma at the captured resolution give close to 1080P 4:4:4- excellent for (recorded) green screen work. See this detailed forum post
  • must use a codec that can support 4:4:4! E.g. ProRes444, or CineForm RGB, ie a format that (has the option) doesn’t do chroma sub-sampling
  • basically, keep UHD UV (already 1/2 res, ie HD) and scale Y from UHD → HD.
  • can use tools like ffmpeg or virtualdub - so long as they internally use RGB colour space, or YUV (with NO chroma sub-sampling)
  • VirtualDub2 is a great tool for this
    • some notes from the above forum post: In Vdub when you select Cineform RGB(A) under Compression then the auto setting for the decode dataspace should properly select an RGB(A) dataspace, regardless of the source dataspace. The auto setting should select an 8-bit or 16-bit per component depending on your source media per component bit depth. In other words the auto setting should be good to go when you properly select the output compression type. If the source is 8-bit then the auto should select an 8-bit internal bit depth. Since you are doing an interpolation, thus lots of pixel blending, and you seem interested in “best”, feel free to use a 16-bit per component internal space. It’s not really a waste since the Cineform RGB output is 12-bit. Wheather 16 vs 8-bit with an 8-bit source and interpolation helps is indeterminate.

Do what you want but Filmscan 3 is probably overkill. It will make files that are larger and may not decode well in Hitfilm. Filmscan 1 and 2 should be fine. No setting means that Hitfilm will handle you media without issues on your machine. Even Medium. Hitfilm needs all the help it can get with performance. Don’t make things harder for it.*

  • following is copied from the HitFilm forum:

Here is an example batch file for testing a UHD 420 to HD 444 using ffmpeg. It maintains planar YUV internal dataspace and scales the Y while preserving the UV and merging those places for the result. There is an alternate test dataflow commented out.

It outputs Prores. ffmpeg does not have Cineform output available. Hitfilm does not have native DNx support.

[@echo](https://community.fxhome.com/profile/echo) off

call "%~dp0set_path.cmd"

set filter=-filter_complex "extractplanes=y+u+v[y][u][v]; [y]scale=w=1920:h=1080:flags=print_info+bicubic+bitexact [ys]; [ys][u][v]mergeplanes=0x001020:yuv444p"

:top
title transcode UHD to HD 444 - %1
ffmpeg.exe -i %1 %filter% -c:v prores_ks -profile:v 4444 -qscale:v 5 -vendor:v ap10 -pix_fmt yuv444p10le -colorspace bt709 -color_primaries bt709 -color_trc bt709 -c:a pcm_s16le -chunk_size 64K "%~dpn1_444.mov"
if errorlevel 1 goto error
pause

shift
if NOT %1$==$ goto top
goto :EOF

:error
echo !!! error encoding !!!
pause

REM scale only the luma channel. combine into 444.
REM -filter_complex "extractplanes=y+u+v[y][u][v]; [y]scale=w=1920:h=1080:flags=print_info+bicubic+bitexact [ys]; [ys][u][v]mergeplanes=0x001020:yuv444p"

REM scale chroma channels up, combine, now 444, then scale down.
REM -filter_complex "extractplanes=y+u+v[y][u][v]; [u] scale=w=3840:h=2160:flags=print_info+neighbor+bitexact [us]; [v] scale=w=3840:h=2160:flags=print_info+neighbor+bitexact [vs]; [y][us][vs]mergeplanes=0x001020:yuv444p,format=pix_fmts=yuv444p10le,scale=w=1920:h=1080:flags=print_info+bicubic+full_chroma_inp+full_chroma_int"
  • a quick hack of the above for *nix systems:
find *.MOV -exec ffmpeg -i {} -filter_complex "extractplanes=y+u+v[y][u][v]; [y]scale=w=1920:h=1080:flags=print_info+bicubic+bitexact [ys]; [ys][u][v]mergeplanes=0x001020:yuv444p" -c:v prores_ks -profile:v 4444 -qscale:v 5 -vendor:v ap10 -pix_fmt yuv444p10le -colorspace bt709 -color_primaries bt709 -color_trc bt709 -c:a pcm_s16le -chunk_size 64K ../Converted\ to\ HD/{} \;