Looks about right, might need [EDIT: WILL NEED] some adjustment to dimension, overlay coords.
Have used Histogram(mode="StereoOverlay") for the mylissajou thing, hope that its correct.
Code:
#simple Videoscope by FranceBB:- https://forum.doom9.org/showthread.php?t=175249
#it resembles Tektronix WVR 7020
#Accepts 8bit clip only. It works internally in 4:2:0 (yv12)
#Accepts up to 8 audio channels
Function VideoTek(clip clp) {
clp
nChannels=(HasAudio)?AudioChannels:0 # ssS, HasAudio = audio_samples_per_second!=0
#Assert block
Assert(IsYV12,"VideoTek: source must be yv12 (YUV 4:2:0 8bit)")
# Assert(IsFrameBased, "VideoTek: source must be progressive") # ssS, IsFrameBased means SeparateFields NOT used, does not indicate Progressive
Assert(nChannels<9,"VideoTek: sources with more than 8 audio channels are not supported")
SilentStereo=Last.BlankClip(width=1480, height=920,audio_rate=48000,channels=2,sample_type="Float")
myBlack= (nChannels>0) ? SilentStereo.AudioDubEx(Last) : SilentStereo.Killaudio
Stereo = (nChannels>=2) ? Last.GetChannels(1,2) : (nChannels==1) ? MergeChannels(GetChannels(1),GetChannels(1)) : SilentStereo
StereoClip = Last.BlankClip(width=460,height=460).AudioDub(Stereo) # Histogram(mode="StereoOverlay") requires 2 channel only clip.
clean1=PointResize(704, 396)
Picture = clean1
luma = clean1.TurnRight.Histogram(mode="classic").TurnLeft.Crop(0,0,0,256).BilinearResize(704, 396)
chroma = clean1.Histogram("color2").Crop(704, 0, 256,256).BilinearResize(480,480)
Audio = myBlack.Crop(0,0,340,420).Histogram(Mode="audiolevels")
mylissajou = StereoClip.Histogram(mode="StereoOverlay") # Dont know where to get lissajou from, so improvised
Result = MyBlack
Result = Result.Overlay(Picture, x=0, y=0) # ssS, Removed all of the Optional Args assigned with Defaults
Result = Result.Overlay(luma, x=710, y=0)
Result = Result.Overlay(chroma, x=100, y=430)
Result = Result.Overlay(Audio, x=700, y=450)
Result = Result.Overlay(mylissajou, x=1000,y=450)
return Result
}
EDIT: BugFixed : EDIT: Same bug fixed AGAIN !!!
Untested with more than 2 channels. [EDIT: or with single channel, tested on 0 and 2 channels only]
Code:
ColorBars(Pixel_Type="YV12")
VideoTek
Return Last.Spline64Resize(854,480)
EDIT: Below bottom right image is more like what I remember as lissajou figure [EDIT: perhaps samplerate just too low]
EDIT:
Quote:
Stereo = (nChannels>=2) ? Last.GetChannels(1,2) : SilentStereo
|
Not sure how to process/mix multiple channels into stereo, above, just selected Left and Right.