m s

V0.6.0 · PURE RUST · ZERO FFMPEG

Media Stream

ms — terminal
$ ms encode input.mp4 output.mp4
142 fps
47 codecs
38 filters

The complete media processing toolkit — encode, transcode, filter, watermark, encrypt, stream, broadcast — all in one memory-safe binary. Auto-detects GPU hardware. 34 commands, 57 codec support rules, 10 streaming protocols.

0+ Lines of Rust
0 FPS Peak
0 Protocols

What is
ms?

ms is a pure-Rust media processing binary that replaces FFmpeg with a single, memory-safe, dependency-free executable. It auto-detects GPU hardware (Apple Silicon, NVIDIA, Intel Arc, AMD), supports modern codecs (AV1, AV2, VVC, Opus, FLAC), and includes built-in DRM encryption, pay-per-view token gating, HLS segmentation, broadcast IP protocols, and a security scanner that detects malicious payloads hidden in media files.

01

Memory Safe

Zero CVEs from buffer overflows. Rust's ownership model guarantees safety at compile time.

02

Single Binary

No dynamic linking, no dependency hell. Copy and run on any platform.

03

GPU Auto-Detect

Finds Apple VideoToolbox, NVIDIA NVENC, Intel QSV, AMD VCN automatically.

04

Built-in Security

Scans for malicious payloads, polyglot files, PHP disguises, metadata exploits.

05

Stream & Broadcast

HLS, MoQ/QUIC, WHIP/WHEP, NMOS IS-04/IS-05, SMPTE ST 2110, IPMX.

06

DRM & PPV

AES-128-CTR encryption, HMAC-signed tokens, self-destructing pay-per-view.

Everything
It Can Do

34 commands. 38 filters. 57 codec rules. One binary.

Encode

AV1 Video Encoding

Encode any video to AV1 MP4 with built-in filters. Chunked processing for large files. rav1e encoder — pure Rust.

ms encode movie.mp4 output.av1 --chunk-size 30
Transform

Video Operations

Crop, scale, rotate, trim, speed, concatenate, picture-in-picture overlay.

ms video in.mp4 crop out.mp4 0 0 640 480
Audio

Audio Processing

Decode, resample, normalize, fade, speed, pitch shift. Opus encode. AAC multichannel via fdk-aac-rust.

ms audio song.mp3 decode song.wav
Image

Image Processing

Resize, crop, rotate, flip, thumbnail. JPEG, PNG, WebP, BMP, TIFF, GIF.

ms image photo.jpg resize 1920 1080 out.jpg
Mux / Demux

Container Operations

Mux separate audio+video into MP4. Demux to extract raw streams. No re-encoding.

ms mux out.mp4 -v video.h264 -a audio.wav
Security

Payload Scanner

PHP disguises, polyglot files, embedded scripts, ID3 bombs, EXIF injection, MP4 atom overflow, MKV EBML recursion.

ms validate suspect.mp4
Sanitize

Metadata Sanitizer

Strip all metadata, hidden atoms, ID3 tags, EXIF data. Keeps only essential streams.

ms sanitize infected.mp4 clean.mp4
DRM

AES-128-CTR Encryption

Encrypt/decrypt media. Key files generated alongside. HMAC-SHA256 token signing for PPV.

ms drm movie.mkv enc.mkv --action encrypt
PPV

Pay-Per-View System

Self-destructing video packages. Max views, expiry, token verification.

ms ppv-create movie.mkv pkg.mkv --max-views 5
Streaming

HLS & fMP4 Segmentation

Generate HLS playlists with TS/fMP4 segments. CMAF segments with MoQ/QUIC transport. WHIP/WHEP WebRTC ingest/egress.

ms streaming hls input.mp4 hls/ --segment-duration 4
Broadcast

IP Broadcast Protocols

NMOS IS-04/IS-05, SMPTE ST 2110, IPMX device integration.

ms broadcast nmos --registry http://reg.local
Pipeline

Operation Chaining

Chain operations with JSON pipelines. Auto context passing. Fork/join.

ms pipeline in.mp4 --steps '[...]'
Detect

Hardware Detection

Apple M1-M4, NVIDIA NVENC/NVDEC, Intel Arc/QSV, AMD VCN — automatic.

ms hw
Identify

Magic Bytes Scanner

47 rules, 31 formats. Identifies files by header bytes regardless of extension.

ms magic
Debug

Full Diagnostic Dump

System info, hardware detection, codec registry, file probe, memory status.

ms debug movie.mp4 --text
Queue

Background Job Queue

Unix socket IPC, sequential processing, daemon mode.

ms queue start --daemon

ms vs
FFmpeg

Why the industry standard isn't enough anymore.

Feature FFmpeg ms
Written inCRust
Memory safetyManualCompile-time guaranteed
Single binaryDynamic linking hellOne executable
GPU detectionManual compile flagsAutomatic at runtime
Built-in security scannerNoYes — 7 payload types
DRM encryptionAES (complex setup)AES-128-CTR + HMAC tokens
Pay-per-viewNoBuilt-in
AV1 encodelibdav1d (decode only)rav1e — pure Rust
MoQ/QUICNoBuilt-in relay + publisher
SMPTE ST 2110NoBuilt-in
LicenseGPL/LGPLMIT

How to
Install

macOS (Apple Silicon)
git clone https://github.com/youruser/mediastream-framework.git
cd mediastream-framework
cargo build --release
cp target/release/ms /usr/local/bin/ms
ms --version
ms hw
Docker
cd demo-site
docker compose up -d
# Access at https://localhost:8443
docker run --rm -it \
  -v ./demos/input:/data \
  mediastream-engine ms probe /data/movie.mp4
Linux
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
git clone https://github.com/youruser/mediastream-framework.git
cd mediastream-framework
cargo build --release
sudo cp target/release/ms /usr/local/bin/
Quick Test
ms probe movie.mp4         # Inspect a file
ms hw                       # Check GPU hardware
ms encode in.mp4 out.av1    # Encode to AV1
ms validate suspect.mp4     # Security scan
ms debug --text             # Full diagnostic

All
Commands

Click any command to see details and examples.

Live
Players

Powered by the ms engine API — probe, validate, and play media files with full metadata.

Test
Lab

Upload a media file (max 30 seconds), choose an operation, and watch results stream in real time.

API
Endpoints

Interactive API explorer. Click any endpoint to try it live.

GET /api/probe?file=path

Probe a media file. Returns format, duration, resolution, codecs.

GET /api/hw

Auto-detect GPU hardware. Apple Silicon, NVIDIA, Intel, AMD.

GET /api/codecs

List all supported codecs (29 general + 19 audio).

GET /api/filters

List all 38 video filters by category.

GET /api/backends

Show compiled decode/encode backends and their status.

GET /api/validate?file=path

Security scan — detect malicious payloads in media files.

GET /api/debug

Full diagnostic dump — system, hardware, codecs, memory.

GET /api/magic

Magic bytes identification table (47 rules, 31 formats).

Select an endpoint above
// Response will appear here
ms shell
$ ms --help

Streaming
& HLS

HLS segmentation with TS packets. Generate playlists and segments from any video file.

HLS Player

No HLS stream loaded

All 10 Protocols

Interactive demos with live playback, real-time stats, and protocol comparison.

HLS DASH WHEP WHIP MoQ SRT RTMP NMOS ST 2110 IPMX
View All Protocol Demos →

Multi-Backend
System

Three interchangeable decode/encode backends, selectable at runtime.

Default

mstream

  • rav1e AV1 encoder
  • mstream_h264 H.264 decoder
  • mstream_av1d AV1 decoder
  • mp4 container muxer
  • Symphonia audio decode
ms encode in.mp4 out.av1
Feature-Gated

oxideav

  • OxideAV modular framework
  • ~55 crates ecosystem
  • GPU-accelerated decode
  • VideoToolbox, VAAPI, NVENC
  • Compile: --features oxideav
ms --use oxideav encode in.mp4 out.av1
Feature-Gated

rff

  • Remade FFmpeg in Rust
  • Drop-in FFmpeg replacement
  • H.264 codec support
  • MP4 format support
  • Compile: --features rff
ms --use rff encode in.mp4 out.av1