Engineer AlphaTwentyThree Posted February 29 Engineer Share Posted February 29 (edited) Just wrote a quick-n-dirty audio extractor for this video format. I'm unfamiliar with the resulting audio format, but I can make out snippets when imported as 8bit unsigned PCM, so it has to be some PCM derivative. Somehow the character distribution looks familiar, but I can't recall what it belongs to. Maybe Yamaha? What's off-putting is that list at the end of these: Also, those san movies have a strange header section before the first frame that I can't see what type of data it even holds: I've attached two samples and the raw audio extraction script. Any help is welcome. san.7z Edited February 29 by AlphaTwentyThree Link to comment Share on other sites More sharing options...
Puterboy1 Posted February 29 Share Posted February 29 I think SAN also applies to Star Wars: Making Magic CD-ROM. Link to comment Share on other sites More sharing options...
Engineer AlphaTwentyThree Posted March 10 Author Engineer Share Posted March 10 Huh, really nobody? Quite a surprise to me actually if I'm being honest, given that those games are 20+ years old already. You would think that the format is well-known by now. 🤔 Link to comment Share on other sites More sharing options...
DKDave Posted March 12 Share Posted March 12 On 3/10/2024 at 8:38 AM, AlphaTwentyThree said: Huh, really nobody? Quite a surprise to me actually if I'm being honest, given that those games are 20+ years old already. You would think that the format is well-known by now. 🤔 Yeah, the format is known. It has some slight compression/encoding, but there doesn't seem to be any decoders I could find. I've been experimenting with writing my own. Still not complete yet, but here's a example of some decoded audio so far. It sounds correct, but I need to do some more testing.  refintro.zip 1 Link to comment Share on other sites More sharing options...
Engineer AlphaTwentyThree Posted March 13 Author Engineer Share Posted March 13 Oh, didn't know it's actually its own format, I thought I've seen the .san extension in multiple games over the decades. Thanks a lot for your work on this, pretty nifty! Dumb question: if you get it working safely, wouldn't it also be pretty easy to add to vgmstream? 🤔 Also, I'd be interested in hearing if my script correctly pulls out the audio since that might be used as a basis to play the movie's audio natively as well as for playing the non-demuxed videos (like with bik and thp). Link to comment Share on other sites More sharing options...
DKDave Posted March 13 Share Posted March 13 It's not really it's own audio format, just part of the SAN videos, so I'm not sure if they would add it to Vgmstream. For IACT, it's just PCM16 with some slight encoding, so I've just saved them as .wav files. I don't think there's a header you can put on the raw encoded data to make it play, not that I've found. To pull out the initial audio, it combines all of the IACT blocks first - there are 0x1a bytes of header and then the audio block data in each IACT chunk. It's odd because some of these audio blocks start in one IACT chunk and continue in the next. I've attached my Python script for this one. It works on all of the Droidworks SAN files. There are other games with these SAN files that use different audio types, so I might add support for those as well.   san.zip 1 Link to comment Share on other sites More sharing options...
Puterboy1 Posted March 15 Share Posted March 15 Now for a Python script that can decode AFC files. Link to comment Share on other sites More sharing options...
Engineer AlphaTwentyThree Posted March 17 Author Engineer Share Posted March 17 On 3/13/2024 at 8:41 PM, DKDave said: It's not really it's own audio format, just part of the SAN videos, so I'm not sure if they would add it to Vgmstream. For IACT, it's just PCM16 with some slight encoding, so I've just saved them as .wav files. I don't think there's a header you can put on the raw encoded data to make it play, not that I've found. To pull out the initial audio, it combines all of the IACT blocks first - there are 0x1a bytes of header and then the audio block data in each IACT chunk. It's odd because some of these audio blocks start in one IACT chunk and continue in the next. I've attached my Python script for this one. It works on all of the Droidworks SAN files. There are other games with these SAN files that use different audio types, so I might add support for those as well.   san.zip 1.44 kB · 2 downloads This is pretty amazing I have to say, thanks a lot! If you take a look at what my script does, how would that need to change to properly "demux" san videos? What I'm thinking about doing: get the demuxer to a state where it includes all the data from the SAN files needed to decode the audio, i.e. kind of the "pure" audio data check other SAN files and potentially expand the demuxer when enough variants are gathered, suggest support to be added for vgmstream with the nice information you already gathered Looking at older formats like THP, those "demuxers" just remove the video portion from the file and leave the extension as is for a decoder (or player) to work with them. The issue is that I'm completely unfamiliar with Python (yet), so I'm pretty lost in any code. If you still have the motivation, I'd be happy to get a quick run-down of the format so I can adjust my demuxer accordingly. The goal would be a SAN file that only includes the audio data, so it makes sense to just keep the IACT headers intact I guess. Happy to get a DM here or if you contact me on Discord (`alpha_twentythree`) Link to comment Share on other sites More sharing options...
Puterboy1 Posted August 13 Share Posted August 13 Have you tried working this with vgmstream? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now