mjpeg 和 h264 有什么区别?
3 回答
Mjpeg 只是单个文件或数据流中的 jpeg 文件列表。没有帧间压缩。换句话说,每一帧都是关键帧。
h264 与 Mjpeg 非常不同 - 从这里开始:http ://en.wikipedia.org/wiki/H.264/MPEG-4_AVC
(Mpeg(没有'j')与Mjpeg不同,但与H264非常相似)
Video compression is achieved from 2 forms of prediction:
- Intra prediction: using information from within the same frame.
- Inter prediction: using information from a reference frame.
Inter prediction is generally a lot better, as it allows areas of the video that are similar between frames to be encoded very cheaply. This is where H.264 gains most of its compression.
A single JPEG image is just an intra frame, and MJPEG is just a sequence of JPEG images. MJPEG has no inter frames at all.
In fact even an H.264 intra frame will offer much better compression than a JPEG frame (this is partly why Google pushed WebP).
For most use cases H.264 will have much better compression than MJPEG, but the encode/decode process is a lot more complex, which is why things without much computing power e.g. webcams spit out MJPEG.
It would have to be a rather pathological case for an good H.264 encoder to perform as badly as a good MJPEG encoder, e.g. randomly generated pixel values.
首先知道 H.264 & MPEG-4 AVC & MPEG-4 part 10 是一样的。检查这个
现在
对于移动的摄像机或高活动区域的图像,MPEG4 和 H.264 相对于 MJPEG 提供的带宽节省很少。
正确的网络设计需要考虑更坏的情况,因此无论您使用 MJPEG、MPEG4 还是 H.264,您都需要专用相同数量的带宽。
由于没有帧内压缩,MJPEG 提供了更高的质量。
与 MJPEG 不同,MPEG-4 供应商偏离标准,增加了潜在的集成成本。
虽然 H.264 通常会显着降低带宽消耗,但它取决于多种因素(包括复杂性、流模式、帧速率和 i 帧速率)。VBR 与 CBR 的选择尤为重要,对使用和性能的影响特别大。最后,虽然 H.264 可以提供与 MJPEG 相同的可见图像质量,但根据您使用的设置(尤其是流媒体模式),您可以轻松生成更差的质量。