ScummVM tools question (audio compression)

Ask for help with ScummVM problems

Moderator: ScummVM Team

Post Reply
monkeyman
Posts: 12
Joined: Sat Sep 09, 2006 5:29 pm

ScummVM tools question (audio compression)

Post by monkeyman »

Hiya,

I'm trying to extract some of The Dig's in-game music. I found a utility in the tools, compress_scumm_bun, that can get the music clips out of the DIGMUSIC.BUN file. Unfortunately it then immediately deletes them :P but a quick source change fixed that.
I now have over 500MB worth of WAV clips (22kHz, 16bit) that I am trying to encode to MP3.

compress_scumm_bun actually does the encoding already, but to rather low quality MP3 files: VBR between 56 and 64 kb/s.

My question is just whether there is any reason for these low default settings? Did someone perform a listening test or is the aim just to save lots of space? :)

Thanks in advance.
User avatar
spookypeanut
ScummVM Developer
Posts: 159
Joined: Tue Sep 12, 2006 9:35 am
Location: St Albans, UK
Contact:

Post by spookypeanut »

Don't forget we're working with 22k audio, not 44k (like CDs). That means that half the bitrate will retain the same quality (i.e. 56/64 kb/s is equivalent to compressing a CD at 112/128 kb/s)
Are the samples compressed (in a lossy way) inside the BUN file? If so, probably a little pointless using v high bitrates...
clem
Posts: 2160
Joined: Mon Oct 31, 2005 11:14 am

Post by clem »

I'd also expect them to be mono instead of stereo (as you'd expect from music), which would further reduce the bitrate needed

can't check from here though
monkeyman
Posts: 12
Joined: Sat Sep 09, 2006 5:29 pm

Post by monkeyman »

spookypeanut wrote: Are the samples compressed (in a lossy way) inside the BUN file? If so, probably a little pointless using v high bitrates...
I don't know, but it sure looks like it: the original DIGMUSIC.BUN is about 250MB, whereas the WAV files amount to just over 550MB. I don't suppose any lossless compression could account for this 50%+ size decrease, could it?
monkeyman
Posts: 12
Joined: Sat Sep 09, 2006 5:29 pm

Post by monkeyman »

clem wrote:I'd also expect them to be mono instead of stereo (as you'd expect from music), which would further reduce the bitrate needed

can't check from here though
No, they're definitely stereo (just checked on my headphones :))
fingolfin
Retired
Posts: 1452
Joined: Wed Sep 21, 2005 4:12 pm

Post by fingolfin »

BUN files are indeed already compressed, using the "IMC" codec, a variant of IMA (see http://www.multimedia.cx/simpleaudio.html and http://wiki.multimedia.cx/index.php?tit ... dio_Codecs).
monkeyman
Posts: 12
Joined: Sat Sep 09, 2006 5:29 pm

Post by monkeyman »

Thanks for the info Fingolfin,
Hope this is not a stupid question but I'm assuming IMC is a lossless compression?
User avatar
SithlordDK
Posts: 65
Joined: Sat Nov 19, 2005 10:04 am
Location: Aperture Science Labs

Post by SithlordDK »

Wahh!! I wanna extract the DIGMUSIC.BUN file too :( !
User avatar
Noelemahc
Posts: 178
Joined: Sat Jul 07, 2007 2:24 pm

Post by Noelemahc »

SithlordDK wrote:Wahh!! I wanna extract the DIGMUSIC.BUN file too :( !
Then do so. For crying out loud, ScummRevisited2 has been out for several years now, but nobody seems to know of its existence.
monkeyman
Posts: 12
Joined: Sat Sep 09, 2006 5:29 pm

Post by monkeyman »

ScummRev will not extract the music from DIGMUSIC.BUN, unfortunately (tried with both v2 and v5).

The only ways I found to get the tracks out of the BUN file are with the Dig Music Player, or using compress_scumm_bun.exe from the ScummVM tools.
User avatar
Noelemahc
Posts: 178
Joined: Sat Jul 07, 2007 2:24 pm

Post by Noelemahc »

Which is kinda weird, since I remember quite clearly I've used ScummRev to tear up my copies of DIG, CoMI and FT for the music tracks I've liked. Hmmm. Gotta go check if that was actually the case.
User avatar
SithlordDK
Posts: 65
Joined: Sat Nov 19, 2005 10:04 am
Location: Aperture Science Labs

Post by SithlordDK »

monkeyman wrote:ScummRev will not extract the music from DIGMUSIC.BUN, unfortunately (tried with both v2 and v5).

The only ways I found to get the tracks out of the BUN file are with the Dig Music Player, or using compress_scumm_bun.exe from the ScummVM tools.
Thanks for that link! I tried it also with ScummRev before and it didn't work.
monkeyman
Posts: 12
Joined: Sat Sep 09, 2006 5:29 pm

Post by monkeyman »

Well if anyone's interested.... I finally managed to put the entire ingame soundtrack online, here:
http://www.megaupload.com/?d=Q2WRPK6T

Files were extracted from DIGMUSIC.BUN, joined up using foobar2000, renamed to the non-truncated track labels, and finally encoded with LAME.

Have fun. :)
Post Reply