Log in

View Full Version : BlankClip "losing" video


TCmullet
23rd November 2020, 18:57
I have a special situation where I want to play two videos in two separate VDub windows. For each video, I need to mix the stereo sound to mono, then play the mono mix on ONLY one of the channels. This is so I can hear the audio of each program in a different speaker. The code for my left video works correctly. I see and hear the audio in the left channel only, as well as video in the Vdub video panes:


ConvertToMono # mix to mono
MergeChannels(last,last) # dup the mono to dual mono
left=GetLeftChannel
right=GetRightChannel.BlankClip # silence right channel
MergeChannels(left,right)
last


However, my corresponding code for the right channel video does not work correctly. Audio is correct (is in the right channel only), but the video is blank.


ConvertToMono # mix to mono
MergeChannels(last,last) # dup the mono to dual mono
left=GetLeftChannel.BlankClip # silence left channel
right=GetRightChannel
MergeChannels(left,right)
last


What have I missed? (Both videos play fine when neither of these code fragments are present in their respective scripts.)

wonkey_monkey
23rd November 2020, 19:35
MergeChannels takes video from the first input clip. Try using Amplify(0) intead of BlankClip.

I think you've got a bit of redunancy there and could probably simplify to


ConvertToMono
MergeChannels(last, last.Amplify(0))
# other script: MergeChannels(last.Amplify(0), last)

TCmullet
24th November 2020, 19:46
Great! Thanks, Monkey! There's code that works, and code that's EFFICIENT! (Funny as I've used Ampllfy hundreds of times, but never thought to use it to silence a track.)