Report what compression schemes are different studios using and why. In particular what FFMPEG options are people using, although recommendations on other encoders are welcome.
Overview
We are looking for recommendations for the following:
- Best color preservation for output to:
- Web, OSX and Mac
- Common applications: e.g. RV, Nuke.
- Rec709, P3, rec2020 and HDR.
- Codec recommendations for:
- Proxy H264 playback (e.g. web streaming), should be setup for web streaming.
- Quality movie playback. - Good enough for given tasks (e.g. what's good enough for animation may not be good enough for lighting/compositing).
- Export to editorial.
- High-resolution or frame rate - e.g. 4k, 8k, 60fps, 120fps.
- Stereo or VR.
Where ffmpeg arguments, it would be great to document why we are using them, rather than ending up with a recipe.
Color Preservation
Testing Methodology
Converting SMPTE color bars to the compressed movie, using ffmpeg to expand and then compare with OIIO. NOTE, for compression schemes that are not 444 we may need to mask the transitions.
Testing loading the compressed movie in to RV, Firefox, VLC, Avid, resolve, , to compare the resulting color transformation - not sure if there is a procedural way to run this?
For the tests below we are assuming that other tools are being used (e.g. oiiotool) to convert the rendered frames into an intermediate file (e.g. PNG) in the target color-space.
Links
- An excellent starting point for this is: https://trac.ffmpeg.org/wiki/colorspace
- https://github.com/RxLaboratory/DuME/blob/master/src/FFmpeg_COLORS.md
- https://medium.com/invideo-io/talking-about-colorspaces-and-ffmpeg-f6d0b037cc2f
Flags.
Name | Source | ffmpeg flags | Description |
---|---|---|---|
ffmpeg colormatrix | https://trac.ffmpeg.org/wiki/colorspace | -sws_flags spline+accurate_rnd+full_chroma_int -vf "colormatrix=bt470bg:bt709" -color_range 1 -colorspace 1 -color_primaries 1 -color_trc 1 | 8bpc only |
ffmpeg colorspace | https://trac.ffmpeg.org/wiki/colorspace | -sws_flags spline+accurate_rnd+full_chroma_int -vf "colorspace=bt709:iall=bt601-6-625:fast=1" -color_range 1 -colorspace 1 -color_primaries 1 -color_trc 1 | Supports 10bpc and 12bpc, SIMD (faster), better quality than colormatrix. |
Compression quality
Testing Methodology
Explore using VMAF:
https://netflixtechblog.com/toward-a-practical-perceptual-video-quality-metric-653f208b9652
https://ottverse.com/vmaf-ffmpeg-ubuntu-compilation-installation-usage-guide/ - building VMAF on ubuntu.