搜索 社区服务 统计排行 帮助
  • 1566阅读
  • 4回复

关于AVS加载图片问题

楼层直达
级别: 新手上路
注册时间:
2004-12-31
在线时间:
0小时
发帖:
42
想用AVS加载LOGO图片,可是不知道该怎么写淡入淡出效果
网上寻找和研究说明书(英文看的不是很懂)的结果如下:

LoadPlugin("C:\PROGRA~1\GORDIA~1\DGMPGDec\DGDecode.dll")
LoadPlugin("C:\PROGRA~1GORDIA~1\AviSynthPlugins\decomb.dll")
LoadPlugin("C:\PROGRA~1\GORDIA~1\AviSynthPlugins\UnDot.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\VSFilter.dll")

movie=mpeg2source("C:\Documents and Settings\leyanzhang\桌面\pichu.d2v").Telecide(order=1,guide=1).Decimate().crop(4,60,-4,-60).Undot().textSub("C:\Documents and Settings\leyanzhang\桌面\piqiu.ssa")

logo = ImageSource("C:\Documents and Settings\leyanzhang\桌面\LOGO.jpg")

clip1 = movie.Trim(51,100)
clip2 = movie.Trim(51,100)

Anima1 = Animate(0,24,"overlay", clip1,logo,20,20,0.0, clip1,logo,20,20,1.0)

Anima2 = Animate(25,20,"overlay", clip2,logo,20,20,1.0, clip2,logo,20,20,0.0)
Anima = movie.Trim(0,50)+Anima1+Anima2+movie.Trim(101,0)

Return Anima

请问哪里错了么?该怎么改或者怎么写呢?
先谢谢大家了~~
级别: 侠客
注册时间:
2005-06-19
在线时间:
0小时
发帖:
606
只看该作者 1楼 发表于: 2006-07-02
淡入淡出可以使用FadeIn、FadeOut,具体使用方法见下面的原文~
===============================
FadeIn (clip clip, int num_frames, int "color", float "fps")
FadeIO (clip clip, int num_frames, int "color", float "fps")
FadeOut (clip clip, int num_frames, int "color", float "fps")

FadeIn0 (clip clip, int num_frames, int "color", float "fps")
FadeIO0 (clip clip, int num_frames, int "color", float "fps")
FadeOut0 (clip clip, int num_frames, int "color", float "fps")

FadeIn2 (clip clip, int num_frames, int "color", float "fps")
FadeIO2 (clip clip, int num_frames, int "color", float "fps")
FadeOut2 (clip clip, int num_frames, int "color", float "fps")

FadeOut cause the video stream to fade linearly to black or the specified RGB color at the end. Similarly FadeIn cause the video stream to fade linearly from black or the specified RGB color at the start. FadeIO is a combination of the respective FadeIn and FadeOut functions. The sound track (if present) also fades linearly to or from silence. The fading affects only the last num_frames frames of the video. The last frame of the video becomes almost-but-not-quite black (or the specified color). An additional perfectly black (or the specified color) frame is added at the end, thus increasing the total frame count by one.

FadeIn0 / FadeOut0 do not include the extra frame. It is useful when processing Audio only clips or chaining two or more fades to get a square law or a cube law fading effects. e.g Clip.FadeOut0(60).FadeOut0(60).FadeOut(60) gives a much sharper attack and gentler tailoff. The 50% point is at frame 12 of the fade, at frame 30 the fade is 12.5%, at frame 45, 1.6% the effectiveness is more pronounced with audio.

FadeIn2 / FadeOut2 works similarly, except that two black (or color) frames are added at the end instead of one. The main purpose of this is to work around a bug in Windows Media Player. All the WMP versions that I've tested fail to play the last frame of an MPEG file - instead, they stop on the next-to-last frame when playback ends. This leaves an unsightly almost-but-not-quite-black frame showing on the screen when the movie ends if you use FadeOut. FadeOut2 avoids this problem.

The color parameter is optional, default=0 , and is specified as an RGB value regardless of whether the clip format is RGB or YUV based. See here for more information on specifying colors.

The fps parameter is optional, default=24.0, and provides a reference for num_frames in audio only clips. It is ignore if a video stream is present. Set fps=AudioRate() if sample exact audio positioning is required.

FadeOut(clip, n) is just a shorthand for Dissolve(clip, Blackness (clip, n+1, color=$000000), n) (or instead of n+1, n+2 for FadeOut2 and n for FadeOut0).

级别: 新手上路
注册时间:
2004-12-31
在线时间:
0小时
发帖:
42
只看该作者 2楼 发表于: 2006-07-02
谢谢楼上了,不过。。。
想要的效果是LOGO的淡入淡出
而不是视频。。。
级别: 侠客
注册时间:
2005-06-19
在线时间:
0小时
发帖:
606
只看该作者 3楼 发表于: 2006-07-02
引用
最初由 leyanzhang 发布
谢谢楼上了,不过。。。
想要的效果是LOGO的淡入淡出
而不是视频。。。

……
你的logo = ImageSource("C:\Documents and Settings\leyanzhang\桌面\LOGO.jpg")
这条语句就是把LOGO作为一个剪辑(clip)导入AVS了啊,可以直接使用FadeIn/out滤镜了……

FadeIn(logo,淡入的帧数)

级别: 新手上路
注册时间:
2004-12-31
在线时间:
0小时
发帖:
42
只看该作者 4楼 发表于: 2006-07-03
对哦,原来可以这样写的~~~
谢谢楼上啦
回家试试恩~~~
快速回复

限150 字节
上一个 下一个