rm suspiciously small error

This commit is contained in:
2026-01-21 01:20:27 -07:00
parent afdcc1c6fd
commit 155b5c25d1
3 changed files with 802 additions and 17 deletions

View File

@@ -41,13 +41,6 @@ def get_file_info(file_path):
except Exception as e:
return None, f"Error running ffprobe: {str(e)}"
def format_file_size(size_bytes):
size_mb = size_bytes / (1024 * 1024)
if size_mb >= 1024: # If size is 1GB or larger
size_gb = size_mb / 1024
return f"{size_gb:.2f} GB"
return f"{size_mb:.2f} MB"
def check_file(input_path, output_path):
try:
input_info, input_error = get_file_info(input_path)
@@ -93,13 +86,6 @@ def check_file(input_path, output_path):
if in_audio['channels'] != out_audio['channels']:
return f"Audio channel mismatch in stream {i}: Input={in_audio['channels']}, Output={out_audio['channels']}"
# Check file size
input_size = int(input_info['format']['size'])
output_size = int(output_info['format']['size'])
if output_size < input_size * 0.1: # Output less than 10% of input size
return f"{Colors.YELLOW}Suspiciously small output: Input={format_file_size(input_size)}, Output={format_file_size(output_size)}{Colors.ENDC}"
return None # No issues found
except Exception as e:
@@ -121,7 +107,6 @@ def main():
"Resolution mismatch": 0,
"Audio stream count mismatch": 0,
"Audio channel mismatch": 0,
"Suspiciously small output": 0,
"Other errors": 0
}
@@ -261,8 +246,6 @@ def main():
issue_counts["Audio stream count mismatch"] += 1
elif "Audio channel mismatch" in issue:
issue_counts["Audio channel mismatch"] += 1
elif "Suspiciously small output" in issue:
issue_counts["Suspiciously small output"] += 1
else:
issue_counts["Other errors"] += 1
else: