Skip to content

Commit

Permalink
Explicit error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
CBroz1 committed Oct 24, 2024
1 parent 215386a commit 65296cf
Showing 1 changed file with 20 additions and 2 deletions.
22 changes: 20 additions & 2 deletions src/spyglass/position/v1/dlc_utils_makevid.py
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,16 @@ def ffmpeg_stitch_partial(self, start_frame, output_partial_video):
output_partial_video,
*self.ffmpeg_log_args,
]
subprocess.run(ffmpeg_cmd, check=True)
try:
ret = subprocess.run(
ffmpeg_cmd,
stderr=subprocess.PIPE,
stdout=subprocess.PIPE,
check=True,
text=True,
)
except subprocess.CalledProcessError as e:
logger.error(f"Error stitching partial video: {e.stderr}")

def concat_partial_videos(self):
"""Concatenate all the partial videos into one final video."""
Expand All @@ -507,7 +516,16 @@ def concat_partial_videos(self):
str(self.output_video_filename),
*self.ffmpeg_log_args,
]
subprocess.run(ffmpeg_cmd, check=True)
try:
ret = subprocess.run(
ffmpeg_cmd,
stderr=subprocess.PIPE,
stdout=subprocess.PIPE,
text=True,
check=True,
)
except subprocess.CalledProcessError as e:
logger.error(f"Error stitching partial video: {e.stderr}")


def make_video(**kwargs):
Expand Down

0 comments on commit 65296cf

Please sign in to comment.