Search code examples
google-cloud-platformgoogle-cloud-transcoder

How to use VBR on transcoder API


I'm trying to use VBR on elementaryStreams, but there's no documentation about it. It accepts an string and just it.

elementaryStreams: [
  {
    key: 'video-stream',
    videoStream: {
      h265: {
        heightPixels: 1080,
        widthPixels: 1920,
        bitrateBps: 12288000,
        rateControlMode: 'VBR', // Here.
        frameRate: 60,
      },
    },
  },
],

Is setting VBR suffice?


Solution

  • I found a documentation for using this method in a constructor (another here for job config) and it appears that it is set in vbr by default.

    rateControlMode string

    Specify the rateControlMode. The default is "vbr". Supported rate control modes: - 'vbr' - variable bitrate - 'crf' - constant rate factor

    The default is vbr.

    Please see some configuration samples here for your reference.