Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • P PyAV
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 37
    • Issues 37
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 26
    • Merge requests 26
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • PyAV
  • PyAV
  • Issues
  • #873
Closed
Open
Issue created Jan 17, 2022 by Administrator@rootContributor

VideoFrame.reformat ignores source colorspace by default

Created by: animetosho

Overview

Unless otherwise told, it seems like VideoFrame.to_rgb (and conversely to_image) assumes the source colorspace to be 601, regardless of what it actually is.
If given a source that, for example, is using a 709 colorspace, the resulting RGB output is incorrect.

Expected behavior

to_rgb should use the colorspace specified by the source.

Actual behavior

If src_colorspace is not supplied, 601 is assumed.

Investigation

On a source using a 709 colorspace, specifying src_colorspace='ITU709' in to_rgb/to_image causes the correct output to be generated. Unfortunately, it seems like PyAV doesn't offer a way to determine what the source colorspace is, so this strategy isn't feasible unless the colorspace can be determined via other means.

Reproduction

Use the keyframe saving example with a source using a BT.709 colorspace.

Versions

  • PyAV: 8.1.0
  • libav*: 4.4
Assignee
Assign to
Time tracking