VideoHelp Forum




+ Reply to Thread
Results 1 to 8 of 8
  1. I have several short audio files I would like to merge together, but 2 of the audio files should overlap. Currently I have my script like:
    Code:
    v=directshowsource("new.avi")
    a1=directshowsource("sound 1.mp3")
    a2=directshowsource("sound 13 (over to down ).mp3").delayaudio(5.8) + 
    directshowsource("sound 18 (over to down ).mp3") + directshowsource("sound 25 (over to own ).mp3").delayaudio(3)
    #a5=directshowsource("sound 27 (over to down ).mp3")
    #a6=directshowsource("sound 29 (over to down ).mp3")
    #a7=directshowsource("sound 30 (over to down ).mp3")
    #a8=directshowsource("sound 32 (over to down ).mp3")
    #a9=directshowsource("sound 33 (over to down ).mp3")
    #a10=directshowsource("sound 35 (over to down ).mp3")
    #a11=directshowsource("sound 36 (over to down ).mp3")
    a=mixaudio(a1, a2, 0.75, 0.25)
    audiodub(v,a)
    lanczosresize(264, 240)
    The first audio (a1) is suppose to play for 7 seconds from the beginning. The second audio (a2) is suppose to play for 4 seconds, but start at 5.8 seconds.

    When I play the script, I can hear the first and second audio overlap, but the second audio file ends at the same time as the first. That is not what I want to happen. How do I create a script that will play both audio files while both audio files ends at the time it's suppose to.
    Last edited by mrcoolekin; 11th Feb 2013 at 19:19.
    Quote Quote  
  2. This doesn't answer your question directly, but are you still trying to encode the swf to something else?
    https://forum.videohelp.com/threads/353270-SWF-to-avi?p=2219286#post2219286

    Easiest way is to use a screencapture application, this way you don't have to worry about the timing or sync issues. This is what commercial "swf to xyz" programs do . You could use something like camstudio . Or kmplayer can play the swf, you can use it's capture utility

    If you still want to do it this way - for overlapping audio, it would be easier to arrange the tracks in an editor IMO, where you can see the waveform , position, adjust
    Quote Quote  
  3. It's something similar, but not the same. This is something different. I personally do not like using audacity, so I did not go to the editor route. Yea, I would still like to do it in avisynth if possible because I want to learn how to do it.
    Quote Quote  
  4. What is the video length ? What are the lengths of sound 13, sound 18 , and sound 25 ? You might have to add some padding

    Another thing to consider is using another source filter (directshowsource isn't reliable, certainly with video it's not necessarily frame accurate) . You might use FFAudioSource or BassAudioSource
    Quote Quote  
  5. The video is 38 seconds long. Sound 13 is 4 seconds long, sound 18 is 3 seconds long, and sound 25 is 4 seconds long. Not sure how to add padding to it.

    I was never able to get ffaudiosource/ffvideosource to ever work. It only crashes my programs, so that's why I stuck with directshowsource. I did try it again just now and graphedit just crashes all the time. I indexed the files above and wrote a script like this:

    Code:
    loadplugin("C:\Program Files (x86)\AviSynth 2.5\plugins\ffms2.dll")
    audiodub(ffvideoSource("new.avi"),ffaudiosource("sound 1.mp3"))
    lanczosresize(264, 240)
    I also tried it like:
    Code:
    loadplugin("C:\Program Files (x86)\AviSynth 2.5\plugins\ffms2.dll")
    ffvideoSource("new.avi")
    ffaudiosource("sound 1.mp3")
    audiodub(v,a)
    lanczosresize(264, 240)
    Both times did not throw out an error, but just stopped responding.
    Quote Quote  
  6. Originally Posted by mrcoolekin View Post
    The video is 38 seconds long. Sound 13 is 4 seconds long, sound 18 is 3 seconds long, and sound 25 is 4 seconds long. Not sure how to add padding to it.

    I was never able to get ffaudiosource/ffvideosource to ever work. It only crashes my programs, so that's why I stuck with directshowsource. I did try it again just now and graphedit just crashes all the time. I indexed the files above and write a script like this:

    Code:
    loadplugin("C:\Program Files (x86)\AviSynth 2.5\plugins\ffms2.dll")
    audiodub(ffvideoSource("new.avi"),ffaudiosource("sound 1.mp3"))
    lanczosresize(264, 240)
    I also tried it like:
    Code:
    loadplugin("C:\Program Files (x86)\AviSynth 2.5\plugins\ffms2.dll")
    ffvideoSource("new.avi")
    ffaudiosource("sound 1.mp3")
    audiodub(v,a)
    lanczosresize(264, 240)
    Both times did not throw out an error, but just stopped responding.

    You don't have "v" or "a" labelled

    The basic syntax would be something like
    Code:
    vid = AVISource()
    aud = FFAudioSource()
    AudioDub(vid,aud)
    If you can't get it to work out, I would still try another source filter like BassAudioSource, or NicAudio

    I think mixing audio willl work better if all audio segments are the same length - you can fill in the "gaps" by padding and using offsets

    One way to pad audio with blankaudio is to use blankclip(), you might have to use trim() and add segments to the front and end so the lengths are the same . You have to make sure everything matches , sample rate, channels. You can use SSRC() to resample the audio

    I think currently "a2" might be messed up because you have multiple delays . Does it sound ok by itself? You said it was supposed to be 4 seconds ? I don't see how that adds up?

    IMO This is why it's much easier in an audio editor - it's automatically padded. Visually it's easy to see where the overlaps are, you just place the clips staggered on the timeline . (And even easier would be to capture the audio)
    Last edited by poisondeathray; 11th Feb 2013 at 19:48.
    Quote Quote  
  7. Oh I just figured it out. I just swapped a2 and a1 since a2 is longer in mixaudio. Now it's working fine.
    Quote Quote  
  8. Originally Posted by mrcoolekin View Post
    Oh I just figured it out. I just swapped a2 and a1 since a2 is longer in mixaudio. Now it's working fine.

    LOL I'm glad you got it working somehow, because the numbers don't add up for a2
    Quote Quote  



Similar Threads

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