Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions utils/misc_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,11 +248,6 @@ def convert_to_mp4(input_file: str, output_file: str, max_size_mb: int, max_reso
duration = float(probe['format']['duration']) # Video duration in seconds
file_size_mb = int(probe['format']['size']) / (1024 * 1024) # Convert size to MB

# If the file is already MP4 and within the size limit, return the original file
if file_format == "mov,mp4,m4a,3gp,3g2,mj2" and file_size_mb <= max_size_mb:
print(f"Skipping conversion: {input_file} is already an MP4 and under {max_size_mb} MB.")
return input_file

# Get original video dimensions
video_stream = next((stream for stream in probe['streams'] if stream['codec_type'] == 'video'), None)
if not video_stream:
Expand Down
Loading