Menu

Post image 1
Post image 2
1 / 2
0

Build a per-title bitrate ladder in 80 lines of FFmpeg + VMAF

DEV Community·Mason K·19 days ago
#feq2Ka3u
Reading 0:00
15s threshold

📦 Code: github.com/USER/per-title-ladder — replace before publishing. TL;DR We'll take any source video, run a probe pass at six bitrate-resolution points, score each with VMAF, build a per-title ladder from the convex hull, and compare the bandwidth bill against a static 2019 ladder. End-to-end, ~80 lines of Python orchestrating FFmpeg 7.0 and libvmaf . What we're building A small CLI that you can run as: python3 ladder.py samples/talking-head.mp4 Enter fullscreen mode Exit fullscreen mode …and that produces: A per-title ladder, tuned for that specific file. A side-by-side bandwidth comparison vs a static ladder. A ladder.json you can feed to your HLS packaging step. You'll need FFmpeg 7.0+ built with libvmaf , Python 3.11+, and a source MP4. We're not training a perceptual model — VMAF's stock model is fine for a first cut. 1. Why one ladder doesn't fit everything A static ladder picks the same bitrate-resolution rungs for every video.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.

Read More