Log in

View Full Version : Possible to change sample rate on MP3 audio? (NOT resample)


DrScotsman
19th May 2005, 15:58
Unless I'm mistaken, slowing down audio (and thus decreasing the pitch) is normally achieved by playing it at a lower sample rate. For example, when I play a video with 48000Hz MP3 audio at speed 960/1001 (to make it 23.976...fps from 25fps), MPlayer reports this:

"AF_pre: 46033Hz 2ch Signed 16-bit (Little-Endian)"

And many other references to 46033Hz.

Now I have an MP3 stream that I want to play at 960/1001 of the original speed to make it match with the video being slowed down from 25fps to 23.976...fps. Thus I want to change the sample rate from 48000Hz to 46033Hz without resampling. Is there a way to achieve this without re-encoding (in Windows or Linux, doesn't matter)? Re-encoding from MP3 to MP3 is effectivly a lossy solution and I would like to avoid it. This is essentially like changing the aspect ratio on video without rescaling, so it's theoretically possible.

EDIT: And I don't expect nor want pitch correction here

Thanks.

fccHandler
20th May 2005, 03:57
You're not the first to wonder about this! :D

http://forum.doom9.org/showthread.php?s=&threadid=83625

(It isn't possible.)

FlimsyFeet
24th May 2005, 12:48
I have a couple of questions related to this thread:
Originally posted by DrScotsman
960/1001 (to make it 23.976...fps from 25fps)I thought the NTSC film framerate was 23.976 exactly; is this not the case? 960/1001 would make it 23.9760239676...
Originally posted by fccHandler
(It isn't possible.)Is it possible with WAV? For example, is it possible to take the uncompressed audio captured from a PAL movie with a samplerate of 50050kHz (or whatever the exact figure should be), and play it back at 48000kHz to give the correct speed for NTSC audio?

fccHandler
24th May 2005, 18:35
Originally posted by FlimsyFeet
I have a couple of questions related to this thread:
I thought the NTSC film framerate was 23.976 exactly; is this not the case? 960/1001 would make it 23.9760239676...
True NTSC rates are based on the color subcarrier frequency (3579545 Hz). At 227.5 cycles per line, 525 lines per frame, the result is 3579545 / (227.5 * 525).

DVDs use an approximation based on a 90 kHz clock, which is precisely 30000/1001. Therefore the DVD NTSC film rate is 24000/1001.

Is it possible with WAV? For example, is it possible to take the uncompressed audio captured from a PAL movie with a samplerate of 50050kHz (or whatever the exact figure should be), and play it back at 48000kHz to give the correct speed for NTSC audio?
Certainly. You only need to change the samplerate field in the WAVE header:

http://ccrma.stanford.edu/CCRMA/Courses/422/projects/WaveFormat/

Gabriel_Bouvigne
27th May 2005, 16:49
Mpeg1 Layer III only accepts 32, 44.1, 48kHz
Mpeg2 Layer III only accepts 16, 22.05, 24kHz