transcode.py: remove redundant call
This commit is contained in:
+9
-8
@@ -386,14 +386,17 @@ def transcode_file(input_file, output_file=None, skip_av1=True, replace_mode=Fal
|
|||||||
logging.warning(f"File vanished during checks: {input_path}")
|
logging.warning(f"File vanished during checks: {input_path}")
|
||||||
return
|
return
|
||||||
|
|
||||||
# 3. Check Codec
|
# 3. Check Codec (Combined step)
|
||||||
if skip_av1:
|
# We grab the codec here to check if we should skip, AND we save it to
|
||||||
codec = get_video_codec(input_path)
|
# 'original_codec' so we don't have to re-scan the file at the end.
|
||||||
if codec == "av1":
|
original_codec = get_video_codec(input_path)
|
||||||
|
|
||||||
|
if skip_av1 and original_codec == "av1":
|
||||||
logging.info(leftalign(f"SKIP: Input file is already AV1: {input_path}"))
|
logging.info(leftalign(f"SKIP: Input file is already AV1: {input_path}"))
|
||||||
return
|
return
|
||||||
else:
|
|
||||||
logging.info(leftalign(f"Codec is {codec}"))
|
if original_codec:
|
||||||
|
logging.info(leftalign(f"Codec is {original_codec}"))
|
||||||
|
|
||||||
# Prepare individual FFmpeg log file
|
# Prepare individual FFmpeg log file
|
||||||
ffmpeg_logs_dir = get_config_dir() / "ffmpeg_logs"
|
ffmpeg_logs_dir = get_config_dir() / "ffmpeg_logs"
|
||||||
@@ -478,8 +481,6 @@ def transcode_file(input_file, output_file=None, skip_av1=True, replace_mode=Fal
|
|||||||
|
|
||||||
logging.debug(f"Transcoding duration was {transcoding_duration}.")
|
logging.debug(f"Transcoding duration was {transcoding_duration}.")
|
||||||
|
|
||||||
original_codec = get_video_codec(input_path)
|
|
||||||
|
|
||||||
# Update cache for the NEW file (which is now AV1)
|
# Update cache for the NEW file (which is now AV1)
|
||||||
# This ensures if we restart, we know this new file is already done
|
# This ensures if we restart, we know this new file is already done
|
||||||
if replace_mode and use_temp_file:
|
if replace_mode and use_temp_file:
|
||||||
|
|||||||
Reference in New Issue
Block a user