t@b RIFF/AVI/MOV dump utility (linux,osx,windows)


this command line utility does scan and dump out the structure of a RIFF file. i use it primarily to figure out the AVI codec fourCC's of a video stream. i also have used it frequently to get detail information on avi header and wave header structures within avi files.

this utility has also taught me about the structure of ms wave files (*.wav), about sound fonts (*.sf2) and other file types which use the RIFF format for "packaging"

In Practice:

type at the command prompt: tabriffdump filename

Download:

linux tar.gz file
osx tar.gz file
win32 zip file

tabriffdump: copyright (c) 2004, t@b software. written by andy flinn.

sample tabriffdump output

sample output from "tabriffdump my.avi"

Notes

  • the first five blocks in the below listing represent avi file header, avi video stream header, video stream format, audio stream header, and audio stream format followed by an few blocks of the file index.
  • the riff structure at the bottom will use indents to show hierarchy...

structure size=56 (0x00000038)
dwMicroSecPerFrame=33333 (0x00008235)
dwMaxBytesPerSec=9523200 (0x00915000)
dwPaddingGranularity=0 (0x00000000)
dwFlags=2064 (0x00000810)
(HASINDEX TRUSTCKTYPE)
dwTotalFrames=1975 (0x000007b7)
dwInitialFrames=0 (0x00000000)
dwStreams=2 (0x00000002)
dwSuggestedBufferSize=311040 (0x0004bf00)
dwWidth=360 (0x00000168)
dwHeight=288 (0x00000120)
dwReserved0=0 (0x00000000)
dwReserved1=0 (0x00000000)
dwReserved2=0 (0x00000000)
dwReserved3=0 (0x00000000)

structure size=56 (0x00000038)
fccType=1935960438 (0x73646976)
fccType=v,i,d,s
fccHandler=1196444237 (0x47504a4d)
fccHandler=M,J,P,G
dwFlags=0 (0x00000000)
wPriority=0 (0x00000000)
wLanguage=0 (0x00000000)
dwInitialFrames=0 (0x00000000)
dwScale=1 (0x00000001)
dwRate=30 (0x0000001e)
dwStart=0 (0x00000000)
dwLength=1975 (0x000007b7)
dwSuggestedBufferSize=311040 (0x0004bf00)
dwQuality=0 (0x00000000)
dwSampleSize=0 (0x00000000)
left=0 (0x00000000)
top=0 (0x00000000)
right=360 (0x00000168)
bottom=288 (0x00000120)

structure size=56 (0x00000038)
StructSize=40 (0x00000028)
ImageWidth=360 (0x00000168)
ImageHeight=288 (0x00000120)
PlaneCount=1 (0x00000001)
BitCount=24 (0x00000018)
Compression=1196444237 (0x47504a4d)
Compression=M,J,P,G
ImageSize=311040 (0x0004bf00)
Junk1=0 (0x00000000)
Junk2=0 (0x00000000)
PaletteSize=0 (0x00000000)
Junk3=0 (0x00000000)
RedMask=0 (0x00000000)
GreenMask=0 (0x00000000)
BlueMask=0 (0x00000000)
AlphaMask=0 (0x00000000)

structure size=56 (0x00000038)
fccType=1935963489 (0x73647561)
fccType=a,u,d,s
fccHandler=0 (0x00000000)
dwFlags=0 (0x00000000)
wPriority=0 (0x00000000)
wLanguage=0 (0x00000000)
dwInitialFrames=0 (0x00000000)
dwScale=4 (0x00000004)
dwRate=192000 (0x0002ee00)
dwStart=0 (0x00000000)
dwLength=3160733 (0x00303a9d)
dwSuggestedBufferSize=192000 (0x0002ee00)
dwQuality=0 (0x00000000)
dwSampleSize=4 (0x00000004)
left=0 (0x00000000)
top=0 (0x00000000)
right=0 (0x00000000)
bottom=0 (0x00000000)

structure size=18 (0x00000012)
wFormatTag=1 (0x00000001)
nChannels=2 (0x00000002)
nSamplesPerSec=48000 (0x0000bb80)
nAvgBytesPerSec=192000 (0x0002ee00)
nBlockAlign=4 (0x00000004)
wBitsPerSample=16 (0x00000010)
cbSize=18 (0x00000012)

skipping contents of 'LIST' 'movi'

structure size=16 (0x00000010)
dwChunkId=1667510320 (0x63643030)
dwChunkId=0,0,d,c
dwFlags=16 (0x00000010)
(AVIIF_KEYFRAME)
dwOffset=4 (0x00000004)
dwSize=16519 (0x00004087)

structure size=16 (0x00000010)
dwChunkId=1651978544 (0x62773130)
dwChunkId=0,1,w,b
dwFlags=16 (0x00000010)
(AVIIF_KEYFRAME)
dwOffset=16532 (0x00004094)
dwSize=6400 (0x00001900)

structure size=16 (0x00000010)
dwChunkId=1667510320 (0x63643030)
dwChunkId=0,0,d,c
dwFlags=16 (0x00000010)
(AVIIF_KEYFRAME)
dwOffset=22940 (0x0000599c)
dwSize=16409 (0x00004019)

structure size=16 (0x00000010)
dwChunkId=1651978544 (0x62773130)
dwChunkId=0,1,w,b
dwFlags=16 (0x00000010)
(AVIIF_KEYFRAME)
dwOffset=39358 (0x000099be)
dwSize=6400 (0x00001900)

structure size=16 (0x00000010)
dwChunkId=1667510320 (0x63643030)
dwChunkId=0,0,d,c
dwFlags=16 (0x00000010)
(AVIIF_KEYFRAME)
dwOffset=45766 (0x0000b2c6)
dwSize=16409 (0x00004019)

structure size=16 (0x00000010)
dwChunkId=1651978544 (0x62773130)
dwChunkId=0,1,w,b
dwFlags=16 (0x00000010)
(AVIIF_KEYFRAME)
dwOffset=62184 (0x0000f2e8)
dwSize=6400 (0x00001900)

RIFF size=45369688
AVI
LIST size=330
hdrl
avih size=56
LIST size=134
strl
strh size=56
strf size=40
strn size=10
LIST size=112
strl
strh size=56
strf size=18
strn size=10
LIST size=45306130
movi
00dc size=16520
01wb size=6400
00dc size=16410
01wb size=6400
00dc size=16410
01wb size=6400
00dc size=16508
01wb size=6400
00dc size=16448
01wb size=6400
00dc size=16484
01wb size=6400
00dc size=16494
01wb size=6400
00dc size=16560
01wb size=6400
00dc size=16560
01wb size=6400
00dc size=16560
idx1 size=63200

now dumps .mov and .sf2 files

now dumps .mov and .sf2 files.

the version at devel.zs4.net (as of v0.939) now will dump structures for mov (apply movie) and sf2 (sound font) files.