def __init__(self, name='x264', formatter=None):
    super(X264Codec, self).__init__(
      name,
      formatter=(formatter or encoder.OptionFormatter(prefix='--', infix=' ')))
    self.extension = 'mkv'
    self.option_set = encoder.OptionSet(
      encoder.Option('preset', ['ultrafast', 'superfast', 'veryfast',
                                'faster', 'fast', 'medium', 'slow', 'slower',
                                'veryslow', 'placebo']),
      encoder.Option('rc-lookahead', ['0', '30', '60']),
      encoder.Option('vbv-init', ['0.5', '0.8', '0.9']),
      encoder.Option('ref', ['1', '2', '3', '16']),
      encoder.ChoiceOption(['use-vbv-maxrate']),
      encoder.Option('profile', ['baseline', 'main', 'high']),
      encoder.Option('tune', ['psnr', 'ssim']),
      # Experimentation on a 6-core, 12-thread system shows some gains on
      # large videos for thread values up to the thread count, and up to the
      # core count on smaller videos.
      # There is some damage to PSNR with more threads.
      encoder.IntegerOption('threads', 1, 6).Mandatory(),
      encoder.DummyOption('vbv-maxrate'),
      encoder.DummyOption('vbv-bufsize'),
    )
dataset/ETHPy150Open google/compare-codecs/lib/x264.py/X264Codec.__init__/original