RIFFPad – RIFF File Viewer
RIFFPad is a viewer (some day to have editing capabilities) for RIFF formatted files. It is a bit rough but I’ve found it to be very useful when working with RIFF files. Common RIFF files are things like WAV, AVI, DirectX resources as well as many Mac file formats.
The RIFF format is a very useful standard binary file format that has been around for a long time and has undergone very little change. In general a RIFF file is a file that is internally made up of ‘chunks’ that have a chunk id, a length and a blob of data. The chunk id is 4 letters encoded into 32 bits. The chunk id types are typically unique to the file type if lower case and globally standardized if upper case.
I�ve run into RIFF files in a number of places that needed decoding. This is a generic utility for viewing the contents of these files.
Users of RIFF file format:
- AIF format, used to store audio on Apple platforms is based on a (little endian) variation of RIFF (*.aif,*.aiff)
- Several Microsoft formats are based on RIFF. (*.wav,*.avi)
- Electronic Arts resource files used in some games. (*.enu) (ie. Ultima Online)
- PNG format image files (*.png and *.mng)
- Color Palette files (*.pal)
- DirectX Media Files (*.cdm;*.dls;*.ffe;*.sgt;*.sty;*.tpl)
- Real Media Files (*rm)
Download:
|
Links:
FourCC – A good site for general ‘chunk’ format files.
Just released ver 0.6 with some minors changes.
1. Added a description block for some AVI chunks. RIFF, LIST, FORM, strh and avih
2. Correctly decode PNG and MNG format files.
3. Support for RM type files
4. Progress indicator for loading files with many nodes/chunks.
Comment by admin — February 16, 2007 @ 10:25 am
Why all right-click menu on tree view disabled? Does work yet or I do something wrong?
Comment by Anton — November 21, 2007 @ 10:49 am
Riffpad is a handy tool but it does not seem to support the OpenDML RIFF:size:AVIX extension for large AVI files. The tree only seems to display the first (RIFF:size:AVI) structure.
Any chance of an update to display the AVIX structures?
Comment by Richard — June 4, 2009 @ 11:40 am
Thats a good point i’ll look up the specs on that. I was wondering how AVI files overcame the 32 bit barrier. a 2G video is pretty big but not unheard of.
http://www.the-labs.com/Video/odmlff2-avidef.pdf
Comment by admin — June 4, 2009 @ 1:07 pm
Thanks, that’s great. It’s mentioned in the OpenDML spec document which was created specifically for AVI files > 2GB. It should be easy to find via a web search. Large AVIs can occur quite frequently when for example capturing a whole DV tape to AVI, so this fix would be great.
A couple of more points:
In the strf structure for audio, you have the last element as “Bits Per Sample” instead of the structure name “dwBitsPerSample” that you use for the other elements.
Also, some files have a Tdat list element which looks like this in a hex dump of the file:
0150 00 00 02 d0 4c 49 53 54 98 00 00 00 54 64 61 74 …ÐLIST….Tdat
0160 74 63 5f 4f 12 00 00 00 00 41 0c 09 00 f9 f3 1b tc_O…..A…ùó.
0170 63 52 cc 05 70 f9 f3 1b 00 00 74 63 5f 41 12 00 cRÌ.pùó…tc_A..
0180 00 00 00 1c d8 05 b0 f8 f3 1b d8 cf d9 05 00 00 ….Ø.°øó.ØÏÙ…
0190 00 00 00 00 72 6e 5f 4f 28 00 00 00 00 a6 cb 19 ….rn_O(….¦Ë.
01a0 61 1c d8 05 a0 f8 f3 1b 88 f9 f3 1b 00 00 00 00 a.Ø. øó..ùó…..
01b0 0f 00 00 00 f8 f8 f3 1b 00 3f d8 05 c0 71 da 05 ….øøó..?Ø.ÀqÚ.
01c0 b8 10 31 12 72 6e 5f 41 28 00 00 00 00 5d cc 19 ¸.1.rn_A(….]Ì.
01d0 14 75 cc 19 90 5d cc 19 97 d5 d8 05 00 00 00 00 .uÌ..]Ì..ÕØ…..
01e0 0f 00 00 00 08 a6 cb 19 00 1c d8 05 b0 f8 f3 1b …..¦Ë…Ø.°øó.
01f0 d8 cf d9 05 4a 55 4e 51 34 06 00 00 00 00 00 00 ØÏÙ.JUNQ4…….
but riffpad doesn’t show it properly:
LIST Tdat – (len=152, off=352)
|
+– – len=18, off=360
|
+– – len=18, off=386
and so on…..
It should read:
LIST Tdat – (len=152, off=352)
|
+–tc_O – len=18, off=360
|
+–tc_A – len=18, off=386
and so on…
Comment by Richard — June 8, 2009 @ 5:30 am
Sorry the formatting of that last post seemed to have got screwed up. The tree structire below “but riffpad doesn’t show it properly:” should have the word “junk” followed by 4 hex values. This should be displayed in riffpad with the chunk names “tc_0”, “tc_A” and so on.
Comment by Richard — June 8, 2009 @ 5:33 am
I just updated to RiffPad 7.2. It has experimental support for AVIX format AVI files. That is it will allow multiple RIFF headers in the same file. It has the effect of allowing RIFF files greater than 2G.
If anyone has problems with it, just send me a message and maybe even a test file that is having problems and I’ll fix it.
Comment by admin — June 11, 2009 @ 10:22 am
Thanks for your work on that. The AVIX’s seem to be displayed fine now.
But the tc_O and similar chunk names seem be displaying a question mark instead of underscore – e.g. “tcXO” where X is a question mark (I’ve avoided using a literal question mark as I think that may be what messed up the formatting in an earlier post).
Also, I’m not sure what the JUNK, dmlh and Tdat display on the right is supposed to be telling me. I was expecting to see a hex dump for data which riffpad does not understand, but it just seems to display like this:
0000:
0001:
0002:
0003:
0004:
0005:
0006:
0007:
0008:
0009:
0010:
0011:
and so on. The count doesn’t seems to correspond to the chunk length either. For example a JUNK chunk of length 272 goes up to “0168:”. I’m a bit mystified.
Comment by Richard — June 12, 2009 @ 5:15 pm
This one seems to be the best RIFF-viewer I’ve seen so far, nice work. For the sake of completeness 😉 it would also make sense to support the ‘RF64’ extension to allow >4GB WAVE files.
The specification itself (from EBU):
http://tech.ebu.ch/docs/tech/tech3306-2009.pdf
A program which generates test files can be found here:
http://www.davidsystems.com/en/news/news-detail/browse/2/article/8/david-systems-offers-rf64-generator-for-free/
Comment by claes — July 20, 2009 @ 11:00 am
It would be nice if it also supported RIFX, which is the big-endian version of RIFF (which is little-endian).
Comment by BW — January 30, 2010 @ 10:16 pm
Hello, i hope you can give me a hand here. I recovered some files from a MAC formated drive I had poop out on me. It had Protools ercording sessions on it and nothing else. Instead of .WAV files I know have .RIFF files. Can I convert these to WAV or AIFF so that I can put my session back together? any help would be useful. Thanks
Ben
Comment by ben — May 13, 2010 @ 8:13 pm
Hello, i hope you can give me a hand here. I recovered some files from a MAC formated drive I had poop out on me. It had Protools ercording sessions on it and nothing else. Instead of .WAV files I know have .RIFF files. Can I convert these to WAV or AIFF so that I can put my session back together? any help would be useful. Thanks very much
Ben
Comment by ben — May 13, 2010 @ 8:14 pm
[VEG-1809] AVI no longer writes valid OpenDML 2.0 AVI RIFF for files greater than 1GB…
Create a project long enough so that the rendered AVI file is greater than 1GB. My project was 1920×1080 23.976p, 00:00:18:01 long. I rendered using the matching template “HD 1080-24p YUV”. Starting at file offset 0x3feafc0c there should be t……
Trackback by JIRA: Vegas Pro — June 2, 2010 @ 1:59 pm
–Ben– You didnt leave any contact info. send me a message at menasoft.com (dennis@) and i think i might be able to get a converter for you. Soundpad used to do that sort of thing. ITs a bit out of date but i might be able to get it to work.
Comment by admin — June 2, 2010 @ 6:10 pm
What about RIFX files? I believe they’re the big endian version of RIFF files. I get a “The File does not have a RIFF header” message.
I’m trying to get a better look at a really old (1992?) .dir file (used by Macromind Director)
Comment by F — August 21, 2010 @ 10:07 pm
yeah i know the Mac AIFF files are big endian as well. If you send me a sample of a file i can make it work.
Comment by admin — August 22, 2010 @ 11:25 am
Will you release part of the source code for this? I’ve been looking for a project that parses binary data in a hexadecimal view like yours does.
Comment by Rainbow Mods — January 2, 2013 @ 5:11 pm
I can do that. I forget where I got that part but I can certainly make it available.
Comment by admin — January 9, 2013 @ 10:40 am
Thanks for this utility! I used it to figure out what values I’d changed in an .avi file to make some half-speed audio play correctly. (Turns out I’d tweaked the nSamplesPerSec and nBlockAlign.) It also helped me figure out that I should probably put nBlockAlign back and change dwRate instead!
Comment by ReverendTed — February 27, 2014 @ 11:54 pm
I just wanted to say thank you 🙂
wish you updated this to allow the option of, say, delete the data the tool percieves as junk but oh well 😀
Comment by Domenico — May 2, 2014 @ 4:09 am
cool little program!
if you ever update it since it’s looks like it’s been a while can we please get an option to…
1. remove line numbers in iXML
2. Copying ability so we can copy info in RiffPad and paste it elsewhere.
we’d actually be interested in paying you for a few small additions if you are down.
email me if interested! 8)
thx!
Steve
Comment by Steve — July 13, 2014 @ 11:29 pm
If you get an error related to the Windows SxS configuration, then you probably need the VC++ 2005 runtime. Google for the VC++ 2005 redistributable package from Microsoft matching either the 32-bit or x64 version of RIFFPad that you downloaded.
Comment by Ethan T — December 8, 2015 @ 10:15 am
I’ve been trying to use the tool on some large files, but it hangs building the tree. the files are 1+ GB in size. Has anyone else seen this?
If you’re not updating this anymore, but would be willing to share the code, I’d take a look and see if I can figure out what is going on.
Dan
Comment by Dan Hinsley — February 29, 2016 @ 6:23 pm
Hmmm, I downloaded the 32 bit version (I’m running Win 7 64 bit) and that seemed to work better. But if I switched the focus away from the window, it still hung.
Dan
Comment by Dan Hinsley — February 29, 2016 @ 6:47 pm
Hey Dan. I dont use it that much these days but i’ll try to fix it if you can give me some feedback. What sort of files are you trying to open ? i’ve tried some really large files > 3G with the 64 bit version and it seems ok. I’ll re-test just to be sure.
It seems to work on a 5G AVI file. It does take about a minute to load. There is a progress counter at the bottom to show you its not dead. Can you try version 0.73 (64 bit) ?
Comment by admin — March 1, 2016 @ 10:00 am
I downloaded from the link above (the 32 bit version, since I don’t see to have the VC++ files for this) and it says it’s v0.72. Is there a link for 0.73 (or is just the 64 bit 00.73?). I can download and install the VC++ redist if you think that’s the issue. The really bizarre part is that if I don’t shift the focus away from the window while it’s building the tree, it works fine. But if I shift the focus to another window, it immediately freezes with no more progress in the status bar.
I’m a developer, so if you want some troubleshooting done, just let me know.
Dan
Comment by Dan Hinsley — March 2, 2016 @ 11:29 am
This is a great light weight tool that does exactly what I needed.
Thanks
Comment by Chris Saam — November 15, 2016 @ 2:27 pm
Nice tool.. thank you,.
Comment by suresh — February 7, 2017 @ 2:45 am
[…] found a nice tool called RiffPad to inspect the Wave form audio data. You can load an audio file in this editor and can view teh […]
Pingback by WaveForm File Format — March 3, 2017 @ 7:50 am
It was an amazing program…Is there any commandline version to extract particular tab?
Comment by Johnson — April 25, 2020 @ 2:10 pm
What is SxS displayed next to A/V chunks? Have a file with those, and can’t find any spec referencing those.
Comment by Alex — May 22, 2020 @ 12:50 pm
Sorry, I don’t recognize the SxS RIFF tag. But typically I’ve seen SxS stand for “Side by Side†and usually used in the context of error codes. For instance HRESULT_WIN32_C(ERROR_SXS_XML_E_MISSINGROOT).
Since they are all 8 bytes long they might be errors codes?
Although my first guess is that they are indexes of some sort. I don’t have any example AVI files handy that have those tags.
Do the contained values seem to be sequential or do they seem to have some other pattern ?
How are they causing a problem for you? are they badly formatted RIFF or just extraneous. Can they just be ignored ?
Comment by admin — May 23, 2020 @ 9:19 am
This is a wonderful tool. Thank you so much!
If I may request a small feature addition, when I open a WAV file, in the the tree on the left pane, if I click on the node for the WAV file as a whole, or if I click on the ‘fmt’ part of the header, I see some useful information on the right pane that I could like to copy-paste, extract, and analyze in another program. However, there currently doesn’t seem to be any way to do that. I can select inside the right pane for the ‘data’ node, but not for these other two. And right-clicking a node in the tree in the left pane doesn’t work either since every right-click menu option is greyed out. (See also Comment #2 above by Anton, November 21, 2007.)
Comment by Aaron — July 31, 2020 @ 10:32 am
Good point. I can add that. I havnt made any changes to this code in a while , but i can make that. I should have a new version in the next 2 weeks. Vacation, and other works slowing me down of course.
Comment by admin — July 31, 2020 @ 11:10 pm
This is a Great tool, kudos to the creator. It was very useful analyzing RIFF AVI 🙂
Comment by Antonio Perez — March 22, 2021 @ 10:00 pm
Version 0.73 interprets the data chunk size as a signed number, causing it to crash for 0xffffffff
Comment by Guest — April 6, 2022 @ 1:39 pm
Would you consider open sourcing or sharing the code for this project?
Comment by John Hart — June 10, 2022 @ 3:07 pm