in_vgm beta test redux: VGM7z

Anything else goes here that doesn't fit in the first two categories.
Post Reply
User avatar
Maxim
Posts: 28
Joined: Thu Jun 29, 2006 9:51 am
Location: London
Contact:

in_vgm beta test redux: VGM7z

Post by Maxim »

Hi folks,

In the last week I spent a few hours working on a new feature for VGM packs - VGM7z. You might guess all there is to know from the name, but I'll give a short description here.

If you wanted to package a VGM set up into the smallest size possible, what would you do? Well, you'd do all the available optimisation to the VGM files, then you'd make sure to decompress them all, before packing everything up into a solid archive, probably using the best compression program you can find that your intended recipient is likely to use - probably 7-zip these days.

The problem with this is, when the other person gets the files, they need to be intelligent enough to extract them all, and then compress them individually (to what you might call "VGZ") otherwise they'll be wasting all their disk space. And we all know that intelligence is a rare commodity these days - well, for everyone apart from you and me, of course.

So wouldn't it be cool if in_vgm would do all the grunt work automatically?

Well, here's the result (BETA):

http://www.smspower.org/maxim/forumstuff/in_vgm_latest/in_vgm_7z.zip (288KB)

What's in the zip?
[size=84]
in_vgm.dll
- Put it in c:\Program Files\Winamp\Plugins\ (or your equivalent).

Atomic Robo-Kid.vgm7z
Sonic the Hedgehog.vgm7z

- A couple of sample packs. Don't open them yet!

compression script\*.*
Some programs and a batch file for making a .vgm7z pack easily. Mostly safe to randomly click on.

[size=134]How do I use it then?


So, after installing the new plugin in Winamp, first go to Winamp's "File Types" preferences section and make sure vgm7z is highlighted in the list. Then go find "VGM input plugin v.035 beta blah blah blah" in the "Input" plugin section, and click Configure.

You'll notice there's more tabs in there now, with more betterer icons on them (kinda). Go to the "VGM7z" tab. Hopefully the options are fairly self-explanatory.

- Do you want an annoying yes/no option before it ever does anything with a VGM7z file?
- Do you want to extract packs in place (useful if you download them then unpack them) or always in the same place (useful if you're going to be launching them from a temp directory, eg. when opening directly from a website or from inside a zip)?
- In either case, do you want it to make a new folder for each pack or just munge them all together? (Good luck opening that folder with 16000 files in it in Explorer.)
- When it unpacks a VGM file, it'll make sure to recompress it with the standard VGM compression (ie. zlib/gzip/deflate compression). How much would you like? Bigger numbers = slower, smaller. My crappy Athlon took 15s to unpack and recompress the biggest set (Animaniacs) onlevel 9, your computer is probably 10 times faster.
- Finally, do you want it to magically delete the VGM7z file if everything else went well?

Once you're happy with all that, optionally put the two sample VGM7z files in a suitable directory and double-click them. They should load up in Winamp, and as soon as Winamp tries to play them it'll do all that decompressing/compressing and magically load the entire set up into your playlist, in the right order too. Depending on circumstances (there's a Winamp buglet when it's at the top of the list) it'll start playing the first track from the set too.

So what's the point?
[size=84]
[/SIZE][/SIZE][/SIZE][size=84][size=134][size=84]1. A VGM7z pack is on average* about 55% the size of the equivalent zip.[/SIZE]
[/SIZE][/SIZE][size=84][size=134][size=84]2. Not much intelligence required to download and unpack sets.
3. No additional software required to do that either.
[/SIZE]4. If you want you can stick a dot in the filename and suddenly all you have is a bunch of 7z files, so it's easy enough to mess with them manually.

* totally unscientific average of the 33 sets on this hard disk starting with "A"

So how do I make VGM7z packs?
[size=84]
Well, you could do it manually, since it's just decompressing + making a 7z file instead of a zip file, or...

...use the compression script. I've included all the programs needed, but I have no idea if they'll run happily on your computer since two of them are stolen from MSYS. The other one's just the commandline 7-zip program. They're all GPL as far as I can tell. You'll need to make sure they're all on your path, else edit the batch file to have hard-coded paths.

The idea is that you run it from a directory which has subdirectories containing VGM packs - much like you probably have already, and like this site's torrent's filesystem. It can take wildcards, so it's nice for packing lots at a time. Just make sure it starts in the right directory; it seems not to screw up with long filenames, although I'm sure it used to.

[/SIZE][/SIZE][/SIZE]

Code: Select all

vgm7z.bat *
I hope you're patient...

Code: Select all

vgm7z.bat a*
Making an unscientific average calculation, are you?

Code: Select all

vgm7z.bat "C:\Documents and Settings\You\Desktop\Porn\Hentai\Bestiality\Pokemon\Misclassified\VGMs\Sonic the Hedgehog"
Ought to work.
[size=84][size=134][size=84]
[size=134]DAQ
[size=84](Dumb-Ass Questions)

Do I have to compress all my existing packs then?

No. Unless you're making a website full of VGM packs. The point is only to use the VGM7z files for transferring VGMs over the net. On your hard disk they remain as a bunch of VGM files with playlists and stuff.

Does any other player support this?

Not likely, I just made this public.
[/SIZE] If it takes off, they probably will.

Can't the plugin extract the files on the fly and not unpack them all?

Well, it could, but it'd be a horrible experience - big delays as it switched tracks or packs - and all the other stuff I mentioned about why you shouldn't have one file with more than one track in it. It's my personal preference.

Isn't it wrong to be making compressed VGM files with the .vgm extension? Shouldn't they be .vgz?

Nope. It's part of the spec, has been for some time, that a .vgm file can be compressed or not. Some older software (*cough* VGMTool) predates that specification, that's all. Any software using standard GZip I/O routines should "just work" already - transparent support for uncompressed files is built-in.

Is Project2612 going to switch over to this then?

I have no idea. Try sending the guys hate mail until they do.

These Sonic VGMs sound wrong.

That's the Game Gear version. I think it sounds better, how weird am I?

Shouldn't it support putting different systems' files in different directories or something?

Well, that'd be hard to do nicely. It might be better for sites (hint, hint) to put some kind of indicator in the filename, eg. "Sonic the Hedgehog (Genesis).VGM7z" or something equally horribly uninternational.

When are you going to release a non-beta version of in_vgm?

Probably by the end of the month if nothing major goes wrong with this one, I'm quite happy with it as it is now.




Comments and suggestions are welcome.
[/SIZE][/SIZE][/SIZE][/SIZE]
Knurek
New Around Here
Posts: 16
Joined: Sat Jul 01, 2006 1:19 am

Post by Knurek »

You should really try XMPlay's archive plugins. There's some magic being done with solid 7z archives, so if you're listening to whole sets at once (as you should be :P), you'll only have loading pause when playing the first file.
Not that I'd use solid archives with VGM personally. I'm pretty comfortable with my standard, nonsolid RAR approach (ironically, sometimes, using VGZ makes for drastically smaller files).
So, umm, anyway, this really should've been handled by the player's archive subsystem, not by the plugin itself. But then, most people use winamp, and it doesn't have any archive subsystem AFAIK.
Post Reply