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:
Code:========================== # 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) ==========================
+ Reply to Thread
Results 1 to 2 of 2
-
-
If you want the PIP window to appear but for the contained video to wait 8 seconds before starting, then add an 8 second blankclip() to the beginning of the video in the PIP window. If you want the first video to begin and then after eight seconds to have the PIP window appear and start the second video, then you'll need to break the main video into sections using the trim() function. The first section 8 seconds long and the other the rest of the video. Then apply the Layer() line only to the second section, then recombine the initial 8 second video to the now PIP clip.
"Shut up Wesley!" -- Captain Jean-Luc Picard
Buy My Books
Similar Threads
-
MPC-HC : audio does not pause when video pauses for H264 video
By kswartz in forum Newbie / General discussionsReplies: 3Last Post: 28th Jul 2011, 01:56 -
[Avisynth] What are the filters used in this video?
By Cloudstrifeff7 in forum Newbie / General discussionsReplies: 4Last Post: 22nd Apr 2010, 09:40 -
How to get max clear stills, when pause a video - should I deinterlace??
By vantechmag in forum EditingReplies: 2Last Post: 11th May 2009, 17:55 -
video uploader w/ pause
By zoobie in forum Newbie / General discussionsReplies: 0Last Post: 1st May 2009, 22:16 -
Recommendations for AVISYnth NTSC video (60i) to PAL video (50p)
By csdesigns in forum Video ConversionReplies: 7Last Post: 3rd Feb 2009, 10:33