VideoHelp Forum




+ Reply to Thread
Results 1 to 4 of 4
  1. Member
    Join Date
    Aug 2007
    Location
    United States
    Search Comp PM
    Hi everyone,

    Here's a script I am using but I need to know how to extract the audio into a wav taking into account the trims in the script to ensure the audio matches the video. Can I use VirtualDubMod -> Open avs -> demux to wav?

    avs -> m2v using HCGui
    avs -> wav using VirtualDubMod

    avs:
    LoadPlugin("degrainmedian.dll")
    LoadPlugin("fft3dfilter.dll")
    LoadPlugin("ColorMatrix.dll")
    LoadPlugin("AudioLimiter.dll")
    LoadPlugin("soxfilter.dll")
    loadplugin("SoundOut.dll")
    avisource("E:\Orginal with audio -480ms delay.AVI",audio=true)
    AssumeFPS("ntsc_video",sync_audio=true)
    SSRC(44100)
    scene1 =Trim(101,4458).Fadeio(30)
    scene2 =Trim(4511,20608).Fadeio(30)
    scene3 =Trim(20609,23516).Fadeio(30)
    scene4 =Trim(23517,25424).Fadeio(30)
    scene5 =Trim(25425,34760).Fadeio(30)
    scene6 =Trim(34761,36732).Fadeio(30)
    scene7 =Trim(36733,40836).Fadeio(30)
    scene8 =Trim(40837,59642).Fadeio(30)
    scene9 =Trim(59738,76154).Fadeio(30)
    scene10 =Trim(76155,80016).Fadeio(30)
    scene11 =Trim(80017,85680).Fadeio(30)
    UnalignedSplice(scene1,scene2,scene3,scene4,scene5 ,scene6,scene7,scene8,scene9,scene10,scene11)
    ConvertToYV12()
    DeGrainMedian (interlaced=true, limitY=4, limitUV=6, mode=5)
    FFT3DFilter(interlaced=true, bt=3, sigma=3.0, plane=0, bw=64, bh=64, ow=32, oh=32)
    ColorMatrix(interlaced=true)
    Crop(0, 8, -0, -8) #crop 8 lines off the bottom
    AddBorders(0, 8, 0, 8) #add 8 lines of black to the bottom

    ConvertAudioToFloat().SSRC(41000)
    fl = GetRightChannel()
    fr = GetRightChannel()
    cc = mixaudio(GetRightChannel(),GetRightChannel(),0.707 ,0.707)
    lfe = GetRightChannel() #ConvertToMono(a).SoxFilter("lowpass 120","vol 1.2")
    sl = GetRightChannel() #.amplify(-1.0)
    sr = GetRightChannel() #.amplify(-1.0)
    sl = DelayAudio(sl,0.02)
    sr = DelayAudio(sr,0.02)
    MergeChannels( fl, fr, cc, lfe, sl, sr).wavgainlimiter(1.0)
    #SoundOut(output = "ac3", filename="Surround.ac3", autoclose = true, wait=0, overwritefile="Yes", showprogress=true, cbrrate = 384,acmod=7)
    SoundOut()
    Thanks,
    Chris
    Quote Quote  
  2. Member Soopafresh's Avatar
    Join Date
    Jan 2004
    Location
    United States
    Search Comp PM
    I would try fixing it before you do all of the trims, but you can try

    DelayAudio(-0.480)

    in the script

    or is it without the "-"

    try both.
    Quote Quote  
  3. Member
    Join Date
    Aug 2007
    Location
    United States
    Search Comp PM
    Sorry Soopafresh. I have already added the 480ms delay so the sound is in synch to the video in the avi: E:\Orginal with audio -480ms delay.AVI

    Is the soundout() function smart enough to use the video that the avs script has for the audio? IE: Will there be audio for frame 4500 or will it be trimmed like the video is?

    Thanks,
    Chris
    Quote Quote  
  4. Member Soopafresh's Avatar
    Join Date
    Jan 2004
    Location
    United States
    Search Comp PM
    Ah, I now understand what you're asking. I believe the answer is yes. You can always process both separately using the killvideo() and killaudio() commands, respectively. Try killing the video, then seeing if the audio trims in the right places.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!