Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing the colorspace issue when writing the mp4 from the extracted pngs #550

Merged
merged 2 commits into from
Jun 19, 2023

Commits on Jun 19, 2023

  1. Update utilities.py

    Updated the extraction process with the ffmpeg command that corrects the colorspace while extracting to png, and corrected the ffmpeg command, adding '-pix_fmt', 'rgb24', '-sws_flags', '+accurate_rnd+full_chroma_int', '-colorspace', '1', '-color_primaries', '1', '-color_trc', '1'
    
    '-pix_fmt rgb24', means treat the image as RGB (or RGBA)
    '-sws_flags +accurate_rnd+full_chroma_int', means use full color and chroma subsampling instead of 4:2:0
    '-colorspace 1', '-color_primaries 1', '-color_trc 1' put the metadata color tags to the png
    NickPittas committed Jun 19, 2023
    Configuration menu
    Copy the full SHA
    6c77993 View commit details
    Browse the repository at this point in the history
  2. Fixing color conversion from temp png sequence to mp4

    '-sws_flags', 'spline+accurate_rnd+full_chroma_int', ' use full color and chroma subsampling
    -vf', 'colorspace=bt709:iall=bt601-6-625:fast=1', keep the same rec709 colorspace
    '-color_range', '1', '-colorspace', '1', '-color_primaries', '1', '-color_trc', '1', put the metadata color tags to the mp4
    NickPittas committed Jun 19, 2023
    Configuration menu
    Copy the full SHA
    b6db75c View commit details
    Browse the repository at this point in the history