TAGS :Viewed: 4 - Published at: a few seconds ago

[ Can I store arbitrary text information in a .avi file? ]

I would like to add some test annotations (xml file) into an avi file as food for a later program that will process it. Is this done/doable ... ideally like a c# library to help me access and read/write the avis.

?

Answer 1


The AVI structure is not hard to understand at all. It follows the RIFF structure (same as .wav files). It does actually allow you to define arbitrary data streams. You may have to re-construct the file, but it's not that hard to do.

http://en.wikipedia.org/wiki/Resource_Interchange_File_Format

Just note, that if you use a non-standard RIFF chunk, other programs may not be happy with it.

That being said, I'd just put a .xml file into the same directory as your .avi file. But perhaps that won't work for your needs.

Answer 2


If you can guarantee that the file will stay on an NTFS volume, you could store the metadata in an Alternate Data Stream

Don't do this if the file will be sent over the internet, as it's unlikely to pull the ADS with it.