MCPcopy Create free account
hub / github.com/BrokenSource/DepthFlow / main

Function main

examples/batch.py:35–61  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

33
34
35def main():
36 # Change to your own paths!
37 INPUTS = Path("/home/tremeschin/Pictures/Wallpapers")
38 OUTPUTS = Path(INPUTS/"DepthFlow")
39
40 scene = MyAnimation(backend="headless")
41 scene.ffmpeg.h264(preset="veryfast")
42
43 for ext in ("jpg", "jpeg", "png"):
44 for file in Path(INPUTS).glob(f"*.{ext}"):
45 scene.input(image=file)
46
47 # Animation variation one
48 scene.state = DepthState()
49 scene.animation = "circle"
50 scene.main(
51 output=(OUTPUTS/f"{file.stem}-circle.mp4"),
52 time=5, ssaa=1.5,
53 )
54
55 # Animation variation two
56 scene.state = DepthState()
57 scene.animation = "zoom"
58 scene.main(
59 output=(OUTPUTS/f"{file.stem}-zoom.mp4"),
60 time=8, ssaa=1.5,
61 )
62
63if __name__ == "__main__":
64 main()

Callers 1

batch.pyFile · 0.70

Calls 3

MyAnimationClass · 0.85
DepthStateClass · 0.85
inputMethod · 0.80

Tested by

no test coverage detected