mediaforge - v0.1.0
    Preparing search index...

    Function selectBestCodec

    • Select the first available codec from a priority list. Useful for graceful degradation: try hardware first, fall back to software.

      Parameters

      Returns string | null

      const codec = selectBestCodec(version, registry, [
      { codec: 'h264_nvenc', featureKey: 'nvenc' },
      { codec: 'h264_vaapi', featureKey: 'vaapi' },
      { codec: 'h264_mediacodec', featureKey: 'mediacodec' },
      { codec: 'libx264' },
      ]);