Skip to content
View in the app

A better way to browse. Learn more.

ResHax

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
Help us keep the site running.

Infogrames *.VID (PS2)

Featured Replies

  • Author
  • Localization

JackTheRipper, posted Mon Jan 10, 2022 9:20 am (68965)


Seen in earlier Infogrames developed games for PS2.

Example game used: Superman

Possible width: 0x128 and Possible height: 0x12c

Sample: atari.vid
  • Author
  • Localization

BloodRaynare, posted Mon Jan 10, 2022 12:37 pm (68972)


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

Code:
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:
.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.
  • Author
  • Localization

rubinho146, posted Mon Feb 20, 2023 4:09 pm (75496)


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

Code:
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:
.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.



Hey! Is there way for you to make a remux of these VID files? Would be awesome to accomplish some edits regarding translations. Cheers.
  • Author
  • Localization

BloodRaynare, posted Mon Feb 20, 2023 10:49 pm (75501)


rubinho146 wrote:
Hey! Is there way for you to make a remux of these VID files? Would be awesome to accomplish some edits regarding translations. Cheers.


Should be easy, since the sizes of all the chunks are prefixed (0x4000). Unfortunately, I forgot what's the value of ID field and I can't download the example file on this thread anymore.
  • Author
  • Localization

rubinho146, posted Tue Feb 21, 2023 3:02 pm (75515)


BloodRaynare wrote:
rubinho146 wrote:
Hey! Is there way for you to make a remux of these VID files? Would be awesome to accomplish some edits regarding translations. Cheers.


Should be easy, since the sizes of all the chunks are prefixed (0x4000). Unfortunately, I forgot what's the value of ID field and I can't download the example file on this thread anymore.


Hey! I will give you this vid file from the game Wacky Races: Starring Dastardly and Muttley so you can check the ID value. Maybe they are the same(?) Cheers.

https://gofile.io/d/W31hYQ
  • Author
  • Localization

BloodRaynare, posted Tue Feb 21, 2023 9:53 pm (75522)


rubinho146 wrote:

Hey! I will give you this vid file from the game Wacky Races: Starring Dastardly and Muttley so you can check the ID value. Maybe they are the same(?) Cheers.

https://gofile.io/d/W31hYQ


Well, honestly after seeing the inner workings of the VID files again I think BMS script wouldn't cut it for rebuilding the VID files due to QuickBMS partial handling of floating-point numbers, which these files uses for storing info of video length, framerate, and aspect ratio. Looks like I have to learn using python again.

But even then there's another problem with how each chunks are structured. Yes, the sizes of them are constant, but the question is: How and when to stack these chunks correctly?.
If you see the VID files with the hex editor, you can see that sometimes the audio chunks for left/right channel or video chunks appears twice or more, sometimes only once. This is what threw me off.

In short, What I once thought to be easy turns out to be difficult. But anyway I'll try to study the format some more.

EDIT: Oh, I see now. The audio chunks get decreased over time then stays at 2 chunks per channel until the end of it while the total video chunks stays the same (9 chunks = 0x4c000)

EDIT 2: And one more thing, the intro VID audio streams were already in multiple languages and will play the respective audio depending on your console's internal language settings. Unless you want to translate it to outside those provided languages.
  • Author
  • Localization

rubinho146, posted Wed Feb 22, 2023 10:43 am (75537)


BloodRaynare wrote:
rubinho146 wrote:

Hey! I will give you this vid file from the game Wacky Races: Starring Dastardly and Muttley so you can check the ID value. Maybe they are the same(?) Cheers.

https://gofile.io/d/W31hYQ


Well, honestly after seeing the inner workings of the VID files again I think BMS script wouldn't cut it for rebuilding the VID files due to QuickBMS partial handling of floating-point numbers, which these files uses for storing info of video length, framerate, and aspect ratio. Looks like I have to learn using python again.

But even then there's another problem with how each chunks are structured. Yes, the sizes of them are constant, but the question is: How and when to stack these chunks correctly?.
If you see the VID files with the hex editor, you can see that sometimes the audio chunks for left/right channel or video chunks appears twice or more, sometimes only once. This is what threw me off.

In short, What I once thought to be easy turns out to be difficult. But anyway I'll try to study the format some more.

EDIT: Oh, I see now. The audio chunks get decreased over time then stays at 2 chunks per channel until the end of it while the total video chunks stays the same (9 chunks = 0x4c000)

EDIT 2: And one more thing, the intro VID audio streams were already in multiple languages and will play the respective audio depending on your console's internal language settings. Unless you want to translate it to outside those provided languages.


Yeah, it contains various audio files for each language indeed. But my idea is to edit the m2v so I can add subtitles.
Maybe I plan to edit the audio in another time if I plan to fandub the game.

Does it still seem possible to do a remux? Cheers.
  • Author
  • Localization

BloodRaynare, posted Wed Feb 22, 2023 11:40 am (75539)


rubinho146 wrote:
Yeah, it contains various audio files for each language indeed. But my idea is to edit the m2v so I can add subtitles.
Maybe I plan to edit the audio in another time if I plan to fandub the game.

Does it still seem possible to do a remux? Cheers.


It's possible, sort-of. the only obstacles if we going to strictly using BMS language is the floating point numbers. Another programming language is needed.
  • Author
  • Localization

rubinho146, posted Wed Feb 22, 2023 3:21 pm (75542)


BloodRaynare wrote:
rubinho146 wrote:
Yeah, it contains various audio files for each language indeed. But my idea is to edit the m2v so I can add subtitles.
Maybe I plan to edit the audio in another time if I plan to fandub the game.

Does it still seem possible to do a remux? Cheers.


It's possible, sort-of. the only obstacles if we going to strictly using BMS language is the floating point numbers. Another programming language is needed.


Alright, if you need to jump from BMS. Sounds like a tool for this would be the best option.
Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.