Infogrames *.VID (PS2)

Codecs, formats, encoding/decoding of game audio, video and music
JackTheRipper
Posts: 51
Joined: Mon Jan 10, 2022 12:12 am

Infogrames *.VID (PS2)

Post by JackTheRipper »

Seen in earlier Infogrames developed games for PS2.

Example game used: Superman

Possible width: 0x128 and Possible height: 0x12c

Sample: atari.vid
BloodRaynare
Posts: 367
Joined: Fri Mar 10, 2017 7:23 am

Re: Infogrames *.VID (PS2)

Post by BloodRaynare »

Here's the BMS script to demux the VID files:

Code: Select all

get NAME basename

math BLK_SIZE = 0x4000
xmath BLK_SIZE2 "BLK_SIZE - 0x10"

string VID_TRK p "%s.m2v" NAME
string AUD_TRK_L p "%s_L.vag" NAME
string AUD_TRK_R p "%s_R.vag" NAME

goto 0x100
get START_OFF long
goto 0x11c
get VID_SIZE long
goto START_OFF

append
for i = 0
   savepos BLK_POS
   get ID long
   get TYPE long
   math BLK_POS_TMP = BLK_POS
   math BLK_POS_TMP + 0x10
   if TYPE == 0x02
      log AUD_TRK_L BLK_POS_TMP BLK_SIZE2
   elif TYPE == 0x03
      log AUD_TRK_R BLK_POS_TMP BLK_SIZE2
   elif TYPE == 0x01
      log VID_TRK BLK_POS_TMP BLK_SIZE2
   endif
   math BLK_POS + BLK_SIZE
   if BLK_POS >= VID_SIZE
      break
   endif
   goto BLK_POS
next i
append


Unfortunately, the audio tracks was split into two mono files for left and right channels. Use this TXTH script to play the audio tracks:

Code: Select all

.vag.txth

codec = PSX
channels = 1
sample_rate = 44100
num_samples = data_size


Latest build of vgmstream should recognize the splitted audio based on the filenames and will automatically play both files as one stereo audio.