Skip to content

Commit 3b3306f

Browse files
bottlerfacebook-github-bot
authored andcommitted
suppress ffmpeg output
Summary: Restore the suppression of ffmpeg output. Reviewed By: shapovalov Differential Revision: D40296595 fbshipit-source-id: 41b2c14b6f6245f77e0ef6cc94fa7b41fbb83e33
1 parent f130867 commit 3b3306f

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

pytorch3d/implicitron/tools/video_writer.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ def write_frame(
116116
self.frames.append(outfile)
117117
self.frame_num += 1
118118

119-
def get_video(self) -> str:
119+
def get_video(self, quiet: bool = True) -> str:
120120
"""
121121
Generate the video from the written frames.
122122
@@ -155,8 +155,12 @@ def get_video(self) -> str:
155155
"yuv420p",
156156
self.out_path,
157157
]
158-
159-
subprocess.check_call(args)
158+
if quiet:
159+
subprocess.check_call(
160+
args, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL
161+
)
162+
else:
163+
subprocess.check_call(args)
160164
else:
161165
raise ValueError("no such output type %s" % str(self.output_format))
162166

0 commit comments

Comments
 (0)