Skip to content

Commit

Permalink
suppress ffmpeg output
Browse files Browse the repository at this point in the history
Summary: Restore the suppression of ffmpeg output.

Reviewed By: shapovalov

Differential Revision: D40296595

fbshipit-source-id: 41b2c14b6f6245f77e0ef6cc94fa7b41fbb83e33
  • Loading branch information
bottler authored and facebook-github-bot committed Oct 13, 2022
1 parent f130867 commit 3b3306f
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions pytorch3d/implicitron/tools/video_writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ def write_frame(
self.frames.append(outfile)
self.frame_num += 1

def get_video(self) -> str:
def get_video(self, quiet: bool = True) -> str:
"""
Generate the video from the written frames.
Expand Down Expand Up @@ -155,8 +155,12 @@ def get_video(self) -> str:
"yuv420p",
self.out_path,
]

subprocess.check_call(args)
if quiet:
subprocess.check_call(
args, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL
)
else:
subprocess.check_call(args)
else:
raise ValueError("no such output type %s" % str(self.output_format))

Expand Down

0 comments on commit 3b3306f

Please sign in to comment.