Docs

JPG

Generate individual JPG images or sprite sheets with VTT files for video previews.

This guide documents the legacy Jobs API (/jobs). Existing Jobs API integrations remain supported during the transition. For automatic file encoding, see the transcode guides.

JPG transcoding

import Chunkify from '@chunkify/chunkify';

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

// Transcode using JPG format with custom format parameters
const job = await client.jobs.create({
    source_id: source.id,
    format: {
        id: 'jpg',
        interval: 5,
    },
});

Encoding parameters

FFmpeg encoding parameters specific to JPEG image extraction.

id
"jpg"
string
required
interval
integer
required

Time interval in seconds at which frames are extracted from the video (e.g., interval=10 extracts frames at 0s, 10s, 20s, etc.). Must be between 1 and 3600 seconds.

Required range: 1 <= x <= 3600
chunk_duration
integer
Required range: x >= 1
duration
integer

Duration specifies the duration to process in seconds. Must be a positive value.

Required range: x >= 1
frames
integer
Required range: x >= 1
height
integer
Required range: -2 <= x <= 3840
seek
integer

Seek specifies the timestamp to start processing from (in seconds). Must be a positive value.

Required range: x >= 1
sprite
boolean
width
integer
Required range: -2 <= x <= 3840