View Single Post
Old 18th January 2008, 06:12   #566  |  Link
squid_80
Registered User
 
Join Date: Dec 2004
Location: Melbourne, AU
Posts: 1,963
Quote:
Originally Posted by Honeyko View Post
On the off chance you've already done this, could you help save me some time and tell me what to look for in what part of the file?

(Have hex-editor, and ready to hack....)
OK. I'll only describe how to do it for a file using one of the pre-defined PARs, Moitah's already explained why it's a lot tougher if you want to go from predefined->custom or back again so I won't do that (we'd be here all day, the program is a lot quicker).

To start with, search for the first occurrence of (hex) 00000120. That's the VOL start code. Directly after that there's a byte that you don't need to change, just remember its value (in my case it's 0x08). Bits 5-2 in the next byte describe the PAR. The file I'm looking at right now has 0x96 at this byte. In binary this is 10010110, bits 5-2 = 0101 = 5. This stands for 16:9 NTSC, or a PAR of 40:33. Here's the full table:
(1)0001 = 1:1
(2)0010 = 12:11 (4:3 pal)
(3)0011 = 10:11 (4:3 ntsc)
(4)0100 = 16:11 (16:9 pal)
(5)0101 = 40:33 (16:9 ntsc)
(15)1111 = custom
So if I wanted to change the PAR to 12:11, I need to change those four bits to 0010. Which makes the new whole byte 10001010 = 0x8A.
From here you use the hex editor to do a search/replace on all the VOL headers. In this case I'd search for (in hex):
00 00 01 20 08 96 87 FF FB (take the next few bytes as well for good measure)
and replace with
00 00 01 20 08 8A 87 FF FB
If your hex editor reports how many occurrences were replaced it should be equal to the number of I-frames in the file since there's a VOL header stored at each one.
squid_80 is offline   Reply With Quote