Skip to content

Commit c528592

Browse files
committed
Merge branch 'main' of https://github.com/moverseai/moai
2 parents 1b05efe + ce780c2 commit c528592

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

moai/export/local/video2d.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import functools
22
import logging
3+
import os
34
import typing
45
from collections import defaultdict
56

@@ -20,7 +21,7 @@
2021
def _create_video_writer(path: str, overwrite: bool, fps: float = 60.0):
2122
global _internal_video_id_
2223
vid = ffmpegio.open(
23-
f"{path}/{_internal_video_id_}.mp4",
24+
f"{path}/{_internal_video_id_}.mp4" if os.path.isdir(path) else path,
2425
"wv",
2526
fps,
2627
overwrite=overwrite,
@@ -57,7 +58,9 @@ def __init__(
5758
extension: str = "mp4",
5859
overwrite: bool = False,
5960
):
60-
self.path = ensure_path(log, "output folder", path)
61+
self.path = (
62+
ensure_path(log, "output folder", path) if os.path.isdir(path) else path
63+
)
6164
self.format = ensure_choices(
6265
log, "output format", extension, MultiviewVideo2d.__FORMATS__
6366
)

0 commit comments

Comments
 (0)