handle UTF-8 encoding check files

This commit is contained in:
2026-03-18 18:06:44 -06:00
parent 6588cb7957
commit 9c8cc0faca
2 changed files with 445 additions and 1 deletions
+1 -1
View File
@@ -31,7 +31,7 @@ def get_file_info(file_path):
'-of', 'json',
str(file_path)
]
result = subprocess.run(cmd, capture_output=True, text=True)
result = subprocess.run(cmd, capture_output=True, text=True, encoding='utf-8', errors='replace')
if result.returncode != 0:
return None, f"ffprobe failed: {result.stderr}"
info = json.loads(result.stdout)