Client-Side Stream Manifest Builder
Video Streaming Engineering Kit
Production-ready streaming manifest templates and validated JSON workflow schemas for video engineers.
- Manifest templates
A client-side media streaming manifest generator transforms segment durations, bitrates, and track URLs into validated adaptive streaming configurations directly in your browser without cloud uploads or enterprise setup.
How viafinds compares
| Capability | viafinds |
|---|---|
| Execution Environment | 100% browser-local (zero cloud setup) |
| Pricing & Access | Free client-side utility (no account required) |
| Data Privacy & Token Safety | Private URLs and DRM headers never leave your device |
| Quick Manifest & URL Transformations | Instant JSON validation, CSV conversion, Base64, URL & XML escaping |
| Onboarding Time | Immediate in-browser execution in under 5 seconds |
How Adaptive Streaming Manifests Work
Adaptive bitrate (ABR) streaming protocols such as MPEG-DASH (MPD), HTTP Live Streaming (HLS M3U8), and Microsoft Smooth Streaming (ISM/ISMC) rely on structured manifest files to tell video players how to fetch, decode, and switch between media segments. A manifest acts as the table of contents for a stream: it lists available video and audio tracks, codec profiles, resolution ladders, initialization headers, and exact segment durations or URL templates.
Manually composing or debugging these manifest structures is notoriously error-prone. A single mismatched timescale value, unescaped XML character inside a query string, or invalid JSON metadata payload can cause playback stalls, 404 segment requests, or complete player initialization failures. Running validation and text transformations directly in your browser lets you inspect, normalize, and verify segment metadata in seconds before deploying to a CDN or packaging pipeline.
Core Formulas: Timescale, Segment Duration, and Bitrate Math
Every adaptive manifest depends on deterministic timing and throughput math. Use these standard formulas when preparing your segment metadata before formatting:
1. Segment Duration in Ticks
Container formats like ISO BMFF (fMP4) express duration in integer clock ticks rather than floating-point seconds to prevent cumulative rounding drift:
Duration (Ticks) = Segment Duration (Seconds) * Timescale (Hz)
Common timescales include 90000 Hz for MPEG-2 TS / H.264 video, 48000 Hz for 48 kHz AAC audio, and 10000000 Hz (100-nanosecond units) for Smooth Streaming manifests.
2. GOP Alignment and Keyframe Interval
To enable seamless quality switching between renditions, every segment boundary must start with an Instantaneous Decoder Refresh (IDR) keyframe:
Frames per Segment = Frame Rate (fps) * Segment Duration (Seconds)
For a 29.97 fps or 30 fps stream with 4-second segments, your encoder must insert a forced keyframe every 120 frames (30 * 4 = 120). If your segment duration is 2 seconds at 24 fps, the keyframe interval must be 48 frames.
3. Expected Segment Byte Size and Buffer Overhead
Estimating segment size helps verify whether your CDN cache rules and minBufferTime settings match real-world network conditions:
Estimated Segment Size (Bytes) = (Bandwidth (bps) * Segment Duration (Seconds)) / 8
For example, a 5,000,000 bps (5 Mbps) 1080p stream using 4-second segments produces approximately (5,000,000 * 4) / 8 = 2,500,000 bytes (~2.38 MiB) per .m4s chunk.
Step-by-Step Methodology for Preparing Valid Manifests
1. Structure and Validate Your Metadata as JSON
Before rendering XML (DASH MPD or Smooth Streaming Client Manifest) or playlist lines (HLS), store your stream parameters in a canonical JSON schema. Using the JSON Validate and JSON Format operations ensures there are no trailing commas, mismatched brackets, or invalid numeric types in your bandwidth, width, height, or timescale fields. Once validated, JSON Minify strips whitespace for compact API payloads or automated packager configs.
2. Batch-Convert Segment Inventories with CSV and JSON
Video engineers frequently export segment durations, byte ranges, or CDN paths from FFprobe, Bento4, or spreadsheet audits as CSV files. Use CSV to JSON to convert tabular segment lists into structured arrays, or JSON to CSV to export a manifest's representation ladder into a human-readable QA sheet for stakeholder review. You can also apply Dedupe Lines and Sort Lines on raw URL lists to verify there are no duplicate or out-of-order segment indices.
3. Normalize Query Parameters, PSSH Payloads, and XML Entities
Streaming URLs frequently include signed CDN tokens, query parameters, and DRM initialization data:
- URL Encode / Decode: Signed URLs inside manifest attributes often break parsers if ampersands or tokens are improperly escaped. Encode parameter values cleanly before embedding them.
- HTML / XML Escape: XML-based manifests (MPD and Smooth Streaming) reject raw
&,<, or>characters inside<BaseURL>orSegmentTemplateattributes. Run HTML Escape on raw URLs with query strings so&token=safely becomes&token=. - Base64 Encode / Decode: Widevine, PlayReady, and FairPlay
<cenc:pssh>boxes inside manifests are Base64-encoded binary blobs. Use Base64 Decode or Base64 Encode to inspect embedded key IDs or encode custom JSON license payloads. - SHA-256 Hashing: Compute SHA-256 checksums over manifest strings or initialization headers to detect unauthorized tampering or verify cache-busting asset versions.
Worked Example: 1080p/720p ABR Ladder with 4-Second Segments
Suppose you are configuring a 10-minute (600-second) VOD asset encoded at 30 fps with two H.264 representations and one 48 kHz AAC audio track.
- Calculate Timing: With a video timescale of
90000and 4-second segments, each segment spans4 * 90000 = 360000ticks. Across 600 seconds, the player will request600 / 4 = 150video segments (seg-1.m4sthroughseg-150.m4s). For the 48 kHz audio track (timescale = 48000), each 4-second segment spans4 * 48000 = 192000ticks. - Verify Bandwidth and Codecs: Assign
avc1.640028(H.264 High Profile Level 4.0) at5000000bps for 1920x1080, andavc1.4d401f(H.264 Main Profile Level 3.1) at2800000bps for 1280x720. Usemp4a.40.2(AAC-LC) at128000bps for audio. - Sanitize CDN URLs: Suppose your base CDN path uses signed parameters:
https://cdn.example.com/stream?env=prod&version=2. Running HTML Escape converts the&to&, preventing XML parser errors when inserted into an MPD<BaseURL>node. - Validate and Export: Paste the complete configuration into the tool, run JSON Validate to confirm zero syntax defects, and generate a SHA-256 digest of the finalized configuration to log in your release manifest.
Common Manifest Pitfalls and Debugging Checklist
- Mismatched
minBufferTime: SettingminBufferTimeshorter than a single segment duration causes aggressive rebuffering on variable bitrates. Always setminBufferTimeequal to or greater than your segment duration. - Unescaped Ampersands in XML: Passing raw tokenized URLs into MPEG-DASH or Smooth Streaming XML without escaping
&to&breaks strict browserDOMParserand MSE players. - Inconsistent Segment Counts Across Renditions: If 1080p has 150 segments and 720p has 149 segments due to encoder drift, ABR switching fails near the end of playback. Export segment lists via JSON to CSV and compare line counts with Text Stats.
100% Browser-Local Privacy and Security
Media engineering teams routinely work with pre-release content URLs, private CDN tokens, DRM PSSH headers, and proprietary encoding ladders. Every operation in this utility runs 100% locally inside your browser's JavaScript runtime. Your segment metadata, URLs, Base64 payloads, and JSON configurations are never uploaded, logged, or transmitted to any external server. You can inspect additional browser-local engineering utilities on the home page or reach out via our contact page with feedback.
User Reviews
No reviews yet. Be the first to share feedback below.