Skip to content

CRF flag seems to have no effect #371

@jimmy-zendar

Description

@jimmy-zendar

I want to set the video quality through the crf flag and it seems the quality of the encoded video does not change with the setting. It seems that the quality of the video is entirely governed by manually setting the bit_rate. My code snippet looks like

options = {'crf': '51'}
container = av.open(self.output_file, mode='w', options=options)
stream = container.add_stream('libx264', rate=24)
stream.width = 1024
stream.height = 800
stream.pix_fmt = 'yuv444p'
stream.bit_rate = 8000000

Thank you so much in advance for looking at my problem.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions