View Full Version : Avi with 24 bit audio
frenshprince
20th March 2012, 12:39
Hi there,
I have an AVI file with 24 bit audio, which I have to downscale and accelerate, using AVisynth.
AVISource("test.avi", audio=true)
LanczosResize(720,576) # Lanczos (Sharp)
assumefps(25, 1, true)
SSRC(48000)
But the issue is, that audio is downsize at at 16 bit.
Can I keep the original 24 bit depth ?
Thanks for your help :o
Gavino
20th March 2012, 13:40
SSRC() returns float audio.
If Avisynth is being used through the VfW interface, this is converted to 16 bit as VfW does not support float.
Add ConvertAudioTo24Bit() to the end of your script to force retention of 24 bits.
kolak
20th March 2012, 13:50
Add ConvertAudioTo24Bit() to the end of your script to force retention of 24 bits.
Heheh- but this means audio is not 24bit anymore :)
Gavino
20th March 2012, 14:10
Why not?
The conversion to 24 bits is done from float, so there is no loss of precision. There is no conversion to 16 bits taking place any more - this only happens when the entire script returns float audio.
frenshprince
20th March 2012, 14:23
Thanks Gavino.
I'll try that.
pandy
20th March 2012, 15:43
* OPT_AllowFloatAudio | v2.57 | global OPT_AllowFloatAudio = True}
This option enables WAVE_FORMAT_IEEE_FLOAT audio output. The default is to autoconvert Float audio to 16 bit.
Gavino
20th March 2012, 17:08
This option enables WAVE_FORMAT_IEEE_FLOAT audio output.
That's right, but frenshprince wants 24-bit output.
kolak
20th March 2012, 23:34
Why not?
The conversion to 24 bits is done from float, so there is no loss of precision. There is no conversion to 16 bits taking place any more - this only happens when the entire script returns float audio.
Ok- didn't know this :) ( I though it goes to 16bit than you convert back to 24bit)
I don't use avisynth for audio- found instability specially when suing setmt.
pandy
21st March 2012, 11:49
That's right, but frenshprince wants 24-bit output.
but there no original 24 bit (no longer after float) - i dont argue with You Gavino - only maybe is better to use SOX offline to create required format based on float result (to bo honest SRC can be performed probably better than in Avisynth with help of SOX - for sure without limitations of Avisynth)
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.