View Single Post
Old 21st July 2018, 13:41   #8  |  Link
magiblot
Eurobeat Fan
 
Join Date: Sep 2014
Posts: 108
No problem

Try with the following changes:

Code:
source_audio_channels = clp.AudioChannels() #Does this return 0 if there is no audio?

myaudio = (source_audio_channels==0) ? GetChannels(myfakeaudio, 1, 2) :
\ (source_audio_channels==1) ? GetChannels(clean, 1) :
\ (source_audio_channels==2) ? GetChannels(clean, 1, 2) :
\ (source_audio_channels==3) ? GetChannels(clean, 1, 2, 3) :
\ (source_audio_channels==4) ? GetChannels(clean, 1, 2, 3, 4) :
\ (source_audio_channels==5) ? GetChannels(clean, 1, 2, 3, 4, 5) :
\ (source_audio_channels==6) ? GetChannels(clean, 1, 2, 3, 4, 5, 6) :
\ (source_audio_channels==7) ? GetChannels(clean, 1, 2, 3, 4, 5, 6, 7) :
\ (source_audio_channels==8) ? GetChannels(clean, 1, 2, 3, 4, 5, 6, 7, 8) :
\ NOP()

for_audio_levels = AudioDub(myblack, myaudio)

audio_levels = for_audio_levels.Histogram("audiolevels").Crop(0, 0, -736, -0).BilinearResize(340, 420)

my_audio_levels_overlay = Overlay(audio_levels, x=700, y=450, opacity=1.0, mode="blend", greymask=true, ignore_conditional=false, pc_range=false)


final=Overlay(my_audio_levels_overlay) #you will probably want to add additional parameters
There could be syntax errors, I edited this from mobile.
magiblot is offline   Reply With Quote