timing picute in a video

This forum is for questions and discussion of all the aspects of handling and cleaning up your footage with Avisynth.
Locked
User avatar
Zarxrax
Joined: Sun Apr 01, 2001 6:37 pm
Contact:
Org Profile

Re: timing picute in a video

Post by Zarxrax » Sat Apr 23, 2011 6:48 pm

Yes, you image that you are overlaying must be the same size as the video.

Try this:

Code: Select all

video = DirectShowSource("C:\Users\Dor\Desktop\פרקי דרגון בול\נקיים\[www.bafsubs.tk]Dragon_Ball_Kai_E1.mkv",fps=23.976,convertfps=true)
part1 = video.Trim(0,300)
part2 = video.Trim(301,404)
part3 = video.Trim(405,0)
image = Imagesource("C:\Users\Dor\Desktop\פרקי דרגון בול\נקיים\pic3.png", pixel_type="RGB32")
video = part1 ++ Overlay(part2, image, x=130, y=180, mask=image.ShowAlpha()) ++ part3

part4 = video.Trim(0,300)
part5 = video.Trim(301,404)
part6 = video.Trim(405,0)
image2 = Imagesource("C:\Users\Dor\Desktop\פרקי דרגון בול\נקיים\dbzkailogo1.png", pixel_type="RGB32")
Overlay(part5, image2, x=-130, y=-180, mask=image.ShowAlpha())
part4 ++ Overlay(part5, image2, x=-130, y=-180, mask=image.ShowAlpha()) ++ part6
You will just ajust the frame numbers in the trims to set which frame range you want the images on.
Sammie-Roto - Free rotoscoping tool

User avatar
Phantasmagoriat
Joined: Mon Feb 06, 2006 11:26 pm
Status: ☁SteamPunked≈☂
Contact:
Org Profile

Re: timing picute in a video

Post by Phantasmagoriat » Sat Apr 23, 2011 6:49 pm

Well, you could use my Range() function. (It doesn't just apply filters, it also does Clip Replacement)

Code: Select all

VID = directshowsource("Your_Base_Video.mp4")
IMG = imagesource("Your_Image.jpg")
OVL = overlay(VID, IMG)

VID
range( startframe,endframe, OVL, fadein,fadeout )
EDIT: for multiple images:

Code: Select all

IMG1 = imagesource("IMAGE1.jpg", pixel_type="RGB32")
IMG2 = imagesource("IMAGE2.jpg", pixel_type="RGB32")

directshowsource("VIDEO.mkv",fps=23.976,convertfps=true)
range( 301,404, Overlay(last, IMG1, x=130, y=180, mask=IMG1.ShowAlpha()), 5,5)
range( 301,404, Overlay(last, IMG2, x=-130, y=-180, mask=IMG2.ShowAlpha()), 5,5)
PLAY FREEDOOM!! | Phan Picks! | THE424SHOW | YouTube | "Painkiller" | Vanilla MIDI's
"Effort to Understand; Effort to be Understood; to See through Different Eyes."

DorDahan
Joined: Fri Apr 22, 2011 7:55 pm
Org Profile

Re: timing picute in a video

Post by DorDahan » Sat Apr 23, 2011 10:13 pm

Zarxrax, i still get error on this line:

Code: Select all

Overlay(part5, image2, x=-130, y=-180, mask=image.ShowAlpha())
something about wight. like i said before.
Phantasmagoriat, i also get error, "there is no function named range"

User avatar
Phantasmagoriat
Joined: Mon Feb 06, 2006 11:26 pm
Status: ☁SteamPunked≈☂
Contact:
Org Profile

Re: timing picute in a video

Post by Phantasmagoriat » Sat Apr 23, 2011 10:23 pm

DorDahan wrote:Phantasmagoriat, i also get error, "there is no function named range"
You need to put Range().avsi in your plugins folder.

(Usually "C:\Program Files (x86)\AviSynth 2.5\plugins" or "C:\Program Files\AviSynth 2.5\plugins")
PLAY FREEDOOM!! | Phan Picks! | THE424SHOW | YouTube | "Painkiller" | Vanilla MIDI's
"Effort to Understand; Effort to be Understood; to See through Different Eyes."

User avatar
Zarxrax
Joined: Sun Apr 01, 2001 6:37 pm
Contact:
Org Profile

Re: timing picute in a video

Post by Zarxrax » Sun Apr 24, 2011 12:15 am

DorDahan wrote:Zarxrax, i still get error on this line:

Code: Select all

Overlay(part5, image2, x=-130, y=-180, mask=image.ShowAlpha())
something about wight. like i said before.
Phantasmagoriat, i also get error, "there is no function named range"
As I said, the overlay image must be the same size as the video
Sammie-Roto - Free rotoscoping tool

DorDahan
Joined: Fri Apr 22, 2011 7:55 pm
Org Profile

Re: timing picute in a video

Post by DorDahan » Sun Apr 24, 2011 6:29 am

i tried to change

Code: Select all

Overlay(part5, image2, x=-130, y=-180, mask=image.ShowAlpha())
-130 and -180 many times.
it doesnt effect anything.. what should i change here?

User avatar
Zarxrax
Joined: Sun Apr 01, 2001 6:37 pm
Contact:
Org Profile

Re: timing picute in a video

Post by Zarxrax » Sun Apr 24, 2011 11:34 am

Ok, maybe I was wrong about the size part. But you need to write the whole error message, because "something about wight" doesn't really tell me anything.
Sammie-Roto - Free rotoscoping tool

DorDahan
Joined: Fri Apr 22, 2011 7:55 pm
Org Profile

Re: timing picute in a video

Post by DorDahan » Sun Apr 24, 2011 3:34 pm

Code: Select all

video = DirectShowSource("C:\Users\Dor\Desktop\dbzkaiep\ep1\[www.bafsubs.tk]Dragon_Ball_Kai_E1.mkv",fps=23.976,convertfps=true)
part1 = video.Trim(0,300)
part2 = video.Trim(301,404)
part3 = video.Trim(405,0)
image = Imagesource("C:\Users\Dor\Desktop\dbzkaiep\ep1\pic7.png", pixel_type="RGB32")
video = part1 ++ Overlay(part2, image, x=130, y=140, mask=image.ShowAlpha()) ++ part3

part4 = video.Trim(0,300)
part5 = video.Trim(301,404)
part6 = video.Trim(405,0)
image2 = Imagesource("C:\Users\Dor\Desktop\dbzkaiep\ep1\dbzkailogo2.png", pixel_type="RGB32")
Overlay(part5, image2, x=450, y=500, mask=image2.ShowAlpha())
part4 ++ Overlay(part5, image2, x=450, y=470, mask=image2.ShowAlpha()) ++ part6

textsub("C:\Users\Dor\Desktop\dbzkaiep\DragonBallKaiStartKaraoke.ass")
i tried to put textsub but it says "textsub: cant open"C'....................................................................."
blah blah; lint 15

DorDahan
Joined: Fri Apr 22, 2011 7:55 pm
Org Profile

Re: timing picute in a video

Post by DorDahan » Sun Apr 24, 2011 3:42 pm

when i use the code this way:

Code: Select all

textsub("C:\Users\Dor\Desktop\dbzkaiep\[www.bafsubs.tk]Dragon Ball Kai E1.ass")
video = DirectShowSource("C:\Users\Dor\Desktop\dbzkaiep\ep1\[www.bafsubs.tk]Dragon_Ball_Kai_E1.mkv",fps=23.976,convertfps=true)
part1 = video.Trim(0,300)
part2 = video.Trim(301,404)
part3 = video.Trim(405,0)
image = Imagesource("C:\Users\Dor\Desktop\dbzkaiep\ep1\pic7.png", pixel_type="RGB32")
video = part1 ++ Overlay(part2, image, x=130, y=140, mask=image.ShowAlpha()) ++ part3

part4 = video.Trim(0,300)
part5 = video.Trim(301,404)
part6 = video.Trim(405,0)
image2 = Imagesource("C:\Users\Dor\Desktop\dbzkaiep\ep1\dbzkailogo2.png", pixel_type="RGB32")
Overlay(part5, image2, x=450, y=500, mask=image2.ShowAlpha())
part4 ++ Overlay(part5, image2, x=450, y=470, mask=image2.ShowAlpha()) ++ part6
i get script error invaild arguments to function "textsub"

User avatar
Zarxrax
Joined: Sun Apr 01, 2001 6:37 pm
Contact:
Org Profile

Re: timing picute in a video

Post by Zarxrax » Sun Apr 24, 2011 6:39 pm

I dont see anything wrong with your textsub line. Make sure the path to the file is correct.

But anyways, you will need to remove that line or get it working in order for it to tell an error about anything else.
Sammie-Roto - Free rotoscoping tool

Locked

Return to “AviSynth Help”