Voice Cut-Off with lame compressed .bun files

Ask for help with ScummVM problems

Moderator: ScummVM Team

User avatar
McKnallski
Posts: 68
Joined: Tue Dec 08, 2009 2:32 pm

Voice Cut-Off with lame compressed .bun files

Post by McKnallski »

Hello, Guys.

I have a Problem with Lame compressed .BUN Files.
When I play a Game (for example The Dig) with Lame compressed .BUN Files i am getting Voice Cut-Offs.

For example Boston Low says: "The NASA Simulations are much eas...".
But he should say: "The NASA Simulations are much easier!".

And at the beginning of the Game while you hear radio messages, the Click-Noise of the Radio Messages are missing.

The best way to hear the Cut-Offs is, when you examine the items in the inventory.

So the last parts of the Voices are missing.

I´ve tried several Versions of Lame: 3.98.4, 3.97, 3.91, 3.98.3.
I tried also VBR, ABR and Bitrates from 32kbit to 160kbit.

Everytime the same Problem.

I am using the newest Snapshot Builds of ScummVM and the Tools. Also I tried the Release Binaries.

The Problem does not exist with Vorbis compressed .BUN Files.
But I want to use Lame, because the PSP Build of ScummVM is optimized for MP3.

Does anyone know how to solve the Problem?
User avatar
bobdevis
Posts: 567
Joined: Fri Jan 16, 2009 10:52 am

Post by bobdevis »

Do NOT use VBR (or ABR).
VBR is only good if you intend to play the whole file from start to finish and not do a lot of seeking. Like when you are listening music.

CBR is the way to go.
If you have the problem with constant bitrate too, see if lame has an option to delay/forward everything with a couple of milliseconds.
User avatar
McKnallski
Posts: 68
Joined: Tue Dec 08, 2009 2:32 pm

Post by McKnallski »

Thank you for the quick Anser.

The Problem is: The ScummVM Compression Tools are not supporting all commands for the Lame Encoder.

The only Supported Commands are:
-b, -B, --vbr, --abr, -V, -q, --silent
That´s all. So CBR is not supported.

The Supported VBR and ABR mode are resulting in the same Problem.
User avatar
bobdevis
Posts: 567
Joined: Fri Jan 16, 2009 10:52 am

Post by bobdevis »

And what if you don't specify the bitrate type ( instead of --vbr or --abr, simply do not enter anything so the default is used)?
User avatar
McKnallski
Posts: 68
Joined: Tue Dec 08, 2009 2:32 pm

Post by McKnallski »

Already tested. The Problem is still remaining and it seems to be automaticly using VBR.

I think LAME got Problems with converting Sound files that are very short.

The .BUN File is a Container File. And the ScummVM Tool converts the Original .BUN File Content (WAV) and places the MP3 Files in it. Most of the Files are not longer than 1 Second.

I wonder if i am the only one having this Problem.
User avatar
criezy
ScummVM Developer
Posts: 955
Joined: Sat Sep 23, 2006 10:41 am
Location: West Sussex, UK

Post by criezy »

There is currently no way to encode in CBR MP3 using the ScummVM Tools. Only ABR and VBR are supported (VBR is the default). Adding CBR is on my list of things to do. I will try to add it to the command line tool tonight (it is quite trivial to do). I am not sure I will have the time to add the option to the GUI as this is a bit more work (and you seem to use the command line anyway).

That being said, I made a test on COMI BUN files today (I don't have the Dig to test) and it worked fine for me.
User avatar
McKnallski
Posts: 68
Joined: Tue Dec 08, 2009 2:32 pm

Post by McKnallski »

The CBR integration would be great. COMI works fine for me too.
I hope the CBR mode will solve the Problem.
User avatar
criezy
ScummVM Developer
Posts: 955
Joined: Sat Sep 23, 2006 10:41 am
Location: West Sussex, UK

Post by criezy »

I have just added the option to the command line tools. The syntax is a bit different compared to the lame syntax for cbr. For example to compress at a bit rate of 64 kb/s you will need to use

Code: Select all

./scummvm-tools-cli --tool compress_scumm_bun --mp3 --cbr 64 ...
(which invokes lame -b 64 ...)

By the way I have fixed at the same time a bug that meant compression in ABR was always using a target bit rate of 64 kb/s and ignoring the one given by the user.

To get this you will need to get the latest code and compile the tools. Unfortunately the tools are not yet built automatically every nights so there is not fresh build available on the web site.
User avatar
McKnallski
Posts: 68
Joined: Tue Dec 08, 2009 2:32 pm

Post by McKnallski »

I have no Idea how to compile the code. I even do not have the neccessary Tools for it.
User avatar
criezy
ScummVM Developer
Posts: 955
Joined: Sat Sep 23, 2006 10:41 am
Location: West Sussex, UK

Post by criezy »

On which operating system do you run the tools?
User avatar
McKnallski
Posts: 68
Joined: Tue Dec 08, 2009 2:32 pm

Post by McKnallski »

Windows XP
User avatar
criezy
ScummVM Developer
Posts: 955
Joined: Sat Sep 23, 2006 10:41 am
Location: West Sussex, UK

Post by criezy »

I don't have Windows myself, therefore I cannot provide you with a fresh version or tell you how to compile one (as I wouldn't know). Sorry :(
User avatar
McKnallski
Posts: 68
Joined: Tue Dec 08, 2009 2:32 pm

Post by McKnallski »

What Programming Language is it? C++? And what files do I need?
I´ve got the compress.cpp and the compress.h.
KuroShiro
Posts: 473
Joined: Thu May 15, 2008 7:42 am
Location: Somewhere Out There

Post by KuroShiro »

You can compile with VisualC++ or MinGW on Windows. There are fairly detailed instructions, and precompiled libraries, available on the wiki. The tools are a pretty massive pain in the ass to compile for Windows though, due to having to set up wxWidgets. It's possible that the precompiled libraries include that now though -- I haven't checked for a while.
User avatar
criezy
ScummVM Developer
Posts: 955
Joined: Sat Sep 23, 2006 10:41 am
Location: West Sussex, UK

Post by criezy »

It is C++ indeed and you will need the full tools directory from the repository: http://scummvm.svn.sourceforge.net/view ... ols/trunk/
There is a "Donwload GNU tarball" link at the bottom of that page, and this will download the source code you need.

If you want to use the tools in command line only, you can probably disable the compilation of the GUI (and thus avoid having to set up wxWidgets). At least you can do that on Linux and MacOS and I guess the option is there on Windows as well.
Post Reply