Monday, November 20, 2006

Powerwhammo

So... interesting times, my friend...

James had used Powergramo to record the output of the conversation between Avi, Michael and himself --- the making of last week's intended podcast. But the audio got bent out of shape, so he passed on the .ogg file exported by Powergramo to see if anything could be done.

He said the original conversation had been a bit under 40 minutes. And here was this .ogg file lasting 9:36. As I listened, it became clear: about 75% of the audio data was missing.

I asked James if there was any large file in the TMP folder, and he found a .pga file of 33mb --- about the size of the ogg file. But that was a Powergramo file, and apparently was unplayable with anything else. I suspected it was tagged .ogg data, so I asked James to pass it over.

At first, it didn't seem to make sense. Until I saw that where the exported file said "Ogg", the .pga file said "Nff". Where the exported ogg file said "vorbis", the .pga file said "wnschr". Where the exported file said "20030909", the .pga file said "31121818". Ah, so the .pga file was the original ogg data xored with 1h. Very nice. And as for the slightly larger .pga file size, there was a header at the end that said, among other things, "MVOGG [...] Encrypt1.0".

But xoring the whole .pga file with 1h didn't result in a proper .ogg file. So I xored the exported file against the .pga file and found that not all of the .pga file was xored. Only the first and last 20480 bytes (20kb) of the .ogg data were xored with 1h. Simple enough, Smalltalk takes care of that no problem.

Alas... because the, um, "decrypted" file is identical to the .ogg file exported by Powergramo, the data defect still remains. Hence, Powergramo managed to lose 75% of the sound information.

I don't know why this happened. Perhaps it's a known bug, or a known bad interaction with other software... thus, I will not claim anything else. But... "Encrypt1.0"???...

No comments: