Quick Start Guide

Your First MediaX Pipeline

Run your first MediaX pipeline with just a few lines of code. This guide walks you through a complete example.

Step 1: Import MediaX

import.js
import { MediaX } from "mediax-sdk";

Step 2: Create a Pipeline

A pipeline lets you chain multiple media operations in sequence:

pipeline.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
typescript

Step 3: What Happens Here

🔄
convert

converts sample.mp4 into Matroska format (output.mkv)

🗜️
compress

compresses to a target bitrate (800k)

🎵
extractAudio

extracts audio track into audio.aac

🖼️
thumbnail

generates a thumbnail at 5 seconds (thumb.png)

▶️
run

executes pipeline on sample.mp4

Step 4: Example Output

console output
Pipeline: 25.0% (Job 1/4) ETA: 12.5s
Pipeline: 50.0% (Job 2/4) ETA: 9.3s
Pipeline: 75.0% (Job 3/4) ETA: 4.7s
Pipeline: 100.0% (Job 4/4) ETA: 0.0s
Pipeline completed successfully!

Step 5: Next Steps

You're Ready! 🚀

You've successfully created your first MediaX pipeline. This is just the beginning - MediaX supports many more operations and advanced features for complex media processing workflows.