开发者

Decoding RIMM streaming file format

I want to decode the video (visual) frames within a Blackberry RIMM file. So 开发者_Go百科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.


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


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:

ffmpeg2theora video.[mov, avi, mp4, vob, etc] -> get a video.ogv

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/

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜