raslvideos
15th February 2009, 21:10
Hi,
I'm using a script to make a PIP (Picture in Picture).
This script is OK, but the source video 2 starts at the same time that the source video 1.
I want to make that thw source video 2 starts only after 8 seconds than the source video 1.
someone help me?
It' is the script:
==========================
# www.hitthebongo.co.uk
# Picture in picture effect - pip displayed in top right corner with border
# "DirectshowSource" paramater allows wmv videos to be used. It may be possible for other video types to be used if the relevant DS filters are installed...
# ... If windows media player can play a file then you probably have the relevant DS filter. Therefore the file type might work in this script
# Audio is only associated with the first rendered clip which will be the main clip
###########USER SETTINGS##############
MainVideo= "C:\video1.mpg" # This is the main source video
PipVideo= "C:\video2.mpg" # This is the pip video source
PipWidthPercentage=35 # This sets the pip width, expressed as a percentage of the MAIN VIDEO/screen width. 50 results in a pip which is half the width of the MainVideo
PipHeightPercentage=40 # Same as above , but for Height
PipTopPercentage=5 # Expressed as a percentage of MainVideo Height # Read NOTES below
PipLeftPercentage=55 #Expressed as a percentage of MainVideo Width # Read NOTES below
BorderThickness=2 # Expressed as a percentage of the PIP video width
BorderColour=$FFFFFF # Visit http://en.wikipedia.org/wiki/List_of_colors for more Hex Triplet Colour Codes
#NOTES
# The Width and Height and placement co-ordinates of a pip video are usually expressed in pixels. I have instead opted for percentage values of the original...
#... MainVideo as I believe this approach is more intuitive.
#The top left hand corner of the pip video is placed somewhere from the left of the screen and a somewhere below the top.
##########END OF USER SETTINGS##############
main=DirectShowSource( MainVideo ).ConvertToYUY2()
mainW=Width(main)
mainH=Height(main)
PipWidth=int(mainW*PipWidthPercentage/100)
PipHeight=int(mainH*PipHeightPercentage/100)
piptop=int(mainH*PipTopPercentage/100)
pipleft=int(mainW*PipLeftPercentage/100)
PipWidth=int(PipWidth-PipWidth%2)
PipHeight=int(PipHeight-PipHeight%2)
BorderThickness=int(BorderThickness*PipWidth/100)
PipVideo=DirectShowSource( PipVideo ).bicubicresize(PipWidth,PipHeight).AddBorders(BorderThickness,BorderThickness,BorderThickness,BorderThickness, BorderColour).bicubicresize(PipWidth,PipHeight).ConvertToYUY2()
Layer(main,PipVideo,"add",255,pipleft,piptop)
I'm using a script to make a PIP (Picture in Picture).
This script is OK, but the source video 2 starts at the same time that the source video 1.
I want to make that thw source video 2 starts only after 8 seconds than the source video 1.
someone help me?
It' is the script:
==========================
# www.hitthebongo.co.uk
# Picture in picture effect - pip displayed in top right corner with border
# "DirectshowSource" paramater allows wmv videos to be used. It may be possible for other video types to be used if the relevant DS filters are installed...
# ... If windows media player can play a file then you probably have the relevant DS filter. Therefore the file type might work in this script
# Audio is only associated with the first rendered clip which will be the main clip
###########USER SETTINGS##############
MainVideo= "C:\video1.mpg" # This is the main source video
PipVideo= "C:\video2.mpg" # This is the pip video source
PipWidthPercentage=35 # This sets the pip width, expressed as a percentage of the MAIN VIDEO/screen width. 50 results in a pip which is half the width of the MainVideo
PipHeightPercentage=40 # Same as above , but for Height
PipTopPercentage=5 # Expressed as a percentage of MainVideo Height # Read NOTES below
PipLeftPercentage=55 #Expressed as a percentage of MainVideo Width # Read NOTES below
BorderThickness=2 # Expressed as a percentage of the PIP video width
BorderColour=$FFFFFF # Visit http://en.wikipedia.org/wiki/List_of_colors for more Hex Triplet Colour Codes
#NOTES
# The Width and Height and placement co-ordinates of a pip video are usually expressed in pixels. I have instead opted for percentage values of the original...
#... MainVideo as I believe this approach is more intuitive.
#The top left hand corner of the pip video is placed somewhere from the left of the screen and a somewhere below the top.
##########END OF USER SETTINGS##############
main=DirectShowSource( MainVideo ).ConvertToYUY2()
mainW=Width(main)
mainH=Height(main)
PipWidth=int(mainW*PipWidthPercentage/100)
PipHeight=int(mainH*PipHeightPercentage/100)
piptop=int(mainH*PipTopPercentage/100)
pipleft=int(mainW*PipLeftPercentage/100)
PipWidth=int(PipWidth-PipWidth%2)
PipHeight=int(PipHeight-PipHeight%2)
BorderThickness=int(BorderThickness*PipWidth/100)
PipVideo=DirectShowSource( PipVideo ).bicubicresize(PipWidth,PipHeight).AddBorders(BorderThickness,BorderThickness,BorderThickness,BorderThickness, BorderColour).bicubicresize(PipWidth,PipHeight).ConvertToYUY2()
Layer(main,PipVideo,"add",255,pipleft,piptop)