// how it works
技术原理
码流分析过去一直是桌面软件的领域:要装工具链、要授权费,文件还得先传出去。这个工具把分析放进了浏览器的一个 标签页里——不安装、不上传、不注册。
它能让你看到什么
| 视图 | 你能得到什么 |
|---|---|
| Box 结构树 | ISOBMFF 容器骨架,每个 Box 的字段明细与二进制 Hex |
| 帧列表 | 每一帧的序号、类型(I / P / B)、大小与文件偏移 |
| QP 热力图 | 用颜色表示每个编码块的压缩强度,一眼看出码率分配在哪里 |
| 运动矢量 | 每个帧间预测块的参考偏移,画成箭头叠在画面上 |
| 块划分网格 | 编码器实际选择的块边界与块尺寸 |
| Hex 搜索 | 在任意 Box 或整帧里按文本 / 字节序列定位 |
这些都是同一套界面的一部分:从容器结构到逐帧的编码决策,不需要在几个工具之间来回导文件。
每个块背后的三个数值
编码器为画面里的每个块都要做三个决定,工具把它们直接画出来:
- QP(量化参数):这个块压得多狠。QP 越大,量化越粗、丢弃的细节越多、占用码率越低; QP 越小,保留的细节越多、码率越高;
- MV(运动矢量):这个块在参考帧里匹配到了哪里,走的是哪一路参考 ——L0 指过去的帧,L1 指未来的帧;
- 块尺寸与位置:编码器最终选用的划分方式。
H.264 与 H.265 的差异
H.264 的划分单位是固定 16×16 的宏块(macroblock),可以继续划分为 8×8 子块; H.265 则采用编码树单元(CTU),尺寸可达 64×64,并以四叉树递归划分到 8×8。 因此 H.265 的块结构在不同帧、不同区域之间变化更大——同一帧里可能同时存在 64×64 的平坦区域块和 8×8 的细节区域块,这也是它的压缩效率更高的原因之一。
B 帧的双向预测
B 帧可以同时参考过去与未来的帧,所以它的运动矢量分成两组:L0(前向参考)与 L1(后向参考), 在可视化里用不同颜色区分,一根箭头对应一次参考。理解这一点,就能解释为什么 B 帧的码率通常最低 ——它的预测最准,残差最小。
文件不会离开你的设备
解析、解码与块级计算全部在你的浏览器标签页内完成。站点没有任何文件上传接口, 服务器不会接收、存储或处理你的视频,也不会有帧数据或分析结果被发出去。
这不是一句承诺,而是可以直接验证的:打开一个文件之后断开网络(或开飞行模式), 再继续切换帧、缩放热力图、点开块信息——功能完全不受影响。如果处理发生在服务器上,断网后的第一步就会卡住。
本站唯一写入到你设备的数据是一项界面语言偏好(浏览器本地存储),它会记住你上次选的中文或英文, 不会发送给服务器。
性能与限制
- 分析在标签页里完成,速度受浏览器可用算力限制,通常比原生桌面工具慢,但交互式查看单帧完全够用;
- 文件越大、分辨率越高,解析与解码耗时越长,内存占用也越高;
- 帧预览依赖浏览器内置的硬件解码器,需要较新的 Chrome 或 Edge;其他浏览器仍然可以分析码流与块数据, 只是没有画面预览;
- 当前支持 H.264 与 H.265 的块级分析,AV1 / VP9 尚未支持;
- 音频轨道可以查看容器结构与采样表,但不做码流级分析。
开源许可
分析能力基于 FFmpeg(LGPLv3) 构建。依照 LGPLv3 的要求,本项目使用的 FFmpeg 相关源码与许可证全文均已公开: 源码与许可说明。
// how it works
How it works
Bitstream analysis used to be the domain of desktop software: install a toolchain, pay for a license, and hand your file over first. This tool puts the analysis inside a browser tab — nothing to install, nothing uploaded, no account.
What it lets you see
| View | What you get |
|---|---|
| Box tree | The ISOBMFF skeleton: field-level detail and a hex dump for every box |
| Frame list | Index, type (I / P / B), size and byte offset for every frame |
| QP heatmap | Per-block compression strength as color — see at a glance where bits were spent |
| Motion vectors | Reference offsets for each inter-predicted block, drawn as arrows over the picture |
| Block grid | The block boundaries and block sizes the encoder actually chose |
| Hex search | Locate bytes by text or byte sequence, in any box or in a whole frame |
All of it lives in one interface: from container structure down to per-frame coding decisions, with no exporting files between tools.
The three numbers behind every block
The encoder makes three decisions for every block in the picture, and the tool draws them all:
- QP — how hard this block was compressed. Higher QP means coarser quantization, fewer retained details and fewer bits; lower QP means the opposite;
- MV — where this block matched in the reference frame, and through which reference list: L0 for past frames, L1 for future frames;
- Block size and position — the partitioning the encoder ended up choosing.
H.264 vs H.265
H.264 partitions fixed 16×16 macroblocks (further split down to 8×8), while H.265 uses coding tree units (CTUs) up to 64×64, recursively split quadtree-style down to 8×8. That makes H.265 block structure far more variable within a single frame — flat areas may use 64×64 while detailed areas drop to 8×8, one reason for its higher compression efficiency.
Bi-directional prediction in B frames
B frames can reference both past and future frames, so their motion vectors come in two groups — L0 (forward) and L1 (backward) — drawn in different colors, one arrow per reference. This is also why B frames usually cost the fewest bits: their prediction is the most accurate.
Your file never leaves your device
Parsing, decoding and block-level computation all happen inside your browser tab. The site has no upload endpoint — the server never receives, stores or processes your video, and no frame data or analysis result is sent anywhere.
That is not something you have to take on faith; you can verify it. Open a file, then disconnect your network (or switch on airplane mode) and keep switching frames, zooming the heatmap and inspecting blocks. Everything still works. If processing happened on a server, it would stop at the first step.
The only thing this site ever writes on your device is one interface-language preference in browser local storage, so it remembers whether you picked Chinese or English. It is never sent to a server.
Performance and limitations
- Analysis runs in the tab, so speed depends on the compute the browser can give it — slower than native desktop tools, but fast enough for interactive per-frame inspection;
- Larger files and higher resolutions take longer to parse and decode, and use more memory;
- Frame preview uses the browser's built-in hardware decoder and needs a recent Chrome or Edge; other browsers still analyze bitstream and block data, just without the picture preview;
- Block-level analysis currently covers H.264 and H.265; AV1 / VP9 are not supported yet;
- Audio tracks can be inspected at the container and sample-table level, but not at the bitstream level.
Open source licensing
Analysis is built on FFmpeg (LGPLv3). As LGPLv3 requires, the FFmpeg sources used by this project and the full license are published: sources and license notes.