reading and writing hex (reading a quicktime file)

Find out why the . goes before the /

Moderator: Paul Tuersley

Post Reply
cardeiro
Posts: 31
Joined: March 27th, 2006, 2:03 pm
Location: philadelphia, PA
Contact:

Hi

I am trying to "read" a quicktime file...not play it but actually read the raw data contained in the file. The file appears to be written in hex, I am able to look at it with a hex editor, but whenever I try to read it with a script, I am not able to get any useable data from the reads.

Any idea if it is possible to read and write hex. I tried changing the file encoding to BINARY, but the docs on file encoding are sparse to say the least. Any ideas?

Mike Cardeiro
vidpat
Posts: 86
Joined: October 21st, 2004, 12:36 am
Location: Phoenix, AZ
Contact:

The file is probably binary. It is just represented in hex for convenience by the hex editor. Setting the mode to binary when opening the file, and the encoding property when writing, should do what you need it to do.

Of course, you'll have to know how the binary data should be interpreted and the byte offsets for the fields you want. You can then read in the appropriate bytes to obtain a value.
Post Reply