Skip to content

How to achieve the equivalent of ffmpeg's -colorspace command line option using PyAV's APIs? #1557

Closed Answered by yosefk
yosefk asked this question in 1. Help
Discussion options

You must be logged in to vote

Adding frame = frame.reformat(format='yuv420p', dst_colorspace=av.video.reformatter.Colorspace.ITU709) before the call to encode fixes the problem. I don't know why both the format and the dst_colorspace arguments are needed for this to work, I tried them separately to no effect and gave up on them but now they turn out to work when combined. (I would guess that only the dst_colorspace option would be needed based on the reasoning in the end of the question.)

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by yosefk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant