cdgriffith / cdgriffith/FastFlix

[SUGGESTION] FFMPEG color space "legalization"

Open
#216 4 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Python
Stars
1.6k
Forks
77
PR merge metrics
No merged PRs in 30d

Description

This feature will help all videomakers to "legalize" color space produced by their cameras for broadcast standard.

All started from [this discussion](https://video.stackexchange.com/questions/29699/canon-rgb-color-space-shift-to-broadcast-range-with-ffmpeg) started by me for solving the problem with "Canon HF100 colorspace".

After evaluating a clip, [Gyan](https://video.stackexchange.com/users/1871/gyan) (an FFMPEG maintainer) suggested me:

> You can use the geq filter to remap the pixel value ranges.
>
> `ffmpeg`
> `-i input`
> `-vf "geq=lum='(p(X,Y)-16)/(255-16)*(235-16)+16':cb='(p(X,Y)-16)/(255-16)*(240-16)+16'"`
> `-c:v libx264 -c:a copy out.mp4`
>
>The geq filter rescales the input luma from 16-255 to 16-235, and both the input chroma from 16-255 to 16-240, which is the legal range for broadcast 8-bit signals.

Hope that inspires !

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.