Motion JPEG 的规格是什么?

发布于 2024-07-19 18:21:56 字数 246 浏览 9 评论 0原文

我疯狂地谷歌搜索,找不到 mjpeg 的任何文件格式规范。

标题应该是什么样子? 我是否只是在标题后附加一系列 jpeg?

我知道它通常位于 .avi 容器中,它是否有可能包含在其中的编解码器的标准化格式?

我们的目标是在 ActionScript 3 中实现它,但也可以从其他语言移植。 我尝试过查看 ffmpeg 和 mplayer,但 c 还不是我的强项。

任何建议,将不胜感激!

I've been googling like mad and can't find any file format specifications for mjpeg.

What should the header look like?
Do i just append a series of jpegs after the header?

I know it's the usually in the .avi container, does that have a standardized format for codecs that might be in it?

The goal is to make it in actionscript 3, but other languages would be good to port from. I've tried looking at ffmpeg and mplayer but c is not my strong side (yet).

Any suggestions would be appreciated!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(8

扭转时空 2024-07-26 18:21:56

没有官方标准

实际上,以最简单的形式,mjpeg 只是 jpeg 文件的串联,在同一文件中一个接一个。

ffmpeg 使用 -f mjpeg-vcodec mjpeg 开关支持此功能。

如果后续图像无法提供替换,解码多个图像的 JPEG 解码器应记住并使用相同的 jpeg 表。 jpeg 标准将其描述为“缩写 jpeg 流”,并且 libjpeg 支持这一点。

因此,mjpeg 可能包含完整的 jpeg 图像,然后是后续的 SOI..EOI 块,这些块未指定与前一帧重复的标头。

There isn't an official standard.

In practice, in its simplest form, an mjpeg is just a concatenation of jpeg files, one after the other in the same file.

ffmpeg supports this using the -f mjpeg or -vcodec mjpeg switches.

JPEG decoders that decode multiple images should remember and use the same jpeg tables for subsequent images if those images fail to provide replacements. The jpeg standard describes this as 'abbreviated jpeg streams', and libjpeg supports this.

So an mjpeg might contain a full jpeg image, and then subsequent SOI..EOI blocks that do not specify those headers that are duplicates to the previous frame.

吃颗糖壮壮胆 2024-07-26 18:21:56

显然没有单一的规范。 来自维基百科

批评

与国际标准规定的视频格式不同
例如 MPEG-2 和格式
在 JPEG 静止图像中指定
编码标准,没有文档
定义单一精确格式
这被普遍认为是
“运动”的完整规范
JPEG”适用于所有情况。 这
引发兼容性问题
来自不同文件的输出
制造商。

Apparently there is no single specifiaction. From wikipedia:

Criticisms

Unlike the video formats specified in international standards
such as MPEG-2 and the format
specified in the JPEG still-picture
coding standard, there is no document
that defines a single exact format
that is universally recognized as a
complete specification of “Motion
JPEG” for use in all contexts. This
raises compatibility concerns about
file outputs from different
manufacturers.

白云悠悠 2024-07-26 18:21:56

IETF 将标准定义为 RFC 2435。 我不知道哪些编解码器将支持此功能,但这似乎是数据规范。

The IETF has the standard defined as RFC 2435. I don't know what codecs will support this, but this appears to be the data spec.

慈悲佛祖 2024-07-26 18:21:56

没有单一的官方规范。 但有些公司制定了自己的规范:

QuickTime File Format Specific (https://developer.apple.com/library/content/documentation/QuickTime/QTFF/QTFFPreface/qtffPreface.html)

Motion JPEG 格式,QuickTime M-JPEG 规范 (http://staticky.com/dl/ftp.apple.com /developer/Development_Kits/QuickTime/Programming_Stuff/Documentation/QuickTime-JPEGSpec.pdf)

Microsoft OpenDML AVI 文件格式扩展 (http://www.jmcgowan.com/odmlff2.pdf)

There is no single official specification. But some company made their own specification:

QuickTime File Format Specification (https://developer.apple.com/library/content/documentation/QuickTime/QTFF/QTFFPreface/qtffPreface.html)

Motion JPEG Format, QuickTime M-JPEG Specification (http://staticky.com/dl/ftp.apple.com/developer/Development_Kits/QuickTime/Programming_Stuff/Documentation/QuickTime-JPEGSpec.pdf)

Microsoft OpenDML AVI File Format Extensions (http://www.jmcgowan.com/odmlff2.pdf)

尝蛊 2024-07-26 18:21:56

MJPEG over HTTP 至少有一个相当标准的实现。 它作为多部分 HTTP 响应返回。

维基百科文章讨论了确切的机制:

https://en.wikipedia.org/wiki/ Motion_JPEG#M-JPEG_over_HTTP

MJPEG over HTTP at least has a pretty standard implementation. It is returned as a multi-part HTTP response.

The Wikipedia article discusses the exact mechanism:

https://en.wikipedia.org/wiki/Motion_JPEG#M-JPEG_over_HTTP

清风夜微凉 2024-07-26 18:21:56

你可以在网上其他地方找到这个文档,但我不知道哪个是权威来源:
http://www.cajunbot.com/wiki/images/7 /71/USB_Video_Payload_MJPEG_1.1.pdf

You can find this document in other places on the Net though I don't know which one is an authoritative source:
http://www.cajunbot.com/wiki/images/7/71/USB_Video_Payload_MJPEG_1.1.pdf

☆獨立☆ 2024-07-26 18:21:56

在 Motion JPEG 中,数字视频序列的每个视频帧或隔行扫描场都被单独压缩为 JPEG 图像。 因此,每个帧的规格(例如品质因数)存储在 It's Header 中。 换句话说,你的问题简化为:“如何读取视频中帧的标题?”

也许您可以使用 Phil Sallee 的 JPEG Toolbax。 请注意,它有一些读取/写入 jpeg 图像的功能,还有一些显示 DCT 矩阵、质量因数、霍夫曼编码表等的功能。

如果您发现如何在视频中使用此功能和/或如何读取 MJPEG 视频的规范请分享我们

In Motion JPEG each video frame or interlaced field of a digital video sequence is compressed separately as a JPEG image. So specification of each frame (such as quality factor) stored in It's Header. in another words your problem reduced to this : "How to read header of a frame in a video?"

Maybe you can use Phil Sallee's JPEG Toolbax. Note that it has some function to read/write a jpeg image and some to display DCT Matrices,Quality Factor,Huffman Coding Tables , etc.

If you find how to use this function in video and/or how to read specification of a MJPEG video please share us

金兰素衣 2024-07-26 18:21:56

经过很多天的互联网搜索,我也找不到完整的文档,也找不到文件协议的二进制示例。

有关我迄今为止找到的信息最丰富的资源,请参阅
http://www.digitalpreservation.gov/formats/fdd/fdd000127.shtml
(Motion JPEG 2000 文件格式 - 最后有许多“有用的参考 URL”,包括“Motion JPEG2000 概述”,它至少在某种程度上回答了这个问题)。

您会发现 Apple MOV PDF 比比皆是,其中显然包含 Motion JPEG,但需要数周时间才能破译。 我只能向其他人建议,上面的 URL 是进一步研究的良好起点。

After many days of Internet searching, I could not find full documentation either, nor a binary example of the file protocol.

For the most informative resource I have found so far, see
http://www.digitalpreservation.gov/formats/fdd/fdd000127.shtml
(Motion JPEG 2000 File Format -- has many "Useful references URLs" at end including "Overview of Motion JPEG2000" which at least go some way towards answering the question).

You will find Apple MOV PDF's abound, which apparently encompasses Motion JPEG, but it would take weeks to decipher. I can only suggest to others that the above URL is a good starting place for further research.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文