RIM proprietary video format (RIMM streaming file)

The RIM proprietary video format consists of a header, a list of frames, and a footer. When parsing this file, all values of type int or short are little-endian.

Header

Field

Value

Size

ID tag

RIMM

4 B

version

0

3 B

descriptor location

  • 0 if recording to a file
  • 1 if recording to a stream

1 B

descriptor

descriptor values

  • 75 B if recording to a file
  • 0 B if recording to a stream

Frames

Field

Value

Size

stream type

  • 0 if this is a frame of audio
  • 1 if this is a frame of video

1 B

key frame

  • 1 if this is a key frame
  • 0 otherwise

1 b

config frame

  • 1 if this is a config frame
  • 0 otherwise

1 b

size

frame size, in bytes

30 b

duration

length of video, in milliseconds

2 B

data

the actual frame data

<size> B

stream type

  • 0 if this is a frame of audio
  • 1 if this is a frame of video

1 B

key frame

  • 1 if this is a key frame
  • 0 otherwise

1 b

config frame

  • 1 if this is a config frame
  • 0 otherwise

1 b

size

frame size, in bytes

30 b

duration

length of video, in milliseconds

2 B

Note: The key frame, config frame, and size fields are stored in one 32-bit int with the key frame and config frame fields stored in the first two bits.

Footer

Field

Value

Size

Descriptor

descriptor values

  • 75 bytes if recording to a stream
  • 0 bytes if recording to a file

Descriptor

Field

Value

Size

audio frames

number of audio frames

4 B

video frames

number of video frames

4 B

audio key frames

number of audio key frames

4 B

video key frames

number of video key frames

4 B

audio frame rates

number of audio frame rates (number of frame rate changes + 1)

4 B

video frame rates

number of video frame rates (number of frame rate changes + 1)

4 B

audio size

size of audio stream in bytes

4 B

video size

size of video stream in bytes

4 B

video frame rate

the initial video frame rate, in frames per second

4 B

video max frame size

size of largest video frame, in bytes

4 B

audio duration

length of audio stream, in milliseconds

4 B

video duration

length of video stream, in milliseconds

4 B

RESERVED

undefined

20 B

width

the width of the video, in pixels

2 B

height

the height of the video, in pixels

2 B

video codec

  • 2 if this video codec is mpeg4
  • 5 if this video codec is H.263
  • 6 if this video codec is H.264

2 B

audio codec

  • 0 if this audio codec is PCM
  • 7 if this audio codec is AMR
  • 0xA if this audio codec is AAC

1 B


Was this information helpful? Send us your comments.