Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/moverseai/moai
Browse files Browse the repository at this point in the history
  • Loading branch information
tzole1155 committed Jan 15, 2025
2 parents 1b05efe + ce780c2 commit c528592
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions moai/export/local/video2d.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import functools
import logging
import os
import typing
from collections import defaultdict

Expand All @@ -20,7 +21,7 @@
def _create_video_writer(path: str, overwrite: bool, fps: float = 60.0):
global _internal_video_id_
vid = ffmpegio.open(
f"{path}/{_internal_video_id_}.mp4",
f"{path}/{_internal_video_id_}.mp4" if os.path.isdir(path) else path,
"wv",
fps,
overwrite=overwrite,
Expand Down Expand Up @@ -57,7 +58,9 @@ def __init__(
extension: str = "mp4",
overwrite: bool = False,
):
self.path = ensure_path(log, "output folder", path)
self.path = (
ensure_path(log, "output folder", path) if os.path.isdir(path) else path
)
self.format = ensure_choices(
log, "output format", extension, MultiviewVideo2d.__FORMATS__
)
Expand Down

0 comments on commit c528592

Please sign in to comment.