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.

demultiplexing Electronic Arts TGV videos

Featured Replies

  • Author
  • Localization

AlphaTwentyThree, posted Wed Apr 01, 2015 10:33 am (4283)


Hi fellows!
I've just written a script to extract the audio stream from those 90s TGV vides from EA. Everything works fine but the documentation of the audio format isn't clear enough to me: http://wiki.multimedia.cx/index.php?tit ... _Arts_1SNx. I suppose that the format doesn't require the 1SNd header (8 bytes) but then, why is it stated in the headlines in the article? I've tested both versions but obviously I don't know which extension to use for vgmstream to play these files.
Now, here are some TGV samples: http://*USE_ANOTHER_FILEHOSTING*/01d608f ... a98/TGV.7z
And here's my script:
Code:
idstring "1SNh"
get SIZE_HEADER long # audio header
savepos OFFSET
math SIZE_HEADER -= 8
append
log MEMORY_FILE OFFSET SIZE_HEADER
append
math OFFSET = SIZE_HEADER
for i = 1
   goto OFFSET
   getDstring IDENT 3
   get MARKER byte
   get SIZE long
   savepos OFFSET
   math SIZE -= 8
   if IDENT == "1SN"
      append
      log MEMORY_FILE OFFSET SIZE
      append
   endif
   if MARKER == 0x65
      callfunction wrapup 1
   endif
   math OFFSET = SIZE
next i
startfunction wrapup
   get SIZE asize MEMORY_FILE
   get NAME basename
   string NAME = ".aud"
   log NAME 0 SIZE MEMORY_FILE
   cleanexit
endfunction

This version of the script writes the audio data with the "EACS" header and the plain data without the block headers. Does anyone know which extension I'll have to use to play these files?

Thanks for your help!
  • Author
  • Localization

AlphaTwentyThree, posted Wed Apr 01, 2015 11:16 am (4286)


The documentation from above shows that my alternative extraction is correct.

Here's my second script. Everythig should be fine but the file isn't playable or decodable with anything I have.
Code:
idstring "1SNh"
get SIZE_HEADER long # audio header
append
log MEMORY_FILE 0 SIZE_HEADER
append
math OFFSET = SIZE_HEADER
for i = 1
   goto OFFSET
   getDstring IDENT 3
   get MARKER byte
   get SIZE long
   if IDENT == "1SN"
      append
      log MEMORY_FILE OFFSET SIZE
      append
   endif
   if MARKER == 0x65
      callfunction wrapup 1
   endif
   math OFFSET = SIZE
next i
startfunction wrapup
   get SIZE asize MEMORY_FILE
   get NAME basename
   string NAME = ".as4"
   log NAME 0 SIZE MEMORY_FILE
   cleanexit
endfunction

Can somebody check if the resulting audio file is consistent with the documentation? That would be great! :)
  • Author
  • Localization

AlphaTwentyThree, posted Wed Apr 01, 2015 11:20 am (4287)


Can somebody check if ffmpeg can decode these as4 files?
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.