Opened 20 years ago
Closed 19 years ago
Last modified 4 years ago
#7287 closed feature request (outdated)
TOOLS: extract with high quality resampling
|Reported by:||SF/logicdeluxe||Owned by:||fingolfin|
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 by , 20 years ago
comment:2 by , 20 years ago
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 by , 19 years ago
|Status:||new → closed|
comment:4 by , 19 years ago
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 by , 4 years ago
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 :-)