解码RIMM流文件格式
我想解码 Blackberry RIMM 文件中的视频(视觉)帧。到目前为止,我有一个 解析器,以及一些相应的容器<来自 RIM 的 href="http://docs.blackberry.com/en/developers/deliverables/11942/RIM_proprietary_video_format_1001586_11.jsp" rel="nofollow noreferrer">文档。
视频编解码器为 H264,并使用 video.encodings 属性之一在设备上显式设置。然而,FFMPEG 无法解码帧,这让我抓狂。
编辑1:问题似乎是帧中缺少SPS和PPS,到目前为止,人工插入它们已被证明是不成功的(全是灰色图像)。黑莓 9700 发送
0x00 0x00 0x?? 0x?? 0xType
,其中类型根据 H264 规范中的表 7-1(I 和 P 帧)。我们相信0x?? 0x??表示帧的大小,但是该大小并不总是与解析器找到的大小相对应(解析器似乎工作正常)。
我有一个来自黑莓的 Windows 解码器编解码器,名为 mc_demux_mp2_ds.ax,可以播放一些以相同方式捕获的 MPEG-4 文件,但它是 Windows 的二进制文件。而且 H264 文件将无法以任何方式播放。我知道之前的尝试。 javax.microedition.media.Manager 的捕获 url 是
encoding=video-3gpp_width=176_height=144_video_codec=H264_audio_codec=AAC
,我正在写入输出流。一些示例文件此处。
编辑 2:事实证明,即使在最简单的测试应用程序中,12-15 种可用视频捕获模式中约有 3-4 种完全失败并拒绝输出数据。因此,任何可行的解决方案都应该在 AMR 和 AAC 中实现 MPEG-4、H264 和 H263,以便在一种声音编解码器和/或分辨率失败时获得备用替代方案。重新启动、挂起以及黑莓视频实现中的其他问题,并且因固件而异;总吸力。
I want to decode the video (visual) frames within a Blackberry RIMM file. So far I have a parser, and some corresponding container documentation from RIM.
The video codec is H264 and is explicitly set on the device using one of the video.encodings properties. However, FFMPEG is not able to decode the frames and this is driving me nuts.
Edit 1: The issues seems to be lack of SPS and PPS in the frames, and artificially inserting them have proven unsuccessful so far (all grey image). Blackberry 9700 sends
0x00 0x00 0x?? 0x?? 0xType
where Type is according to table 7-1 in the H264 spec (I and P frames). We believe the 0x?? 0x?? represent the size of the frame, however the size does not always correspond to the size found by the parser (the parser seems to be working correctly).
I have a windows decoder codec from blackberry, called mc_demux_mp2_ds.ax, and can play some MPEG-4 files captured the same way, but it is a binary for windows. And the H264 files will not play either way. I am aware of previous attempts. The capture url for javax.microedition.media.Manager is
encoding=video-3gpp_width=176_height=144_video_codec=H264_audio_codec=AAC
and I am writing to an output stream. Some example files here.
Edit 2:Turns out that about 3-4 of the 12-15 available video capture modes are flat out failing and refusing to output data, even in the simplest of test applications. So any working solution should implement MPEG-4, H264 and H263 in both AMR and AAC, in so getting fallback alternatives when one sound codec and/or resolution fails. Reboots, hangs and what not litters the Blackberry video implementation and vary from firmware to firmware; total suckage.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我知道这并没有深入了解 RIMM 如何使用 H.264,但它可能会为您指明正确的方向。
几周前,我使用 Handbrake 开源应用程序成功转换了黑莓视频文件(我是在 Windows 上运行)。
您可能想要深入研究 Handbrake 代码或它们使用的库之一的代码,以了解如何处理这些 RIMM 文件。
Subversion:
svn co svn://svn.handbrake.fr/HandBrake/trunk handbrake-svn
GitHub:https://github.com/HandBrake/HandBrake
I know this doesn't get into the nitty-gritty of how RIMM uses H.264, but it may point you in the right direction.
A couple of weeks ago, I successfully converted a Blackberry video file using the Handbrake open-source application (I was running on Windows).
You might want to dig into the Handbrake code, or the code of one of the libraries that they use, to see how these RIMM files are handled.
Subversion:
svn co svn://svn.handbrake.fr/HandBrake/trunk handbrake-svn
GitHub: https://github.com/HandBrake/HandBrake
你尝试过使用 ffmpeg2theora 吗?在我发现 ffmpeg2theora 之前,我在 ffmpeg 上度过了一段非常糟糕的时光!!,没有音频问题,没有视频问题。
只需要写:
它针对许多平台进行了编译(不需要像 ffmpeg 那样构建和编译),我在 OSX 64 位和 linux 64 位下使用它。
http://v2v.cc/~j/ffmpeg2theora/
Did you try with ffmpeg2theora, I have a really bad time with ffmpeg before I found ffmpeg2theora!!, no audio problems, no video problems.
Just need to write:
It comes compiled for many platforms (don't need to build and compile like ffmpeg), I'm using it under OSX 64 bit and linux 64 bit.
http://v2v.cc/~j/ffmpeg2theora/