Log in

View Full Version : Change sample rate length in half


jriker1
10th February 2006, 04:21
I have an AVI file that has mp3 format audio and the sample rate is 22k. Length is about 4 minutes 20 seconds. I need to change the sample rate to 48k for DVD compliance. When I do that the video cuts to around 2 minutes 3 seconds. Then of course the audio and video is completely off and half the video has no sound. Is there a reason why the length changes like this and is there a way to avoid it?

Thanks.

JR

Boulder
10th February 2006, 08:11
What program did you use to resample and how did you do it?

jriker1
10th February 2006, 22:45
I saved the wav file which had the correct length in it. When I ran it through Sonic Soft Encoder to make a 2.0 AC3 file it was shortened. Also Goldwave shortened it as well when I went into Resample and changed 22050 to 48000. it also happened in Adobe Audition when I did a "Adjust Sample Rate". I then instead tried "Convert Sample Rate" in Adobe Audition and that seemed to leave the length intact. Since curious what is happening in those other instances as it took some time to figure out.

Skelsgard
11th February 2006, 06:16
Since curious what is happening in those other instances as it took some time to figure out.
The sample rate of a file is speed measure (hz or cicles/second). When u "adjust" the sample rate, uīre telling the software to take the "value" of the SR and change it. That means that if u change a 24000 cicles/second track and adjust the SR to 48000 cicles/second, every cicle will be played 2x faster than the original (so one second of cicles can now be stored in half a second). I.e. in a 10 seconds track, u have 24.000 x 10 = 240.000 cicles. If the SR is taken to 48.000 cicles/second, those 240.000 cicles will be played in 240.000 cicles / 48.000 cicles/second = 5 seconds.
Thatīs why the file plays faster and the final time is 1/2 the original.
When u "convert" the SR, uīre telling the converter to add or substract the necessary cicles needed for the temporal relation original:resampled to stay the same. If u take 24000 cicles/second file a convert it to 48000 cicles/second, uīll be adding 1 extra cicle for each cicle in the original file. I.e. 24.000 Hz in 10 seconds (24.000 x 10 = 240.000 cicles) --> convert to 48.000 Hz (48.000 / 24.000 = 2) --> for 1 cicle in the source, there will be 1 x 2 = 2 cicles in the destination --> 2 x 24.000 = 48.000 cicles, x 10 seconds = 480.000 ---> 480.000 cicles / 48.000 cicles/second = 10 seconds.

Boulder
11th February 2006, 08:31
A little sidenote: for resampling, it's recommended to use SSRC.