Skip to content

Commit

Permalink
Automatically get fps from MovisVSVideoSource
Browse files Browse the repository at this point in the history
  • Loading branch information
Setsugennoao committed Jun 29, 2024
1 parent 45a9222 commit b698227
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion vstransitions/libs/movis.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,16 @@ def __init__(self, scene: Composition, fps: Fraction | None = None) -> None:
self.scene._cache = {}
self.width = self.scene.size[0]
self.height = self.scene.size[1]
self.fps = fps or self.scene._layers[0].layer.fps # type: ignore

if fps is None:
for layer in self.scene._layers:
if isinstance(layer, MovisVSVideoSource):
self.fps = layer.video_node.fps
break
else:
self.fps = Fraction(self.scene._layers[0].layer.fps)
else:
self.fps = fps

self._base_clip = core.std.BlankClip(
None, self.width, self.height, vs.RGB24, self.scene.duration * self.fps,
Expand Down

0 comments on commit b698227

Please sign in to comment.