rezoo / movis

Python library for video editing, presentation video generation, motion graphics, shader art coding, and other video production tasks
https://rezoo.github.io/movis/
MIT License
319 stars 17 forks source link

Implement mv.fade_in, mv.fade_out, and mv.fade_in_out #37

Closed rezoo closed 7 months ago

rezoo commented 7 months ago

This PR implements mv.fade_in, mv.fade_out, and mv.fade_in_out

Usage

img = mv.layer.Image.from_color(size=(10, 10), color='white', duration=4.0)
scene1 = mv.fade_in(img, duration=1.0)  # fade-in effect
scene2 = mv.fade_out(img, duration=1.0)  # fade-out effect
scene3 = mv.fade_in_out(img, fade_in=1.0, fade_out=2.0)  # fade-in and fade-out effects
lsdlh commented 7 months ago

此 PR 实现mv.fade_in, mv.fade_out, and mv.fade_in_out

用法

img = mv.layer.Image.from_color(size=(10, 10), color='white', duration=4.0)
scene1 = mv.fade_in(img, duration=1.0)  # fade-in effect
scene2 = mv.fade_out(img, duration=1.0)  # fade-out effect
scene3 = mv.fade_in_out(img, fade_in=1.0, fade_out=2.0)  # fade-in and fade-out effects

scene2 = mv.layer.Image.from_color(size=(640, 480), color='turquoise', duration=5.0) mv.fade_in(scene2, duration=2.0).write_video(r'D:\video\2\09.mp4', audio=False) mv.fade_out(scene2, duration=2.0).write_video(r'D:\video\2\10.mp4', audio=False) なぜ同じような効果を感じるんだろう、特殊効果はいつも終わりにある。