VideoHelp Forum




+ Reply to Thread
Results 1 to 6 of 6
  1. Member
    Join Date
    Dec 2005
    Location
    Canada
    Search Comp PM
    Before I can join this clip with another, the number of audio channels has to be the same, so I need to convert the single channel to two.
    Can AviSynth do it?


    LoadCPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins\ffms2.dll")
    v=changefps(ffmpegSource2("antenna.flv"),30000,100 1).AddBorders(200,120,200,120)
    a=ffaudiosource("antenna.flv").resampleaudio(48000 )
    audiodub(v, a)
    info()
    Quote Quote  
  2. you can use mergechannels() for fake stereo

    Code:
    LoadCPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins\ffms2.dll")
    a=ffaudiosource("antenna.flv").resampleaudio(48000  )
    v=changefps(ffmpegSource2("antenna.flv"),30000,1001).AddBorders(200,120,200,120)
    
    dual = mergechannels(a,a)
    
    audiodub(v, dual)
    info()
    Quote Quote  
  3. Member
    Join Date
    Dec 2005
    Location
    Canada
    Search Comp PM
    Much obliged - I've been at it for over six hours getting nowhere and it's solved in six minutes.
    Quote Quote  
  4. Member
    Join Date
    Jul 2009
    Location
    Spain
    Search Comp PM
    Originally Posted by sambat View Post
    I've been at it for over six hours getting nowhere
    Avisynth can do just about anything, but you need to know what filters to use for the task in hand.
    For future reference, bookmark this page:
    http://avisynth.org/mediawiki/Internal_filters

    This contains a list of all Avisynth's internal filters, broken down by category (including Audio processing filters). Each filter has a brief description and a link to its detailed documentation.

    Often a simple look through this list will immediately give you the answer you need.
    (And in less than six hours you could read the entire documentation from top to bottom.)
    Quote Quote  
  5. Member
    Join Date
    Dec 2005
    Location
    Canada
    Search Comp PM
    Thank you Gavino;I had seen that page and had previously tried to absorb the 'MergeChannels' filter, but until poisondeathray pointed me towards the correct syntax, the examples listed did not help - no doubt my lack of comprehension contributed to my problem, but I think you'll agree that making the jump from:

    video = AviSource("c:\divx_wav.avi")
    audio = WavSource("c:\divx_wav.avi")
    l_ch = GetChannel(audio, 1)
    r_ch = GetChannel(audio, 2)
    stereo = MergeChannels(l_ch, r_ch).ResampleAudio(44100)
    return AudioDub(video, stereo)
    to

    dual = mergechannels(a,a)
    audiodub(v, dual)
    - is hardly intuitive and obvious and I expect ongoing, to find myself reliving the experience.
    Quote Quote  
  6. Member
    Join Date
    Jul 2009
    Location
    Spain
    Search Comp PM
    Yeah, I guess it becomes more obvious and intuitive with experience.

    As you've probably figured by now, the trick in this case is that instead of combining two different audio channels, you want to duplicate the single channel you have. So instead of MergeChannels(l_ch, r_ch), you could use MergeChannels(l_ch, l_ch). But since your clip only has one channel, you can skip the extraction of l_ch via GetChannel(a, 1) and just use 'a' directly as MergeChannels(a, a).
    Quote Quote  



Similar Threads

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