Could anyone recommend ways to make this script a little faster? I`m not sure if it is possible but I`ve got it from 5 fps to 8 fps when encoding it to mpeg with FreeEnc and I`m hoping that an expert opinion could maybe eek out a bit more speed.
The script is between asterisks....
********
# red shifter (3d anaglyph?)
# this script shifts the red channel up and
# to the left an arbitrary amount of pixels
# load plugin that takes 29.970 fps source and converts to 25 fps
LoadPlugin("C:\AVI\plugins\decomb510.dll")
audio=AviSource("C:\AVI\video_data\video.avi")
audio=ConvertAudioToFloat(audio)
audio=SSRC(audio, 48000)
# load left and right sources
source=AVISource("c:\AVI\video_data\video.avi")
# Right source is same as left but one frame behind to show movement
source2=trim(source, 1, 0)
# if the source is yuv it needs to be converted to rgb
source=ConvertToRGB(source)
source2=ConvertToRGB(source2)
# split the red and cyan channels
red =RGBAdjust(source, 1,0,0,1)
cyan=RGBAdjust(source2, 0,1,1,1)
# overlay
video=Overlay(cyan,red,-4,-3,opacity=0.5,output="YV12")
# optionally crop and tweak
video=Tweak(video, sat=2,bright=2,cont=2)
# video=ConvertToYV12(video)
film=AssumeFPS(film, 25.000, true)
return(film)
********
The original script I found posted anonymously on an old 3d site, it simply shifted the red for one video to produce a really good anaglyph effect. I amended this to make the film a combination of two sources (identical avi) but with one started a frame later so that you get a true 3D effect based on the movement difference between the frames.
Trouble is I can`t make it speed up. Any help would be really appreciated