jsCargo logojsCargo
verifiedOpen source, Bun-first

Package, describe, and deliver your media.

jsCargo is modular tooling for schemas, transcoding, storage, API helpers, and a CLI—built for the modern JavaScript ecosystem.

boltBun scripts
movie_editHLS/DASH ready
schemaJSON schema
Live Demo

Powered by jsCargo Transcoding & HLS.js

  • schema

    Canonical schema

    Typed JSON schema for media metadata with extensions.

  • movie_edit

    Transcoding

    CLI to emit HLS/DASH outputs and schema-compliant metadata.

  • cloud_upload

    Storage adapters

    Upload to S3/R2 or local, then rewrite URLs in metadata.

  • api

    Lightweight API

    Read/validate metadata in apps, wire to HLS.js or dash.js.

Quick start

Install the schema package, then validate a JSON payload with Ajv.

Bun — Install
bun add @jscargo/schema ajv
Usage — validate schema
import coreSchema from '@jscargo/schema';
import Ajv from 'ajv';

const ajv = new Ajv();
const validate = ajv.compile( coreSchema );

const example = {
    version: '1.0',
    metadata: { title: 'Example Video' },
    sources: []
};

console.log( validate( example ) ); // true/false
if ( validate.errors?.length > 0 ) {
    console.log( validate.errors );
}
Bun — run dev (Next.js)
bun run dev