Log in

View Full Version : Shrink a 1h50m 5.1 wav (or 6 mono waves) by 500ms


bluesk1d
17th November 2007, 21:46
I need to shrink a 5.1 wav or if thats not possible 6 mono wavs by 500ms in order to get it to jive with the video stream. I used Audacity's change tempo feature to do this both on each individual mono wav as well as a full 5.1 wav. It works but it just isn't precise enough to change each channel exactly the same. There is such a minute difference in each channel that it creates an echo/phaser effect when a single sound spans more than one of the 5.1 channel sounds at the same time (example: narration). Is there another tool to use for this or am I just doing something wrong?

:thanks:

tebasuna51
18th November 2007, 03:58
Other free method is based in AviSynth TimeStretch function.
If you don't know how write avs scripts you can use BeHappy.

ACrowley
18th November 2007, 12:31
delaycut can handle wave Files to set a simple + or - Delay...i think thats what you want

bluesk1d
19th November 2007, 02:29
delaycut can handle wave Files to set a simple + or - Delay...i think thats what you want

Thanks for the suggestion but its actually not a delay I need. the beginning is fine but by the end its off by about 500ms

bluesk1d
19th November 2007, 02:37
Other free method is based in AviSynth TimeStretch function.
If you don't know how write avs scripts you can use BeHappy.

Would you mind elaborating further? I have used avs scripts but only for video. Also, how would it work for 6 channels?

tebasuna51
19th November 2007, 03:22
Would you mind elaborating further? I have used avs scripts but only for video. Also, how would it work for 6 channels?

You can use an job.avs like:
WavSource("x:\path\6chan.wav")
TimeStretch (http://avisynth.org/mediawiki/TimeStretch)(tempo=(100 * actual_time / desired_time))
ConvertAudioTo16bit() # or the desired bitdepth, only if you don't want the def output (32 float) from TimeStretch

With AviSynth 2.57 the internal function WavSource accept multichannel wav files <4GB without WAVE_FORMAT_EXTENSIBLE header.

Now you can do:
Wavi (http://sourceforge.net/projects/wavi-avi2wav/) job.avs output.wav

Or you can open job.avs in BeHappy

Or also you can use the external AviSynth plugin SoundOut adding a line to job.avs with:
SoundOut()
and open now the avs in VirtualDub.

bluesk1d
19th November 2007, 15:58
WavSource("x:\path\6chan.wav")
TimeStretch (http://avisynth.org/mediawiki/TimeStretch)(tempo=(100 * actual_time / desired_time))
ConvertAudioTo16bit() # or the desired bitdepth, only if you don't want the def output (32 float) from TimeStretch

Thanks! As far as the "100 * actual_time / desired_time" section, what unit of measure should this be in? I think it's like 6634.888 seconds and it needs to be about 6634.270.

tebasuna51
19th November 2007, 17:14
As far as the "100 * actual_time / desired_time" section, what unit of measure should this be in? I think it's like 6634.888 seconds and it needs to be about 6634.270.

Because is a quotient you can use anyone unit but the same for dividend and divisor. The '100*' is because the parameter must be a percent (%).

Here you can use literally:
TimeStretch(tempo=(663488.8 / 6634.27))
and let the internal float do the quotient to obtain the max precision.

Edit: With this light stretch (less than 0.0001) the pitch change is imperceptible and you can use also 'rate' instead 'tempo' option maybe fast and with more quality.

bluesk1d
19th November 2007, 18:46
Because is a quotient you can use anyone unit but the same for dividend and divisor. The '100*' is because the parameter must be a percent (%).

Here you can use literally:
TimeStretch(tempo=(663488.8 / 6634.27))
and let the internal float do the quotient to obtain the max precision.

Edit: With this light stretch (less than 0.0001) the pitch change is imperceptible and you can use also 'rate' instead 'tempo' option maybe fast and with more quality.

Sweet thanks for all the help. Is the same value used for rate as for tempo?

tebasuna51
20th November 2007, 00:21
Sweet thanks for all the help. Is the same value used for rate as for tempo?
Yes, the same.