Hi. I have two videos, Alpha and Bravo, and I've created an avisynth script for each. I want to make a third video, Charlie, using the script: 'Import(Alphascript ++ Bravoscript)'.
I've managed to fix the errors that arose because of the different Dimensions and FrameRates but I'm stuck at the error: 'Splice: The number of audio channels doesn't match'.
For Alpha, mediainfo says:
Audio
ID : 2
Format : AAC
Format/Info : Advanced Audio Codec
Format profile : LC
Codec ID : mp4a-40-2
Duration : 23 min 22 s
Bit rate mode : Variable
Bit rate : 38.0 kb/s
Maximum bit rate : 96.0 kb/s
Channel(s) : 2 channels
Channel(s)_Original : 1 channel
Channel positions : Front: C
Sampling rate : 22.05 kHz
Frame rate : 21.533 FPS (1024 SPF)
Compression mode : Lossy
Stream size : 6.35 MiB (3%)
Encoded date : UTC 1970-01-01 00:00:00
Tagged date : UTC 2011-12-06 02:51:01
Other #1
ID : 65536
Type : Hint
Format : RTP
Codec ID : rtp
Duration : 23 min 21 s
Encoded date : UTC 2011-12-06 02:50:59
Tagged date : UTC 2011-12-06 02:51:01
Other #2
ID : 65537
Type : Hint
Format : RTP
Codec ID : rtp
Duration : 23 min 22 s
Encoded date : UTC 2011-12-06 02:51:01
Tagged date : UTC 2011-12-06 02:51:01
Bit rate mode : VBR
And for Bravo:
Audio
ID : 1
Format : AAC
Format/Info : Advanced Audio Codec
Format profile : LC
Codec ID : mp4a-40-2
Duration : 22 min 25 s
Bit rate mode : Variable
Bit rate : 160 kb/s
Maximum bit rate : 576 kb/s
Channel(s) : 2 channels
Channel positions : Front: L R
Sampling rate : 48.0 kHz
Frame rate : 46.875 FPS (1024 SPF)
Compression mode : Lossy
Stream size : 25.6 MiB (4%)
The bulk of Charlie will be from Bravo so how do I script Alpha to give it the same audio properties as Bravo? At present, Alphascript looks like this:
Many thanks if you can help. Also, can anyone explain those two 'Other' audio tracks which are showing up as I can only 'see' the main track?Code:global MeGUI_darx = 4 global MeGUI_dary = 3 LoadPlugin("E:\Free\MeGUI\tools\lsmash\LSMASHSource.dll") a=LSMASHVideoSource("E:\Alpha.mp4").AssumeFPS(30000,1001) b=LSMASHaudioSource("E:\Alpha.mp4") audiodub(a,b) Crop(102, 8, -100, -8) trim(0,82).IResize(720,480)
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays! or rip iTunes movies!
+ Reply to Thread
Results 1 to 9 of 9
Thread
-
-
See ConvertToMono, MergeChannels.
Last edited by jagabo; 5th Jun 2018 at 07:51.
-
Thanks for the hint, jagabo. Alphascript is now:
Code:a=LSMASHVideoSource("E:\alpha.mp4").AssumeFPS(30000,1001) b=LSMASHaudioSource("E:\alpha.mp4").converttomono().resampleaudio(48000) audiodub(a,b) Crop(102, 8, -100, -8) trim(0,82).IResize(720,480)
Code:a=LSMASHVideoSource("E:\bravo.mp4") b=LSMASHaudioSource("E:\bravo.mp4").converttomono() audiodub(a,b) trim(0,300)
You'll note that I've not made use of your other hint, MergeChannels. Could I have done this a better way? Thanks again. -
If most of your video has a stereo track wouldn't you want to keep that and convert the other clips mono track to stereo? MergeChannels(b,b) will put the mono audio track on both the left and right channels (ConvertToStereo used to do that but it was eliminated some time back). Or just create your own ConverToStereo function and call it in your script:
Code:function ConvertToStereo(clip a) { MergeChannels(a,a) }
-
Believe it or not, I did try 'ConvertToStereo' on the basis that it should exist given there's a 'ConvertToMono'. However, after getting the 'no function called ConvertToStereo' error, I didn't pursue it further. Your function works fine, though, so thanks (again).
-
There used to be a ConvertToStereo() but it was removed at some point (2.58?). Probably because the MergeChannels() equivalent is so simple.
-
Currently, Bravoscript is as simple as it gets, nothing fancy has been done to it. I need Alpha to be the same as Bravo which is why Alphascript is:
Code:function ConvertToStereo(clip a) { MergeChannels(a,a) } a=LSMASHVideoSource("E:\alpha.mp4").AssumeFPS(30000,1001) b=LSMASHaudioSource("E:\alpha.mp4").converttostereo().resampleaudio(48000) audiodub(a,b) Crop(102, 8, -100, -8) trim(0,82).IResize(720,480)
Last edited by pooksahib; 5th Jun 2018 at 15:05.
-
As far as I know you can't pipe the mono source directly to MergeChannels() to create stereo. There's no way to tell it to repeat the single mono track to create stereo if you do that.
-
Got it!
Code:a=LSMASHVideoSource("E:\alpha.mp4").AssumeFPS(30000,1001) b=LSMASHaudioSource("E:\alpha.mp4").resampleaudio(48000) c=mergechannels(b,b) audiodub(a,c)
Similar Threads
-
Audio editing match points
By Sgtpeprz in forum AudioReplies: 2Last Post: 8th Jul 2017, 20:56 -
AviSynth - The output video aspect ratio doesn't match the original one.
By Osram123 in forum Video ConversionReplies: 4Last Post: 5th Apr 2016, 00:16 -
the clip doesn't match the sequence help , premiere cc 2015
By rama in forum EditingReplies: 7Last Post: 3rd Apr 2016, 18:41 -
Match audio track to video
By william_homyk in forum AudioReplies: 5Last Post: 2nd Nov 2015, 07:01 -
Add audio track to M4V that already has a variable number of audio tracks
By ppomes in forum LinuxReplies: 5Last Post: 5th May 2015, 19:21