Video formats

WebM

Transcode videos to WebM format using VP9 codec. Configure encoding parameters for optimal quality.

WebM/VP9 transcoding

A basic example of how to transcode using VP9 format with some custom parameters.

import Chunkify from '@chunkify/chunkify';

const client = new Chunkify({
    projectAccessToken: 'My Project Access Token',
});

// Transcode using vp9 format with custom format parameters
const job = await client.jobs.create({
    source_id: source.id,
    format: {
        id: 'webm_vp9' 
        crf: 24,
        height: 1080,
        quality: 'good',    
    },
});

Encoding parameters

FFmpeg encoding parameters specific to VP9 encoding.

cpu_used
default: "5"
string

CpuUsed specifies the CPU usage level for VP9 encoding. Range: 0 to 8. Lower values mean better quality but slower encoding, higher values mean faster encoding but lower quality. Recommended values: 0-2 for high quality, 2-4 for good quality, 4-6 for balanced, 6-8 for speed

Available options:
012345678
Examples:
4
crf
default: 24
integer

Crf (Constant Rate Factor) controls the quality of the output video. Lower values mean better quality but larger file size. Range: 15 to 35. Recommended values: 18-28 for high quality, 23-28 for good quality, 28-35 for acceptable quality.

Required range: 15 <= x <= 35
Examples:
23
quality
default: "realtime"
string

Quality specifies the VP9 encoding quality preset. Valid values:

  • good: Balanced quality preset, good for most applications
  • best: Best quality preset, slower encoding
  • realtime: Fast encoding preset, suitable for live streaming
Available options:
goodbestrealtime
Examples:
good