in dynamicfilters/videodynamismfiltering/check_static.py [0:0]
def download_video_from_s3(bucket, path, video_id):
"""Download a video from S3 given a video ID."""
# Safely handle filenames with hyphens and special characters
video_file = f"./{video_id}.mp4"
s3_key = f"{path}/{video_id}.mp4"
try:
s3.download_file(bucket, s3_key, video_file)
print(f"Downloaded {video_file} from s3://{bucket}/{s3_key}")
return video_file
except Exception as e:
print(f"Error downloading {video_file}: {e}")
return None