VideoHelp Forum




+ Reply to Thread
Results 1 to 3 of 3
  1. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    My video terminates before the audio variable "in_theory" comes to an end. The in_theory audio length is 1:35 seconds. I would like the video to last that duration. This is what I have tried.

    Code:
    in_theory=WAVSource("C:\projects\video_editing\projects\acroyoga\intheory\intheory1.wav")+WAVSource("C:\projects\video_editing\projects\acroyoga\intheory\intheorythanks.wav")
    
    bg=WAVSource("C:\projects\video_editing\projects\acroyoga\intheory\bg.wav")
    bg_audio=bg+bg+bg+bg+bg+bg
    
    audio = MixAudio(bg_audio, in_theory, 0.25, 0.75)
    
    logo = imagesource("C:\projects\video_editing\projects\acroyoga\intheory\intheory.png", pixel_type = "RGB32").ConvertToYUY2 ()
    
    logo = AudioDub(logo, audio)
    
    return logo.ConvertToYUY2 ().info()
    
    #return logo.ConvertToYUY2 ().trim (0, Ceil (in_theory.AudioLengthF()/in_theory.AudioRate()*logo.FrameRate()))
    Quote Quote  
  2. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    [ SOLVED SOLUTION]

    Code:
    in_theory=WAVSource("C:\projects\video_editing\projects\acroyoga\intheory\intheory1.wav")+WAVSource("C:\projects\video_editing\projects\acroyoga\intheory\intheorythanks.wav")
    
    bg=WAVSource("C:\projects\video_editing\projects\acroyoga\intheory\bg.wav")
    bg_audio=bg+bg+bg+bg+bg+bg
    
    audio = MixAudio(bg_audio, in_theory, 0.25, 0.75)
    
    
    logo = imagesource("C:\projects\video_editing\projects\acroyoga\intheory\intheory.png", end=Ceil (in_theory.AudioLengthF()/in_theory.AudioRate()*24),pixel_type = "RGB32").ConvertToYUY2 ()
    
    logo = AudioDub(logo, audio)
    
    return logo.trim(0, logo.Framecount()-1,false).ConvertToYUY2 ()
    Quote Quote  
  3. Member
    Join Date
    Jul 2009
    Location
    Spain
    Search Comp PM
    That's right.
    The original problem is that ImageSource has a default length of 1001 frames, so you need to set the length based on the length of the audio track, as you have now done using end=...

    I'm puzzled by the final trim in your script.
    'In theory' () it should not be necessary.
    Did you find you had to put that in for some reason?
    Quote Quote  



Similar Threads

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