Skip to content

Commit 52c541c

Browse files
committed
Round timebase to two digits
1 parent 3232fc2 commit 52c541c

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

Diff for: auto_editor/make_layers.py

+8-1
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,14 @@ def make_timeline(
125125
if inp is None:
126126
tb, res = Fraction(30), (1920, 1080)
127127
else:
128-
tb = inp.get_fps() if args.frame_rate is None else args.frame_rate
128+
tb = round(inp.get_fps() if args.frame_rate is None else args.frame_rate, 2)
129+
ntsc = Fraction(30_000, 1001)
130+
film_ntsc = Fraction(24_000, 1001)
131+
if tb == round(ntsc, 2):
132+
tb = ntsc
133+
elif tb == round(film_ntsc, 2):
134+
tb = film_ntsc
135+
129136
res = inp.get_res() if args.resolution is None else args.resolution
130137

131138
try:

0 commit comments

Comments
 (0)