timing picute in a video

This forum is for questions and discussion of all the aspects of handling your footage. If you have questions about capturing/ripping footage, AviSynth, or compression/encoding/converting, look here.

Re: timing picute in a video

Postby 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.
User avatar
Zarxrax
 
Joined: 01 Apr 2001
Location: Concord, NC

Re: timing picute in a video

Postby 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)
Image
Org Profile | AMVGuide | Phan Picks! | THE424SHOW | YouTube | "Galactic Escape"

"Effort to Understand; Effort to be Understood; to See through Different Eyes."
User avatar
Phantasmagoriat
 
Joined: 06 Feb 2006
Status: ☁SteamPunked≈☂

Re: timing picute in a video

Postby 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"
DorDahan
 
Joined: 22 Apr 2011

Re: timing picute in a video

Postby 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")
Image
Org Profile | AMVGuide | Phan Picks! | THE424SHOW | YouTube | "Galactic Escape"

"Effort to Understand; Effort to be Understood; to See through Different Eyes."
User avatar
Phantasmagoriat
 
Joined: 06 Feb 2006
Status: ☁SteamPunked≈☂

Re: timing picute in a video

Postby 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
User avatar
Zarxrax
 
Joined: 01 Apr 2001
Location: Concord, NC

Re: timing picute in a video

Postby 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?
DorDahan
 
Joined: 22 Apr 2011

Re: timing picute in a video

Postby 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.
User avatar
Zarxrax
 
Joined: 01 Apr 2001
Location: Concord, NC

Re: timing picute in a video

Postby 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: 22 Apr 2011

Re: timing picute in a video

Postby 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"
DorDahan
 
Joined: 22 Apr 2011

Re: timing picute in a video

Postby 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.
User avatar
Zarxrax
 
Joined: 01 Apr 2001
Location: Concord, NC

Re: timing picute in a video

Postby DorDahan » Sun Apr 24, 2011 6:48 pm

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\פרקי דרגון בול\נקיים\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\פרקי דרגון בול\נקיים\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\ep1\DragonBallKaiStartKaraoke.ass")


used this code.. its opens with out errors but i cant see the text.... what now? :cry:
DorDahan
 
Joined: 22 Apr 2011

Re: timing picute in a video

Postby Phantasmagoriat » Wed Apr 27, 2011 7:55 am

Perhaps there is something wrong with your subtitles. Maybe check the timecodes with a program like Aegisub, and re-save your subs.
Image
Org Profile | AMVGuide | Phan Picks! | THE424SHOW | YouTube | "Galactic Escape"

"Effort to Understand; Effort to be Understood; to See through Different Eyes."
User avatar
Phantasmagoriat
 
Joined: 06 Feb 2006
Status: ☁SteamPunked≈☂

Re: timing picute in a video

Postby Mister Hatt » Sun May 01, 2011 8:55 am

At this point it's probably just faster to use a .ass script for subtitles and textsub() it. Just remember to set the encoding flag for Hebrew or you get some fancy word order issues that are a pain to fix. Phantasmagoriat's suggestion of Aegisub is right on, that's the app you need.
Mister Hatt
 
Joined: 25 Dec 2007
Status: better than you

Previous

Return to Footage Help

Who is online

Users browsing this forum: No registered users and 0 guests