|
|
Add a single frame to the beginning of video
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?
common guys, there has to be a way!
that is a very tribial problen, I write 3 metodes examples, you need to adapt they to your needs.
-----------------------------metode 1------------------------------
video = AviSource(quot;mivideo.aviquot;,pixel_type =quot;YV12quot;)
textVideo = BlankClip(video,length=1,color=$000000).ConvertToYV12()
textVideo.Subtitle(quot;your textquot;)
return textVideo + video
-----------------------------metode 2------------------------------
you can create very good text with this metode using ssa or usf intesteead of the native filter.
LoadPlugin(quot;vsfilter.dllquot;)
video = AviSource(quot;mivideo.aviquot;,pixel_type =quot;YV12quot;)
textVideo = BlankClip(video,length=1,color=$000000).ConvertToYV12()
Textvideo.VobSub(quot;your txt in subtitle format.ssaquot;)
return textVideo + video
-----------------------------metode 3------------------------------
ading a single image:
video = AviSource(quot;mivideo.aviquot;,pixel_type =quot;YV12quot;)
textVideo = ImageSource(string file = quot;image.pngquot;, end 1, fps = Framerate (video) ).LanczosResize(Width (video) , Height (video) ).ConvertToYV12()
return textVideo + videoSorry for my bad englsih.
This is the script I am useing:
Code:
LoadPlugin(quot;C:\Custom\Programs\Audio\AviSynth 2.5.5\plugins\DGDecode.dllquot;)
LoadPlugin(quot;C:\Custom\Programs\Audio\AviSynth 2.5.5\plugins\Decomb521.dllquot;)
video = MPEG2Source(quot;test.d2vquot;,cpu=4,idct=4,ipp=false)
image = ImageSource(quot;titlescreen.jpgquot;,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?Got it,Code:
LoadPlugin(quot;C:\Custom\Programs\Audio\AviSynth 2.5.5\plugins\DGDecode.dllquot;)
LoadPlugin(quot;C:\Custom\Programs\Audio\AviSynth 2.5.5\plugins\Decomb521.dllquot;)
video = MPEG2Source(quot;test.d2vquot;,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(quot;titlescreen.jpgquot;,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?
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.
of course, just use trim to get the parts you wanna keep
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: 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.
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 ^^UCode:
LoadPlugin(quot;C:\....\fdecimate101\FDecimate.dllquot;)
video = avisource(quot;G:\video.aviquot;).fdecimate(rate=23.976)
imagen = ImageSource(quot;G:\...\Wallpaper_xD-02.jpgquot;,end=350,fps=23.976).ConvertToYV12().LanczosResize(640,480)
audio = BlankClip(imagen, audio_rate=48000)
AudioDub(imagen, audio)
return imagen++video
Any ideas?
Sure, you forgot to assign AudioDub back to anything. Should be:
imagen = AudioDub(imagen, audio) |
|