ZenHAX
https://zenhax.com/

[REQUEST] Script/program for extracting PS2 VAG files.
https://zenhax.com/viewtopic.php?f=6&t=2299
Page 1 of 3

Author:  AnonBaiter [ Mon Apr 04, 2016 3:38 pm ]
Post subject:  [REQUEST] Script/program for extracting PS2 VAG files.

Short version: Exactly what it says in the title.
Long version: All I need is a quickBMS script or a program that can dump or extract PS2 audio files, be it in VAG, SS2, MIB, MIH+MIB, MST or VSF format from a file that contains them. Maybe detect the sample rate and interleave for each file - kind of like PSound, except it has to be extracted at a raw format.

I'll provide the samples later, but in the meantime you can take a look at these files(rebuild the file using filecutter_rebuilder.bms script):
https://mega.nz/#!xAtQACQJ!ZoEDOgs4RDx7dVbkfrrNP2z1O1V5Z9XWjRFkFYuzLBc
https://mega.nz/#!JdcQnRiI!GeOJDpRXQXXWb5Xu4AyQ1Zn3CKZkEXhus4OdJC7E8V4

Thanks.

Author:  id-daemon [ Tue Apr 05, 2016 3:25 pm ]
Post subject:  Re: [REQUEST] Script/program for extracting PS2 VAG files.

You're asking to write a universal program, handling lots of formats, not an easy task.

Can you at least say, why do you need that?

Author:  AnonBaiter [ Tue Apr 05, 2016 7:01 pm ]
Post subject:  Re: [REQUEST] Script/program for extracting PS2 VAG files.

id-daemon wrote:
Can you at least say, why do you need that?

Because by then I wouldn't have to waste any time to extract the streamed files manually(unless it contains sequenced music data of course).

Author:  aluigi [ Thu Apr 07, 2016 6:16 pm ]
Post subject:  Re: [REQUEST] Script/program for extracting PS2 VAG files.

I guess I understand what you need but recognizing the single vag streams contained in a raw container (maybe by searching the aligned zeroes and the first seconds of silence) gives lot of false positives.
And the situation with channels and interleave is even worst.
Many years ago I tried that on the game The Warriors for PS2 and I had some success for most of the files so I tried to make a sort of "universal tool"... long story short, the tool is no longer indexed on my website due to the various false positives.

Author:  id-daemon [ Fri Apr 08, 2016 3:54 pm ]
Post subject:  Re: [REQUEST] Script/program for extracting PS2 VAG files.

Luigi, can you confirm the situation as I understand it.

Currently there's no tool to extract PS2/PS3 files with VAG codec, just because there are too many different formats in every game. So the only way is to detect everything in HEX editor, and manually extract it through GENH in VGMToolbox?

Am I right?

Author:  AnonBaiter [ Fri Apr 08, 2016 10:15 pm ]
Post subject:  Re: [REQUEST] Script/program for extracting PS2 VAG files.

Yes you are. Thanks for the help.

Author:  aluigi [ Sat Apr 09, 2016 4:29 pm ]
Post subject:  Re: [REQUEST] Script/program for extracting PS2 VAG files.

@id-daemon
Without a header or a constant it's impossible to guess where a raw audio starts and ends, the number of channels and other information (like bits for pcm or interleave for stereo vag or coeff for gamecube adpcm).
So the silence (sequence of zeroes) can be considered the only starting point of raw audio.
It's necessary to have the toc.

Author:  id-daemon [ Sat Apr 09, 2016 5:25 pm ]
Post subject:  Re: [REQUEST] Script/program for extracting PS2 VAG files.

What about PSound? What is it and how does it work?

Author:  AnonBaiter [ Sat Apr 09, 2016 5:39 pm ]
Post subject:  Re: [REQUEST] Script/program for extracting PS2 VAG files.

id-daemon wrote:
What about PSound? What is it and how does it work?

It detects PSX/PS2 files for playback. For more information, see here:
http://www.romhacking.net/utilities/679/

Author:  id-daemon [ Sat Apr 09, 2016 5:53 pm ]
Post subject:  Re: [REQUEST] Script/program for extracting PS2 VAG files.

And how many files can it detect? I've heard sometimes it detects wrong, and its only noise, or distorted sound.

Author:  AnonBaiter [ Sat Apr 09, 2016 6:07 pm ]
Post subject:  Re: [REQUEST] Script/program for extracting PS2 VAG files.

id-daemon wrote:
And how many files can it detect? I've heard sometimes it detects wrong, and its only noise, or distorted sound.

That we have yet to discover. If it's headerless, then it's certainly not going to bring up good results.

Author:  id-daemon [ Sun Apr 10, 2016 8:11 am ]
Post subject:  Re: [REQUEST] Script/program for extracting PS2 VAG files.

Then what do you mean by this:

AnonBaiter wrote:
kind of like PSound, except it has to be extracted at a raw format.

?

Author:  AnonBaiter [ Sun Apr 10, 2016 6:53 pm ]
Post subject:  Re: [REQUEST] Script/program for extracting PS2 VAG files.

id-daemon wrote:
Then what do you mean by this:

AnonBaiter wrote:
kind of like PSound, except it has to be extracted at a raw format.

?

Raw RIFF WAVE format.

Author:  id-daemon [ Sun Apr 10, 2016 7:09 pm ]
Post subject:  Re: [REQUEST] Script/program for extracting PS2 VAG files.

RIFF WAVE is not a raw format. What do you mean?

Author:  AnonBaiter [ Mon Apr 11, 2016 12:47 am ]
Post subject:  Re: [REQUEST] Script/program for extracting PS2 VAG files.

id-daemon wrote:
RIFF WAVE is not a raw format. What do you mean?

What I mean is that I didn't realize I was just mistaking it for an actual streamed format.

Author:  id-daemon [ Mon Apr 11, 2016 5:36 pm ]
Post subject:  Re: [REQUEST] Script/program for extracting PS2 VAG files.

Well, as Luigi said, it is very hard, if not impossible, to automatically detect VAG streams. Sample rate is absolutely impossible to detect, that's not even a question. But maybe there's a way to make some things a little easier.

So can you be more specific, do you need it for music (that is usually stereo), or SFX too? Are you talking about detecting VAG streams inside of a big archive file, whenever it is, or just from an unknown audio container (i.e. file with audio only)?

Because one of examples you provided is a full game archive, and another one is a raw audio container. And none of them has any headers, like VAG, SS2, or anything else.

Author:  AnonBaiter [ Mon Apr 11, 2016 8:04 pm ]
Post subject:  Re: [REQUEST] Script/program for extracting PS2 VAG files.

id-daemon wrote:
So can you be more specific, do you need it for music (that is usually stereo), or SFX too? Are you talking about detecting VAG streams inside of a big archive file, whenever it is, or just from an unknown audio container (i.e. file with audio only)?

Maybe both.

Author:  id-daemon [ Mon Apr 11, 2016 8:09 pm ]
Post subject:  Re: [REQUEST] Script/program for extracting PS2 VAG files.

Both in both questions?

Author:  AnonBaiter [ Mon Apr 11, 2016 10:20 pm ]
Post subject:  Re: [REQUEST] Script/program for extracting PS2 VAG files.

id-daemon wrote:
Both in both questions?

I meant exactly that.

Author:  id-daemon [ Tue Apr 12, 2016 10:54 am ]
Post subject:  Re: [REQUEST] Script/program for extracting PS2 VAG files.

In this case (such a universal tool) I doubt it will be possible to make something useful in at least 50% cases. Anyway, I will notify you about the results.

Page 1 of 3 All times are UTC
Powered by phpBB® Forum Software © phpBB Limited
https://www.phpbb.com/