Opened 16 years ago

Closed 16 years ago

Last modified 7 months ago

#7287 closed enhancement (outdated)

TOOLS: extract with high quality resampling

Reported by: SF/logicdeluxe Owned by: fingolfin
Priority: normal Component: Tools
Keywords: Cc:
Game:

Description

Ogg Vorbis is a very nice codec in deed and the OGGENC
does a very good job as well. But when it comes to
resampling the input sample the results are very bad.
The build in low-pass-filter is very simple and heavily
reduces the frequency response in the resulting encoded
file. (The optional low-pass option does not change
this, as I tried it already.) So it would be very nice,
if EXTRACT could do the resampling with an external
tool like sr-convert (see here:
https://sourceforge.net/projects/sr-convert/ ) before
encoding with OGGENC.
This should of course not be forced, but an option,
since this high quality resampling takes a lot time.

Alternatively, since sr-convert also is open-source,
you could include that high-quality resampling into
extract itself.

However, there is one little catch: sr-convert does not
read 11111 Hz, but this should be implemented easily.
Or EXTRACT could make it 11025 instead as an approximation.

Ticket imported from: #766391. Ticket imported from: feature-requests/103.

Change History (5)

comment:1 Changed 16 years ago by fingolfin

An excellent sample rater converte (for arbitrary src/dst rates) is
implemented in sox (http://sox.sourceforge.net/). Since it can
also handle MP3 and OGG already, that would seem to be a more
likely candidate...

However in either case, I don't think we should duplicate code;
rather, if at all, include the ability to call one of these external
tools.

That said, I am not going to implement this :-)

comment:2 Changed 16 years ago by fingolfin

That said, my dream always has been to take the excellent (GPL)
resample code from sox, and use it for the mixer in ScummVM.
The only concern I had and have is that slower devices might have
a problem. OTOH, one could easily revert to a linear filter for
those machines, or to the cubic interpolator we use right now...
The key to this simply is a "clean" design. Of course any
implementation would have to deal with various combinations of
mono/stereo. 8/16bits, signed/unsigned data...

comment:3 Changed 16 years ago by fingolfin

Owner: set to fingolfin
Resolution: outdated
Status: newclosed

comment:4 Changed 16 years ago by fingolfin

The extract tool in CVS doesn't do any resampling anymore - it
encodes with the "native" rate of the sound (be it 11025 or
22050Hz). Any resampling is done by scummvm.

comment:5 Changed 7 months ago by digitall

Component: Tools
Note: See TracTickets for help on using tickets.