// alternatives / ffmpeg-debug-qp
ffmpeg-debug-qp 替代方案
小工具「每个宏块的 QP 是多少」的现成答案,基本只有一个:ffmpeg-debug-qp。 它能给出精确数值,代价是你得先让它跑起来。这一页讲清楚它好在哪里、卡在哪里, 以及什么情况下浏览器是更快的路,什么情况下它才是对的选择。
一、ffmpeg-debug-qp 是什么
它由 Werner Robitza 等人维护——就是做 VMAF 那批视频质量工具的人——MIT 许可。 核心是一个小的 C 程序,挂到解码器上,把每个宏块的 QP 打到标准错误流;另外配一个 Python 解析脚本, 把那一长串数字转成 JSON 或 CSV。
- 支持的编码格式:MPEG-2、MPEG-4 Part 2、H.264/AVC;
- 支持的封装:MP4,以及 H.264 Annex B 裸码流;
- 输出:逐帧、逐宏块的 QP 数值;
- 形态:纯命令行,Linux / macOS / Windows(新版提供预编译的静态二进制)。
二、它真正的优点
这不是客套——如果你的需求落在下表里,用它,别用本工具:
| 能力 | 说明 |
|---|---|
| 精确到每个宏块的数值 | 不是热力图,是可以直接进数据集的数字 |
| 可脚本化 | 输出 JSON / CSV,能接进批处理与 CI |
| 无图形界面依赖 | 纯命令行,服务器、无桌面环境都能跑 |
| 研究场景的常规环节 | 编码器对比、码率—质量分析这类离线流程的既有拼图 |
要做批量、要喂数据集、要在服务器上跑——用它,本工具做不了这些。
三、它卡在哪
下面几条也是事实,而且正是大多数人搜到本页的原因:
- 它跟着解码器的内部接口走。历史上 FFmpeg 5.x 之后就断过,README 里一度直接写 「does not work with ffmpeg 5.x or above」;新版追到了更新的 API。也就是说, 你得拿到一个版本对得上的构件,或者自己编译一份。
- 作者自己说这是个 hack。README 的原话是 relies upon a hack、not guaranteed to work with all videos。它读的是解码过程的内部状态,不是标准承诺的输出。
- QP 是一串数字,不是一张图。典型输出是终端上一行行 1111111111…。 想知道「画面右下角为什么糊」,你得先在脑子里把这串数字按宏块网格铺开。
- 没有画面、没有运动矢量、没有容器结构。想看是哪一帧、想叠 MV 箭头、想顺手看一眼 Box 树,都不在它的能力范围内。
- 必须在你的机器上运行。锁死的办公笔记本、客户的机器、Chromebook、平板,都跑不了。
四、本工具相对它的差别
- 把 QP 直接铺在画面上。颜色深浅表示该块相对本帧基准 QP 的偏差, 找异常区域不需要先在脑子里做网格映射。
- 点哪读哪。点一个块就能拿到它的数值,而不是从 stderr 的数字流里数位置。
- 同一个窗口里还有运动矢量箭头与 Box 树。不必在两个工具之间来回导文件。
- 零安装、零配置。打开网址、拖入文件,没有版本要匹配。
- 代价说清楚:不能批量、不能导出 CSV/JSON。这一条它确实更强,而且短期不会变。
五、对照表
| 能力 | ffmpeg-debug-qp | MP4 Analyzer |
|---|---|---|
| 逐宏块 QP 数值 | 有(文本 / JSON / CSV) | 有(热力图 + 点选读值) |
| 画面预览 | 无 | 有 |
| 运动矢量 | 无 | 有 |
| MP4 Box 结构 | 无 | 有(交互树 + Hex) |
| 批量 / 脚本化 | 有 | 无 |
| 导出 CSV / JSON | 有 | 无 |
| 需要编译 / 匹配版本 | 需要 | 不需要 |
| 编码格式 | MPEG-2 / MPEG-4 Part 2 / H.264 | H.264 / H.265 |
| 运行环境 | 能跑命令行的机器 | 现代浏览器 |
| 价格 | 免费开源(MIT) | 免费,免注册 |
表中事实以该项目 2026 年的公开 README 与发布页为准。本页面与该项目及其作者无任何关联, 也未使用其标识;名称仅为说明性引用。本工具与它有一个共同的上游依赖,归属与许可声明见 来源与许可。
六、怎么选
| 你的情况 | 选 |
|---|---|
| 要批量跑几百个文件,结果进数据集 | ffmpeg-debug-qp |
| 要 CSV / JSON 导出 | ffmpeg-debug-qp |
| 要在服务器或 CI 里无界面运行 | ffmpeg-debug-qp |
| 只是想看某个 MP4 哪一块 QP 异常 | 本工具 |
| 不想装东西,也不想配版本 | 本工具 |
| 想同时看画面、MV 与 Box 树 | 本工具 |
一句话:要自动化、要数值导出,用 ffmpeg-debug-qp;要打开就看、一眼定位,用本工具。 两者的分工其实很干净。更完整的横向对比见 同类工具对比。
// alternatives / ffmpeg-debug-qp
ffmpeg-debug-qp alternative
There is essentially one ready-made answer to "what is the QP of each macroblock": ffmpeg-debug-qp. It gives you exact numbers, and the price is getting it to run first. This page covers where it is strong, where it stalls, and when a browser is simply the faster path — and when it is not.
1. What ffmpeg-debug-qp is
It is maintained by Werner Robitza and others — the same circle behind the VMAF video-quality tooling — under the MIT license. At its core is a small C program that hooks the decoder and prints each macroblock's QP to standard error, plus a Python parser that turns that wall of digits into JSON or CSV.
- Codecs: MPEG-2, MPEG-4 Part 2, H.264/AVC;
- Containers: MP4, plus H.264 Annex B elementary streams;
- Output: per-frame, per-macroblock QP values;
- Form: command line only; Linux / macOS / Windows (recent versions ship pre-built static binaries).
2. Where it genuinely wins
This is not a formality — if your requirement is in this table, use it and not this tool:
| Capability | Detail |
|---|---|
| Exact per-macroblock numbers | Not a heatmap — digits you can drop straight into a dataset |
| Scriptable | JSON / CSV output that slots into batch pipelines and CI |
| No GUI dependency | Pure command line; runs on servers and headless machines |
| Standard in research pipelines | An existing piece of encoder-comparison and rate–quality workflows |
Batch work, dataset feeding, server-side runs — use it; this tool cannot do any of that.
3. Where it stalls
These are also facts, and they are why most people land on this page:
- It tracks the decoder's internal interface. It broke after FFmpeg 5.x historically — the README said outright "does not work with ffmpeg 5.x or above" — and the current version follows a newer API. Meaning: you need a build that matches, or you compile one yourself.
- The authors call it a hack. Their own README: relies upon a hack, not guaranteed to work with all videos. It reads internal decoder state, not an output the standard promises.
- QP is a stream of digits, not a picture. Typical output is line after line of 1111111111… in a terminal. To find out why the bottom-right of a frame looks bad, you mentally lay that stream back out onto a macroblock grid first.
- No frame preview, no motion vectors, no container structure. Which frame it is, MV arrows, a glance at the box tree — none of that is in scope.
- It has to run on your machine. A locked-down work laptop, a client's machine, a Chromebook, a tablet: all out.
4. Where this tool differs
- QP laid directly over the picture. Colour intensity is each block's deviation from the frame's base QP, so spotting the anomalous region needs no mental grid mapping.
- Click and read. Click a block, get its value — instead of counting positions in a stderr stream.
- Motion vector arrows and the box tree live in the same window. No exporting files back and forth between tools.
- Zero install, zero configuration. Open a URL, drop in a file, no version to match.
- The trade, stated plainly: no batch mode and no CSV/JSON export. On that it is clearly the stronger tool, and that is not changing soon.
5. Side by side
| Capability | ffmpeg-debug-qp | MP4 Analyzer |
|---|---|---|
| Per-macroblock QP values | Yes (text / JSON / CSV) | Yes (heatmap plus click-to-read) |
| Frame preview | No | Yes |
| Motion vectors | No | Yes |
| MP4 box structure | No | Yes (interactive tree + hex) |
| Batch / scripting | Yes | No |
| CSV / JSON export | Yes | No |
| Compile or match a version | Required | Not required |
| Codecs | MPEG-2 / MPEG-4 Part 2 / H.264 | H.264 / H.265 |
| Runs on | A machine with a shell | A modern browser |
| Price | Free, open source (MIT) | Free, no account |
Facts here reflect the project's public README and releases as of 2026. This page is not affiliated with that project or its authors and uses no project marks; the name is referenced descriptively. The two tools share an upstream dependency — see source & license for the attribution.
6. Which to pick
| Your situation | Pick |
|---|---|
| Batch hundreds of files into a dataset | ffmpeg-debug-qp |
| You need CSV / JSON output | ffmpeg-debug-qp |
| Headless runs on a server or in CI | ffmpeg-debug-qp |
| You just want to see where an MP4's QP goes wrong | This tool |
| You would rather not install anything or match versions | This tool |
| You want frame, MV and box tree together | This tool |
In one line: automation and numeric export go to ffmpeg-debug-qp; open-it-and-look goes to this tool. The division of labour is clean. For the wider picture, see the full comparison.