View Full Version : AviSource vs DirectShowSource audio
AlanHK
11th May 2009, 02:49
If I load an AVI file with MP3 VBR audio using AviSource(), I often find audio problems. Sometimes the duration is quite different-- a few minutes over (not a real problem, and fixed if I do a Trim) or a few minutes shorter (a showstopper). Occasionally it can't decode at all, giving an error message like:
"Error initializing audio stream decompression: the requested conversion is not possible".
However, if I use DirectShowSource, this almost always works without error, and gives the audio of the exact duration as the video.
I'm starting to routinely use DirectShowSource, but it seems to be less efficient otherwise; it takes longer to start playing an AVS file in VDub, for instance. Also seems to give slightly off fps.
(FFmpegSource is omnivorous, but a real resource hog, only use as a last resort.)
Can AviSource be made to use whatever decoder DirectShowSource is using? Where is that determined? (I know I could load audio separately and use AudioDub, but I'd rather fix AviSource if possible.)
TheRyuu
11th May 2009, 03:33
If I load an AVI file with MP3 VBR audio using AviSource(), I often find audio problems. Sometimes the duration is quite different-- a few minutes over (not a real problem, and fixed if I do a Trim) or a few minutes shorter (a showstopper). Occasionally it can't decode at all, giving an error message like:
"Error initializing audio stream decompression: the requested conversion is not possible".
However, if I use DirectShowSource, this almost always works without error, and gives the audio of the exact duration as the video.
I'm starting to routinely use DirectShowSource, but it seems to be less efficient otherwise; it takes longer to start playing an AVS file in VDub, for instance. Also seems to give slightly off fps.
(FFmpegSource is omnivorous, but a real resource hog, only use as a last resort.)
Can AviSource be made to use whatever decoder DirectShowSource is using? Where is that determined? (I know I could load audio separately and use AudioDub, but I'd rather fix AviSource if possible.)
EnsureVBRMP3Sync()
?
AlanHK
11th May 2009, 05:55
EnsureVBRMP3Sync()
?
Thanks, I routinely use that to keep sync, but it doesn't help these problems.
poisondeathray
11th May 2009, 06:21
DirectShowSource() uses directshow and you can use graphstudio to figure out what filters are being used in the chain, or change the merit etc...
AVISource() uses the VFW/ACM system (the same one vdub uses when opening an avi directly) you can identify the current ACM / VFW decoders used with gspot. I don't know how to adjust the VFW/ACM filters like you can with directshow and graphedit
tebasuna51
11th May 2009, 11:51
If I load an AVI file with MP3 VBR audio using AviSource(), I often find audio problems. Sometimes the duration is quite different-- a few minutes over (not a real problem, and fixed if I do a Trim) or a few minutes shorter (a showstopper). Occasionally it can't decode at all, giving an error message like:
"Error initializing audio stream decompression: the requested conversion is not possible".
Avi container don't support (natively) MP3 VBR and the standard VFW routines can't calculate the exact duration of VBR audio tracks.
Is an AviSynth requirement know the samplerate and the exact number of samples before process the audio tracks, and you can't know this without explore the full audio track.
I'm starting to routinely use DirectShowSource, but it seems to be less efficient otherwise; it takes longer to start playing an AVS file in VDub, for instance.
Yes, need explore the full audio track to know the exact duration.
If you use NicMPG123Source("vbr_one.mp3"), from NicAudio.dll AviSynth plugin, all the file is explored before process the audio to say the exact duration to AviSynth.
Can AviSource be made to use whatever decoder DirectShowSource is using? Where is that determined? (I know I could load audio separately and use AudioDub, but I'd rather fix AviSource if possible.)
AVI is a old format and can't be modified now, use CBR audio in AVI or use other container, like mkv, with native support for VBR audio.
squid_80
11th May 2009, 15:48
Make sure you're using a recent avisynth version, there was a workaround added a while ago to make the default mp3 ACM codec work with certain AVI mp3 streams (this would only fix the "Error initializing audio stream decompression" errors, not the duration problems).
AlanHK
11th May 2009, 16:15
Make sure you're using a recent avisynth version
I have the latest 2.58 showing on Sourceforge.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.