A powerful and flexible video processing framework for Node.js with support for multiple processing engines, adaptive streaming, and intelligent caching.
npm install mes-engine.m3u8) manifest generation with master and quality playlists.
bash
npm install mes-engine
`
$3
`typescript
import {
VideoProcessor,
FFmpegEngine,
FileSystemStorage
} from 'mes-engine';
// 1. Initialize Storage and Engine
const storage = new FileSystemStorage();
const engine = new FFmpegEngine();
// 2. Setup Configuration
const config = {
chunkSize: 10, // seconds
cacheDir: './output',
maxCacheSize: 1024 1024 1024, // 1GB
defaultQualities: [
{ height: 720, bitrate: '2500k' },
{ height: 1080, bitrate: '5000k' }
]
};
// 3. Initialize Processor
const processor = new VideoProcessor(engine, storage, config);
// 4. Listen for Progress
processor.on('chunk_processed', (event) => {
console.log(Processed ${event.quality.height}p chunk ${event.chunkNumber});
});
// 5. Process Video
const manifest = await processor.processVideo('input.mp4', {
title: 'My Awesome Video',
overallDescription: 'A high-quality adaptive stream.'
});
console.log('Master Playlist:', manifest.hls?.masterPlaylist);
`
$3
- Simple Usage: Minimal setup to get started quickly.
- Full Demo: A complete React + Node.js application.
Documentation
Full documentation is available in the docs directory.
$3
- Adaptive Streaming (HLS)
- Video Engines
- Storage Providers
- Caching Strategies
- API Reference
Supported Engines
- FFmpegEngine: Full-featured video processing using FFmpeg
- GStreamerEngine: High-performance processing using GStreamer
- Custom Engines: Create your own by extending VideoEngine`