View Full Version : Add a single frame to the beginning of video
TMLewiss2
16th February 2005, 10:30
I want to add some info at the begining of a video. Maybe just like one frame with text or something. Any ideas? I usually use VDmob and AVISynth to edit my vids, so if you know a plugin or something like that?
TMLewiss2
17th February 2005, 10:23
common guys, there has to be a way!
Phanton_13
17th February 2005, 11:12
that is a very tribial problen, I write 3 metodes examples, you need to adapt they to your needs.
-----------------------------metode 1------------------------------
video = AviSource("mivideo.avi",pixel_type ="YV12")
textVideo = BlankClip(video,length=1,color=$000000).ConvertToYV12()
textVideo.Subtitle("your text")
return textVideo + video
-----------------------------metode 2------------------------------
you can create very good text with this metode using ssa or usf intesteead of the native filter.
LoadPlugin("vsfilter.dll")
video = AviSource("mivideo.avi",pixel_type ="YV12")
textVideo = BlankClip(video,length=1,color=$000000).ConvertToYV12()
Textvideo.VobSub("your txt in subtitle format.ssa")
return textVideo + video
-----------------------------metode 3------------------------------
ading a single image:
video = AviSource("mivideo.avi",pixel_type ="YV12")
textVideo = ImageSource(string file = "image.png", end 1, fps = Framerate (video) ).LanczosResize(Width (video) , Height (video) ).ConvertToYV12()
return textVideo + video
Sorry for my bad englsih.
TMLewiss2
17th February 2005, 23:21
This is the script I am useing:
LoadPlugin("C:\Custom\Programs\Audio\AviSynth 2.5.5\plugins\DGDecode.dll")
LoadPlugin("C:\Custom\Programs\Audio\AviSynth 2.5.5\plugins\Decomb521.dll")
video = MPEG2Source("test.d2v",cpu=4,idct=4,ipp=false)
image = ImageSource("titlescreen.jpg",0,0,Framerate (video)).LanczosResize(Width (video), Height (video)).ConvertToYV12()
video.Telecide(order=1,guide=0)
video.Decimate()
video.Crop(12, 4, -8, -4)
image.Crop(12, 4, -8, -4)
return image + video
That works, but it is not doing any of the filters (telecide, decimate, or crop). Also, if I do that, will I have audio sync problems?
TMLewiss2
17th February 2005, 23:42
Got it,
LoadPlugin("C:\Custom\Programs\Audio\AviSynth 2.5.5\plugins\DGDecode.dll")
LoadPlugin("C:\Custom\Programs\Audio\AviSynth 2.5.5\plugins\Decomb521.dll")
video = MPEG2Source("test.d2v",cpu=4,idct=4,ipp=false)
video = video.Telecide(order=1,guide=0)
video = video.Decimate()
video = video.Crop(12, 4, -8, -4)
image = ImageSource("titlescreen.jpg",0,0,Framerate (video)).LanczosResize(Width (video), Height (video)).ConvertToYV12()
return image + video
That works as far as I can see, but can you guys see and problems that could occur with this script?
TMLewiss2
18th February 2005, 10:38
OK, with the problem fix I came with above. (Reassigning the variable every time I do something) It is impossible to cut out commercials with Trim, any suggestions.
E-Male
18th February 2005, 11:50
of course, just use trim to get the parts you wanna keep
Phanton_13
19th February 2005, 14:17
in avs each secuence is independent ( image and video in the script )and if you edit any of then it don't afecct the others, but for propiertis it reads the propierties of the last modified sequence befoire it, for that you can use trim whitout worry.
using image reader if i don't be worng you only can have a minimal desincronization, that correspont to the number of frames tghat you put, using the ssa version you don't have this problem, but they have a simple solution:
afther the image you ned to put:
---------------------------------------------------------
audio = BlankClip(image, audio_rate=Audiorate(video))
AudioDub(image, audio)
----------------------------------------------------------
this is a part of the opening of a anime that I edited using avs: http://www.terra.es/personal5/965766427/video/demo.avi
is a demo video, the text is original in kana( japanese letters) and I passed it to roman letters, you can see part of a kana and part of a roman letters, is for you can see the power of avs.
Sorry for my bad english.
oligophant
5th March 2006, 14:09
hi guys, for some reason ---------------------------------------------------------
audio = BlankClip(image, audio_rate=Audiorate(video))
AudioDub(image, audio)
---------------------------------------------------------- doesn't works for me.
Take a look and see whats the problem could be ^^U
LoadPlugin("C:\....\fdecimate101\FDecimate.dll")
video = avisource("G:\video.avi").fdecimate(rate=23.976)
imagen = ImageSource("G:\...\Wallpaper_xD-02.jpg",end=350,fps=23.976).ConvertToYV12().LanczosResize(640,480)
audio = BlankClip(imagen, audio_rate=48000)
AudioDub(imagen, audio)
return imagen++video
Any ideas?
foxyshadis
5th March 2006, 17:46
Sure, you forgot to assign AudioDub back to anything. Should be:
imagen = AudioDub(imagen, audio)
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.