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()
+ Reply to Thread
Results 1 to 6 of 6
-
-
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()
-
Much obliged - I've been at it for over six hours getting nowhere and it's solved in six minutes.
-
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.) -
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)
dual = mergechannels(a,a)
audiodub(v, dual) -
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).
Similar Threads
-
How to increase the bitrate of a video by avisynth ?
By avengerevenge in forum EditingReplies: 31Last Post: 11th May 2013, 00:13 -
AviSynth script to increase picture quality of VHS to DVD?
By VideoFanatic in forum RestorationReplies: 5Last Post: 30th Sep 2011, 07:33 -
ffmpeg Number of stream maps must match number of output streams
By tmiller_15 in forum Blu-ray RippingReplies: 1Last Post: 13th Nov 2010, 06:20 -
Question about number of listeners to a particular audio stream
By jimdagys in forum Video Streaming DownloadingReplies: 1Last Post: 11th Sep 2009, 20:57 -
Increase Audio Volume?
By ambrosechapel in forum ffmpegX general discussionReplies: 6Last Post: 7th Nov 2007, 08:05