RIMM 流文件格式中各个帧的格式是什么
我正在尝试从黑莓设备捕获一些视频帧并将其作为图像进行操作(特别是进行条形码解码)。
我找到了一些示例代码和规范文档,其中演示了如何使用 J2ME MMAPI 类将视频从设备的摄像头流式传输到文件和输出流。流媒体文件采用 RIM 专有的“RIMM 流媒体文件”格式。
站点上的示例代码显示了如何解析此格式以提取图像 - 具体来说,显示的示例会将“关键帧”输出到系统上的文件中。
有人有这种格式的经验吗?有谁知道各个帧的格式是什么?我想从图像中获取灰度字节数组进行处理,但不知道从哪里开始。我已经向 RIM 发送了电子邮件寻求帮助,但我想我应该检查一下 SO BlackBerry 专家是否知道什么。
一些额外的信息和问题:
元数据中有一些标志,指示它采用哪种视频编码:MPEG4 或 H263、H264...这是各个帧的格式吗?我很抱歉对成像和视频编码技术如此无知。
我们团队的高级开发人员似乎认为这种编码适用于整个视频文件,并且各个帧将以其他格式提供,例如 RGB 或 YUV。我的直觉说这没有意义,如果流被压缩,所有帧都会受到影响。
编辑添加
此后,我收到了 RIM 某人的一封电子邮件,他解释说关键帧是唯一包含完整图像的帧,其他帧只会有差异(我怀疑并确认了这一点)在维基百科上...)他说,如果编码指定为 MPEG,那么关键帧将是 JPEG。我可能会向视频编码专家提出另一个问题,因为这越来越不是黑莓特有的,但有人听知道这是否属实吗?
再次编辑以添加
事实并非如此。 MPEG 文件的关键帧不是 JPEG,RIM 的家伙不知道他在说什么。它只是 MPEG,因此您必须像任何其他 MPEG 流视频一样对其进行解码……同时我们已经开始解决其他问题。
I am trying to capture some video frames from a BlackBerry device and operate on them as images (specifically to do barcode decoding).
I have found some sample code and a spec document which demonstrates how to use the J2ME MMAPI classes to stream video from the device's camera both to a file and to an output stream. The streaming file is in RIM's proprietary "RIMM streaming file" format.
The sample code on the site shows how to parse this format to extract images - specifically the sample shown will output the "key frames" to a file on the system.
Does anyone have experience with this format? Does anyone know what format the individual frames are? I would like to get a grayscale byte array from the image for processing and am not sure where to start. I've emailed RIM for some help but thought I should check if the SO BlackBerry gurus know anything.
Some bonus info and questions:
There are flags in the metadata which indicate what kind of video encoding it is in: MPEG4 or H263, H264... is this the format of the individual frames? I'm sorry for being so woefully ignorant of imaging and video encoding technology.
The senior dev on our team seems to think this encoding would apply to the whole video file, and that the individual frames would be available in some other format, like RGB or YUV. My gut says this doesn't make sense, if the stream is compressed, all the frames will be affected.
Edited to add
I've since gotten an email from someone at RIM who explained that the key frames are the only frames which will contain a full image, the others will just have differences (which I suspected and confirmed on Wikipedia...) He said that if the encoding is specified as MPEG then the key frames will be JPEGs. I might post another question for video encoding experts, because this is becoming increasingly not Blackberry specific, but does anyone listening know if this is true?
Edited again to add
That was not true. The key frames of an MPEG file are not JPEGs, the RIM guy didn't know what he was talking about. It's just MPEG, so you would have to decode it as any other MPEG streaming video ... meanwhile we've moved on to other problems.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论