PDA

View Full Version : how to insert 10sec pic


Ruriko
25th June 2009, 01:59
I want to insert a picture at the beginning of the video for 10 seconds. How can I do this?

Mug Funky
25th June 2009, 11:07
yourvideosource("some_file.yay")

the()
rest(of)
your(script)

imagesource("blahblah.pic",end=10*last.framerate())++last

Ruriko
25th June 2009, 12:37
It doesn't work I get an error saying this
http://i39.tinypic.com/21j2fpe.gif
This is what my script looks like
AVISource("C:\Downloads\e.avi", audio=false)
imagesource("C:\Downloads\video.bmp",end=10*last.framerate())++last

Rumbah
25th June 2009, 13:40
Try

AVISource("C:\Downloads\e.avi", audio=false)
imagesource("C:\Downloads\video.bmp",end=Round(10*last.framerate()))++last

Gavino
25th June 2009, 14:43
This isn't necessarily quite as trivial as you might think.
Other factors to take into account:
- does the image size match the video?
- color spaces match?
- does the video have an audio track?

JohannesL
28th June 2009, 17:55
The easy way:

vid = AVISource("C:\Downloads\e.avi", audio=false)
imagesource("C:\Downloads\video.bmp",end=Round(10*last.framerate())).Lanczos4Resize(vid.Width(),vid.Height()).ChangeFPS(vid.FrameRate())
vid.IsYV12() ? last.ConvertToYV12() : last
vid.IsYUY2() ? last.ConvertToYUY2() : last
vid.IsRGB24() ? last.ConvertToRGB24() : last
vid.IsRGB32() ? last.ConvertToRGB32() : last
img = last
img ++ vid