Clean path from scpecial characters before running ffprobe

This commit is contained in:
Nick Mowen 2022-12-08 13:23:22 -07:00
parent 2a5ab77637
commit 0f37375491

View File

@ -880,6 +880,7 @@ def get_nvidia_gpu_stats() -> dict[str, str]:
def ffprobe_stream(path: str) -> sp.CompletedProcess:
"""Run ffprobe on stream."""
clean_path = escape_special_characters(path)
ffprobe_cmd = [
"ffprobe",
"-print_format",
@ -888,7 +889,7 @@ def ffprobe_stream(path: str) -> sp.CompletedProcess:
"stream=codec_long_name,width,height,bit_rate,duration,display_aspect_ratio,avg_frame_rate",
"-loglevel",
"quiet",
path,
clean_path,
]
return sp.run(ffprobe_cmd, capture_output=True)