View Full Version : No audio with AudioDub
mel2000
8th January 2011, 14:21
My AVI video containing xvid+mp3 plays fine along with its subtitle file in Media Player Classic and WMP. However, I'm having a problem getting audio returned when using the following Avisynth script:
mySub = "C:\Users\Owner\Desktop\vids\myClip.srt"
myAud = "C:\Users\Owner\Desktop\vids\myClip.avi"
myVid = "C:\Users\Owner\Desktop\vids\myClip.avi"
audio = WavSource(myAud)
video = DirectShowSource(myVid, audio=false)
return AudioDub(video, audio).TextSub(mySub)
Any assistance with this issue greatly appreciated. Thanks.
Gavino
9th January 2011, 10:15
What do you actually get?
- an error?
- silent audio?
- no audio at all?
What do you get if you just return 'audio'?
The script 'should' work, but is there some reason you can't just get video and audio together in a single call to AviSource or DirectShowSource, and avoid using AudioDub?
mel2000
9th January 2011, 12:56
If I end the script with:
return audio
or
return audio.TextSub(mySub)
I get the same error from VirtualDub:
"K:\app_data\Avisynth\myClip_subtitles.avs" does not have a video stream.
*****************************************************
The following script plays the audio, original video and subtitles correctly:
mySub = "C:\Users\Owner\Desktop\vids\myClip.srt"
myVid = "C:\Users\Owner\Desktop\vids\myClip.avi"
video = DirectShowSource(myVid, audio=true)
return video.TextSub(mySub)
*****************************************************
However, my real objective was to strip the original video and replace it with a black background along with the original audio and subtitles. After viewing an AviSource() example using BlankClip, I changed my original script to the following and it worked!
mySub = "C:\Users\Owner\Desktop\vids\myClip.srt"
myVid = "C:\Users\Owner\Desktop\vids\myClip.avi"
video = DirectShowSource(myVid, audio=true)
return AudioDub(BlankClip(video), video).TextSub(mySub)
*****************************************************
Thanks for your input Gavino. I still don't understand why the WavSource audio attempt didn't work, but I consider my problem solved.
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.