From 14ef29845deba0a8d1cbe98912f604e539dd8d22 Mon Sep 17 00:00:00 2001
From: TylerCG <117808427+TylerCG@users.noreply.github.com>
Date: Sun, 5 Oct 2025 16:25:59 -0400
Subject: [PATCH] working version
---
config.xml | 9 +-
conversion_tracker.csv | 26 ++
core/ffmpeg_helper.py | 136 +++++++++
core/logger_helper.py | 35 +++
core/process_helper.py | 0
core/tracker_helper.py | 0
logs/conversion.log | 638 +++++++++++++++++++++++++++++++++++++++++
main.py | 267 +++++++++++------
8 files changed, 1021 insertions(+), 90 deletions(-)
create mode 100644 conversion_tracker.csv
create mode 100644 core/ffmpeg_helper.py
create mode 100644 core/logger_helper.py
create mode 100644 core/process_helper.py
create mode 100644 core/tracker_helper.py
create mode 100644 logs/conversion.log
diff --git a/config.xml b/config.xml
index 17fc4f8..6343552 100644
--- a/config.xml
+++ b/config.xml
@@ -53,11 +53,11 @@
1500k
1750k
- 2250k
+ 2750k
900k
1250k
- 1600k
+ 1800k
@@ -77,9 +77,12 @@
128000
- 160000
+ 192000
192000
+
+ 128
+
diff --git a/conversion_tracker.csv b/conversion_tracker.csv
new file mode 100644
index 0000000..3596205
--- /dev/null
+++ b/conversion_tracker.csv
@@ -0,0 +1,26 @@
+type,show,filename,original_size_MB,processed_size_MB,percentage
+anime,Season 1,New Saga - S01E07 - To the Blacksmith's Nation x264 AAC WEBDL-1080p VARYG -EHX.mkv,1513.63,242.08,16.0
+anime,New Saga (2025),New Saga - S01E09 - Hidden Ambitions x264 AAC WEBDL-1080p VARYG -EHX.mkv,1510.89,269.8,17.9
+anime,New Saga (2025),New Saga - S01E11 - Secret Red-Hot Strategy x264 AAC WEBDL-1080p VARYG -EHX.mkv,1507.74,284.62,18.9
+anime,New Saga (2025),New Saga - S01E04 - The Perfect Start to a Heroic Tale x264 AAC WEBDL-1080p VARYG -EHX.mkv,1499.67,339.71,22.7
+anime,New Saga (2025),New Saga - S01E10 - Duel x264 AAC WEBDL-1080p VARYG -EHX.mkv,1508.09,226.82,15.0
+anime,New Saga (2025),New Saga - S01E01 - I'll Change My Fate x265 EAC3 WEBRip-1080p Erai-raws -EHX.mkv,650.72,298.45,45.9
+anime,New Saga (2025),New Saga - S01E08 - Those Who Act Out of Sight x264 AAC WEBDL-1080p VARYG -EHX.mkv,1505.44,242.56,16.1
+anime,New Saga (2025),New Saga - S01E05 - Reunion at Dawn h264 EAC3 WEBDL-1080p VARYG -EHX.mkv,891.84,299.91,33.6
+anime,New Saga (2025),New Saga - S01E12 - The Heroic Tale Continues x264 AAC WEBDL-1080p VARYG -EHX.mkv,1514.95,211.47,14.0
+anime,New Saga (2025),New Saga - S01E06 - Brothers in Arms x264 AAC WEBDL-1080p VARYG -EHX.mkv,1505.5,222.61,14.8
+anime,New Saga (2025),New Saga - S01E03 - Application of the Contract x264 AAC WEBDL-1080p VARYG -EHX.mkv,1499.79,267.68,17.8
+anime,New Saga (2025),New Saga - S01E02 - The Hero's Conditions x265 EAC3 WEBRip-1080p Erai-raws -EHX.mkv,459.88,238.76,51.9
+anime,You are Ms. Servant (2024),You Are Ms. Servant - S01E01 - My Fateful Encounter With You x264 AAC WEBDL-1080p VARYG -EHX.mkv,1404.32,300.44,21.4,CQ
+anime,You are Ms. Servant (2024),You are Ms. Servant - S01E02 - You Want to Know x264 AAC WEBDL-1080p VARYG -EHX.mkv,1408.95,313.09,22.2,CQ
+anime,You are Ms. Servant (2024),You are Ms. Servant - S01E03 - You Are Ms. Yuki x264 AAC WEBDL-1080p VARYG -EHX.mkv,1407.34,307.42,21.8,CQ
+anime,You are Ms. Servant (2024),You are Ms. Servant - S01E04 - You Won't Miss Out x264 AAC HDTV-1080p SubsPlease -EHX.mkv,1401.62,323.88,23.1,CQ
+anime,You are Ms. Servant (2024),You are Ms. Servant - S01E05 - What You Want to Protect x264 AAC WEBDL-1080p VARYG -EHX.mkv,1407.84,263.15,18.7,CQ
+anime,You are Ms. Servant (2024),You are Ms. Servant - S01E06 - You're Lonelier Than I Thought x264 AAC WEBDL-1080p VARYG -EHX.mkv,1448.64,344.8,23.8,CQ
+anime,You are Ms. Servant (2024),You are Ms. Servant - S01E07 - You've Finally Figured It Out x264 AAC WEBDL-1080p VARYG -EHX.mkv,1445.4,340.7,23.6,CQ
+anime,You are Ms. Servant (2024),You are Ms. Servant - S01E08 - The Autumn With You and the Sauce x264 AAC WEBDL-1080p VARYG -EHX.mkv,1450.3,363.32,25.1,CQ
+anime,You are Ms. Servant (2024),You are Ms. Servant - S01E09 - You and the Cultural Stage x264 AAC WEBDL-1080p VARYG -EHX.mkv,1450.71,268.45,18.5,CQ
+anime,You are Ms. Servant (2024),You are Ms. Servant - S01E10 - You and the Forbidden Fruit x264 AAC WEBDL-1080p VARYG -EHX.mkv,1453.4,319.2,22.0,CQ
+anime,You are Ms. Servant (2024),You are Ms. Servant - S01E11 - Your Prayers Are Gods' Prayers x264 AAC WEBDL-1080p VARYG -EHX.mkv,1454.6,310.35,21.3,CQ
+anime,You are Ms. Servant (2024),You are Ms. Servant - S01E12 - The Joyous Tidings You All Bring x264 AAC WEBDL-1080p VARYG -EHX.mkv,1444.42,329.28,22.8,CQ
+tv,Vikings (2013),Vikings - S03E08 - To the Gates! x265 AAC Bluray-1080p Silence -EHX.mkv,1812.11,609.28,33.6,CQ
diff --git a/core/ffmpeg_helper.py b/core/ffmpeg_helper.py
new file mode 100644
index 0000000..f7b4870
--- /dev/null
+++ b/core/ffmpeg_helper.py
@@ -0,0 +1,136 @@
+# core/ffmpeg_helper.py
+import json
+import subprocess
+from pathlib import Path
+from typing import Tuple
+
+from core.logger_helper import setup_logger
+
+logger = setup_logger(Path(__file__).parent.parent / "logs")
+
+# =============================
+# STREAM ANALYSIS
+# =============================
+def get_audio_streams(input_file: Path):
+ """Return a list of (index, channels, bitrate_kbps, lang)"""
+ cmd = [
+ "ffprobe", "-v", "error",
+ "-select_streams", "a",
+ "-show_entries", "stream=index,channels,bit_rate,tags=language",
+ "-of", "json", str(input_file)
+ ]
+ result = subprocess.run(cmd, capture_output=True, text=True)
+ data = json.loads(result.stdout or "{}")
+ streams = []
+ for s in data.get("streams", []):
+ index = s["index"]
+ channels = s.get("channels", 2)
+ bitrate = int(int(s.get("bit_rate", 128000)) / 1000)
+ lang = s.get("tags", {}).get("language", "und")
+ streams.append((index, channels, bitrate, lang))
+ return streams
+
+# =============================
+# AUDIO DECISION LOGIC
+# =============================
+def choose_audio_settings(channels: int, bitrate_kbps: int, audio_config: dict) -> Tuple[str, int]:
+ """
+ Return (codec, target_bitrate)
+ Rules:
+ - If 128 kbps or lower β use Opus
+ - Otherwise β use AAC
+ - Use audio_config to bucket bitrates.
+ """
+ if channels == 2:
+ if bitrate_kbps <= 80:
+ target_br = audio_config["stereo"]["low"]
+ elif bitrate_kbps <= 112:
+ target_br = audio_config["stereo"]["medium"]
+ else:
+ target_br = audio_config["stereo"]["high"]
+ else:
+ if bitrate_kbps <= 176:
+ target_br = audio_config["multi_channel"]["low"]
+ else:
+ target_br = audio_config["multi_channel"]["high"]
+
+ # Opus threshold: <=128 kbps
+ threshold = audio_config.get("use_opus_below_kbps", 128)
+ codec = "libopus" if target_br <= threshold * 1000 else "aac"
+ return codec, target_br
+
+# =============================
+# FFMPEG COMMAND BUILDER
+# =============================
+def build_ffmpeg_command(input_file: Path, output_file: Path,
+ cq: int, width: int, height: int,
+ filter_flags: str, audio_config: dict):
+ """Builds FFmpeg command with smart audio logic."""
+ streams = get_audio_streams(input_file)
+
+ logger.info(f"π Detected {len(streams)} audio stream(s). Building command...")
+ cmd = [
+ "ffmpeg", "-y", "-i", str(input_file),
+ "-vf", f"scale={width}:{height}:flags={filter_flags}:force_original_aspect_ratio=decrease",
+ "-map", "0:v", "-map", "0:a", "-map", "0:s?",
+ "-c:v", "av1_nvenc", "-preset", "p1", "-cq", str(cq),
+ "-pix_fmt", "p010le"
+ ]
+
+ for i, (index, channels, bitrate, lang) in enumerate(streams):
+ codec, br = choose_audio_settings(channels, bitrate, audio_config)
+ cmd += [
+ f"-c:a:{i}", codec,
+ f"-b:a:{i}", str(br),
+ f"-ac:{i}", str(channels),
+ f"-metadata:s:a:{i}", f"language={lang}"
+ ]
+
+ cmd += ["-c:s", "copy", str(output_file)]
+ return cmd, streams
+
+# =============================
+# ENCODE RUNNER
+# =============================
+def run_encode(input_file: Path, output_file: Path, cq: int,
+ width: int, height: int, filter_flags: str,
+ audio_config: dict):
+ """Handles encode, fallback logic, and returns size stats."""
+ cmd, streams = build_ffmpeg_command(input_file, output_file, cq, width, height, filter_flags, audio_config)
+ logger.info(f"π¬ Running FFmpeg CQ encode β {output_file.name}")
+ subprocess.run(cmd, check=True)
+
+ # Size check
+ orig_size = input_file.stat().st_size
+ out_size = output_file.stat().st_size
+ ratio = out_size / orig_size
+ logger.info(f"π¦ Size: {orig_size/1e6:.2f}MB β {out_size/1e6:.2f}MB ({ratio:.1%})")
+
+ # Fallback logic
+ if ratio >= 0.5:
+ logger.warning(f"β οΈ Reduction too low ({ratio:.0%}), retrying with bitrate mode...")
+ output_file.unlink(missing_ok=True)
+ vb, maxrate, bufsize = (
+ ("1500k", "1750k", "2250k") if height >= 1080
+ else ("900k", "1250k", "1600k")
+ )
+ cmd = [
+ "ffmpeg", "-y", "-i", str(input_file),
+ "-vf", f"scale={width}:{height}:flags={filter_flags}:force_original_aspect_ratio=decrease",
+ "-map", "0:v", "-map", "0:a", "-map", "0:s?",
+ "-c:v", "av1_nvenc", "-preset", "p1",
+ "-b:v", vb, "-maxrate", maxrate, "-bufsize", bufsize,
+ "-pix_fmt", "p010le"
+ ]
+ for i, (index, channels, bitrate, lang) in enumerate(streams):
+ codec, br = choose_audio_settings(channels, bitrate, audio_config)
+ cmd += [
+ f"-c:a:{i}", codec,
+ f"-b:a:{i}", str(br),
+ f"-ac:{i}", str(channels),
+ f"-metadata:s:a:{i}", f"language={lang}"
+ ]
+ cmd += ["-c:s", "copy", str(output_file)]
+ subprocess.run(cmd, check=True)
+
+ return orig_size, out_size
diff --git a/core/logger_helper.py b/core/logger_helper.py
new file mode 100644
index 0000000..2f669f4
--- /dev/null
+++ b/core/logger_helper.py
@@ -0,0 +1,35 @@
+# core/logger_helper.py
+import logging
+from logging.handlers import RotatingFileHandler
+from pathlib import Path
+
+def setup_logger(log_folder: Path, log_file_name: str = "conversion.log", level=logging.INFO) -> logging.Logger:
+ """
+ Sets up a logger that prints to console and writes to a rotating log file.
+ """
+ log_folder.mkdir(parents=True, exist_ok=True)
+ log_file = log_folder / log_file_name
+
+ logger = logging.getLogger("conversion_logger")
+ logger.setLevel(level)
+ logger.propagate = False # Prevent duplicate logging if root logger exists
+
+ # Formatter with timestamp
+ formatter = logging.Formatter("%(asctime)s [%(levelname)s] %(message)s", datefmt="%Y-%m-%d %H:%M:%S")
+
+ # Console handler
+ console_handler = logging.StreamHandler()
+ console_handler.setFormatter(formatter)
+ console_handler.setLevel(level)
+
+ # File handler with rotation (max 5 MB per file, keep 3 backups)
+ file_handler = RotatingFileHandler(log_file, maxBytes=5*1024*1024, backupCount=3, encoding="utf-8")
+ file_handler.setFormatter(formatter)
+ file_handler.setLevel(level)
+
+ # Add handlers
+ if not logger.handlers:
+ logger.addHandler(console_handler)
+ logger.addHandler(file_handler)
+
+ return logger
diff --git a/core/process_helper.py b/core/process_helper.py
new file mode 100644
index 0000000..e69de29
diff --git a/core/tracker_helper.py b/core/tracker_helper.py
new file mode 100644
index 0000000..e69de29
diff --git a/logs/conversion.log b/logs/conversion.log
new file mode 100644
index 0000000..6393cdc
--- /dev/null
+++ b/logs/conversion.log
@@ -0,0 +1,638 @@
+2025-10-05 10:24:06 [INFO] Processing: New Saga - S01E07 - To the Blacksmith's Nation x264 AAC WEBDL-1080p VARYG.mkv
+2025-10-05 10:24:19 [INFO] Copied New Saga - S01E07 - To the Blacksmith's Nation x264 AAC WEBDL-1080p VARYG.mkv β New Saga - S01E07 - To the Blacksmith's Nation x264 AAC WEBDL-1080p VARYG.mkv
+2025-10-05 10:24:20 [INFO]
+π§© ENCODE SETTINGS
+ β’ Resolution: 1920x1080
+ β’ Scale Filter: lanczos
+ β’ CQ: 32
+ β’ Video Encoder: av1_nvenc (preset p1, pix_fmt p010le)
+ β’ Audio Streams:
+2025-10-05 10:24:20 [INFO] - Stream #1: 2ch, src=und, origβ128kbps β target=128.0kbps, tgt=eng
+2025-10-05 10:24:20 [INFO] - Stream #2: 2ch, src=und, origβ128kbps β target=128.0kbps, tgt=eng
+2025-10-05 10:24:20 [INFO] Starting CQ encode: New Saga - S01E07 - To the Blacksmith's Nation x264 AAC WEBDL-1080p VARYG -EHX.mkv
+2025-10-05 10:30:32 [INFO] Processing: New Saga - S01E07 - To the Blacksmith's Nation x264 AAC WEBDL-1080p VARYG.mkv
+2025-10-05 10:30:46 [INFO] Copied New Saga - S01E07 - To the Blacksmith's Nation x264 AAC WEBDL-1080p VARYG.mkv β New Saga - S01E07 - To the Blacksmith's Nation x264 AAC WEBDL-1080p VARYG.mkv
+2025-10-05 10:30:46 [INFO]
+π§© ENCODE SETTINGS
+ β’ Resolution: 1920x1080
+ β’ Scale Filter: lanczos
+ β’ CQ: 32
+ β’ Video Encoder: av1_nvenc (preset p1, pix_fmt p010le)
+ β’ Audio Streams:
+2025-10-05 10:30:46 [INFO] - Stream #1: 2ch, src=und, origβ128kbps β target=128.0kbps, tgt=eng
+2025-10-05 10:30:46 [INFO] - Stream #2: 2ch, src=und, origβ128kbps β target=128.0kbps, tgt=eng
+2025-10-05 10:30:46 [INFO] Starting CQ encode: New Saga - S01E07 - To the Blacksmith's Nation x264 AAC WEBDL-1080p VARYG -EHX.mkv
+2025-10-05 10:32:25 [INFO] π¦ Original: 1513.63 MB β Encoded: 242.08 MB (16.0% of original)
+2025-10-05 10:32:27 [INFO] Moved New Saga - S01E07 - To the Blacksmith's Nation x264 AAC WEBDL-1080p VARYG -EHX.mkv β New Saga - S01E07 - To the Blacksmith's Nation x264 AAC WEBDL-1080p VARYG -EHX.mkv
+2025-10-05 10:32:27 [INFO] Tracked conversion: New Saga - S01E07 - To the Blacksmith's Nation x264 AAC WEBDL-1080p VARYG -EHX.mkv, 1513.63MB β 242.08MB (16.0%)
+2025-10-05 10:32:28 [INFO] Deleted original and processing copy for New Saga - S01E07 - To the Blacksmith's Nation x264 AAC WEBDL-1080p VARYG.mkv
+2025-10-05 10:32:28 [INFO] Processing: New Saga - S01E09 - Hidden Ambitions x264 AAC WEBDL-1080p VARYG.mkv
+2025-10-05 10:32:41 [INFO] Copied New Saga - S01E09 - Hidden Ambitions x264 AAC WEBDL-1080p VARYG.mkv β New Saga - S01E09 - Hidden Ambitions x264 AAC WEBDL-1080p VARYG.mkv
+2025-10-05 10:32:42 [INFO]
+π§© ENCODE SETTINGS
+ β’ Resolution: 1920x1080
+ β’ Scale Filter: lanczos
+ β’ CQ: 32
+ β’ Video Encoder: av1_nvenc (preset p1, pix_fmt p010le)
+ β’ Audio Streams:
+2025-10-05 10:32:42 [INFO] - Stream #1: 2ch, src=und, origβ128kbps β target=128.0kbps, tgt=eng
+2025-10-05 10:32:42 [INFO] - Stream #2: 2ch, src=und, origβ128kbps β target=128.0kbps, tgt=eng
+2025-10-05 10:32:42 [INFO] Starting CQ encode: New Saga - S01E09 - Hidden Ambitions x264 AAC WEBDL-1080p VARYG -EHX.mkv
+2025-10-05 10:37:23 [INFO] Processing: New Saga - S01E09 - Hidden Ambitions x264 AAC WEBDL-1080p VARYG.mkv
+2025-10-05 10:37:36 [INFO] Copied New Saga - S01E09 - Hidden Ambitions x264 AAC WEBDL-1080p VARYG.mkv β New Saga - S01E09 - Hidden Ambitions x264 AAC WEBDL-1080p VARYG.mkv
+2025-10-05 10:37:36 [INFO]
+π§© ENCODE SETTINGS
+ β’ Resolution: 1920x1080
+ β’ Scale Filter: lanczos
+ β’ CQ: 32
+ β’ Video Encoder: av1_nvenc (preset p1, pix_fmt p010le)
+ β’ Audio Streams:
+2025-10-05 10:37:36 [INFO] - Stream #1: 2ch, src=und, origβ128kbps β target=128.0kbps
+2025-10-05 10:37:36 [INFO] - Stream #2: 2ch, src=und, origβ128kbps β target=128.0kbps
+2025-10-05 10:37:36 [INFO] Starting CQ encode: New Saga - S01E09 - Hidden Ambitions x264 AAC WEBDL-1080p VARYG -EHX.mkv
+2025-10-05 10:39:07 [INFO] π¦ Original: 1510.89 MB β Encoded: 269.80 MB (17.9% of original)
+2025-10-05 10:39:10 [INFO] Moved New Saga - S01E09 - Hidden Ambitions x264 AAC WEBDL-1080p VARYG -EHX.mkv β New Saga - S01E09 - Hidden Ambitions x264 AAC WEBDL-1080p VARYG -EHX.mkv
+2025-10-05 10:39:10 [INFO] Tracked conversion: New Saga - S01E09 - Hidden Ambitions x264 AAC WEBDL-1080p VARYG -EHX.mkv, 1510.89MB β 269.8MB (17.9%)
+2025-10-05 10:39:10 [INFO] Deleted original and processing copy for New Saga - S01E09 - Hidden Ambitions x264 AAC WEBDL-1080p VARYG.mkv
+2025-10-05 10:39:10 [INFO] Processing: New Saga - S01E11 - Secret Red-Hot Strategy x264 AAC WEBDL-1080p VARYG.mkv
+2025-10-05 10:39:24 [INFO] Copied New Saga - S01E11 - Secret Red-Hot Strategy x264 AAC WEBDL-1080p VARYG.mkv β New Saga - S01E11 - Secret Red-Hot Strategy x264 AAC WEBDL-1080p VARYG.mkv
+2025-10-05 10:39:24 [INFO]
+π§© ENCODE SETTINGS
+ β’ Resolution: 1920x1080
+ β’ Scale Filter: lanczos
+ β’ CQ: 32
+ β’ Video Encoder: av1_nvenc (preset p1, pix_fmt p010le)
+ β’ Audio Streams:
+2025-10-05 10:39:24 [INFO] - Stream #1: 2ch, src=und, origβ128kbps β target=128.0kbps
+2025-10-05 10:39:24 [INFO] - Stream #2: 2ch, src=und, origβ128kbps β target=128.0kbps
+2025-10-05 10:39:24 [INFO] Starting CQ encode: New Saga - S01E11 - Secret Red-Hot Strategy x264 AAC WEBDL-1080p VARYG -EHX.mkv
+2025-10-05 10:40:53 [INFO] π¦ Original: 1507.74 MB β Encoded: 284.62 MB (18.9% of original)
+2025-10-05 10:40:56 [INFO] Moved New Saga - S01E11 - Secret Red-Hot Strategy x264 AAC WEBDL-1080p VARYG -EHX.mkv β New Saga - S01E11 - Secret Red-Hot Strategy x264 AAC WEBDL-1080p VARYG -EHX.mkv
+2025-10-05 10:40:56 [INFO] Tracked conversion: New Saga - S01E11 - Secret Red-Hot Strategy x264 AAC WEBDL-1080p VARYG -EHX.mkv, 1507.74MB β 284.62MB (18.9%)
+2025-10-05 10:40:56 [INFO] Deleted original and processing copy for New Saga - S01E11 - Secret Red-Hot Strategy x264 AAC WEBDL-1080p VARYG.mkv
+2025-10-05 10:40:56 [INFO] Processing: New Saga - S01E04 - The Perfect Start to a Heroic Tale x264 AAC WEBDL-1080p VARYG.mkv
+2025-10-05 10:53:59 [INFO] Processing: New Saga - S01E04 - The Perfect Start to a Heroic Tale x264 AAC WEBDL-1080p VARYG.mkv
+2025-10-05 10:54:12 [INFO] Copied New Saga - S01E04 - The Perfect Start to a Heroic Tale x264 AAC WEBDL-1080p VARYG.mkv β New Saga - S01E04 - The Perfect Start to a Heroic Tale x264 AAC WEBDL-1080p VARYG.mkv
+2025-10-05 10:54:12 [INFO]
+π§© ENCODE SETTINGS
+ β’ Resolution: 1920x1080
+ β’ Scale Filter: lanczos
+ β’ CQ: 32
+ β’ Video Encoder: av1_nvenc (preset p1, pix_fmt p010le)
+ β’ Audio Streams:
+2025-10-05 10:54:55 [INFO] Processing: New Saga - S01E04 - The Perfect Start to a Heroic Tale x264 AAC WEBDL-1080p VARYG.mkv
+2025-10-05 10:55:08 [INFO] Copied New Saga - S01E04 - The Perfect Start to a Heroic Tale x264 AAC WEBDL-1080p VARYG.mkv β New Saga - S01E04 - The Perfect Start to a Heroic Tale x264 AAC WEBDL-1080p VARYG.mkv
+2025-10-05 10:55:09 [INFO]
+π§© ENCODE SETTINGS
+ β’ Resolution: 1920x1080
+ β’ Scale Filter: lanczos
+ β’ CQ: 32
+ β’ Video Encoder: av1_nvenc (preset p1, pix_fmt p010le)
+ β’ Audio Streams:
+2025-10-05 10:55:09 [INFO] - Stream #1: 2ch, src=und, origβ128kbps β target=128.0kbps
+2025-10-05 10:55:09 [INFO] - Stream #2: 2ch, src=und, origβ128kbps β target=128.0kbps
+2025-10-05 10:56:55 [INFO] Processing: New Saga - S01E04 - The Perfect Start to a Heroic Tale x264 AAC WEBDL-1080p VARYG.mkv
+2025-10-05 10:57:08 [INFO] Copied New Saga - S01E04 - The Perfect Start to a Heroic Tale x264 AAC WEBDL-1080p VARYG.mkv β New Saga - S01E04 - The Perfect Start to a Heroic Tale x264 AAC WEBDL-1080p VARYG.mkv
+2025-10-05 10:57:08 [INFO]
+π§© ENCODE SETTINGS
+ β’ Resolution: 1920x1080
+ β’ Scale Filter: lanczos
+ β’ CQ: 32
+ β’ Video Encoder: av1_nvenc (preset p1, pix_fmt p010le)
+ β’ Audio Streams:
+2025-10-05 10:57:08 [INFO] - Stream #1: 2ch, src=und, origβ128kbps β target=128.0kbps
+2025-10-05 10:57:08 [INFO] - Stream #2: 2ch, src=und, origβ128kbps β target=128.0kbps
+2025-10-05 10:57:08 [INFO] Starting CQ encode: New Saga - S01E04 - The Perfect Start to a Heroic Tale x264 AAC WEBDL-1080p VARYG -EHX.mkv
+2025-10-05 10:58:40 [INFO] π¦ Original: 1499.67 MB β Encoded: 339.71 MB (22.7% of original)
+2025-10-05 10:58:43 [INFO] Moved New Saga - S01E04 - The Perfect Start to a Heroic Tale x264 AAC WEBDL-1080p VARYG -EHX.mkv β New Saga - S01E04 - The Perfect Start to a Heroic Tale x264 AAC WEBDL-1080p VARYG -EHX.mkv
+2025-10-05 10:58:43 [INFO] Tracked conversion: New Saga - S01E04 - The Perfect Start to a Heroic Tale x264 AAC WEBDL-1080p VARYG -EHX.mkv, 1499.67MB β 339.71MB (22.7%)
+2025-10-05 10:58:43 [INFO] Deleted original and processing copy for New Saga - S01E04 - The Perfect Start to a Heroic Tale x264 AAC WEBDL-1080p VARYG.mkv
+2025-10-05 10:58:43 [INFO] Processing: New Saga - S01E10 - Duel x264 AAC WEBDL-1080p VARYG.mkv
+2025-10-05 10:58:57 [INFO] Copied New Saga - S01E10 - Duel x264 AAC WEBDL-1080p VARYG.mkv β New Saga - S01E10 - Duel x264 AAC WEBDL-1080p VARYG.mkv
+2025-10-05 10:58:57 [INFO]
+π§© ENCODE SETTINGS
+ β’ Resolution: 1920x1080
+ β’ Scale Filter: lanczos
+ β’ CQ: 32
+ β’ Video Encoder: av1_nvenc (preset p1, pix_fmt p010le)
+ β’ Audio Streams:
+2025-10-05 10:58:57 [INFO] - Stream #1: 2ch, src=und, origβ128kbps β target=128.0kbps
+2025-10-05 10:58:57 [INFO] - Stream #2: 2ch, src=und, origβ128kbps β target=128.0kbps
+2025-10-05 10:58:57 [INFO] Starting CQ encode: New Saga - S01E10 - Duel x264 AAC WEBDL-1080p VARYG -EHX.mkv
+2025-10-05 11:00:34 [INFO] π¦ Original: 1508.09 MB β Encoded: 226.82 MB (15.0% of original)
+2025-10-05 11:00:36 [INFO] Moved New Saga - S01E10 - Duel x264 AAC WEBDL-1080p VARYG -EHX.mkv β New Saga - S01E10 - Duel x264 AAC WEBDL-1080p VARYG -EHX.mkv
+2025-10-05 11:00:36 [INFO] Tracked conversion: New Saga - S01E10 - Duel x264 AAC WEBDL-1080p VARYG -EHX.mkv, 1508.09MB β 226.82MB (15.0%)
+2025-10-05 11:00:36 [INFO] Deleted original and processing copy for New Saga - S01E10 - Duel x264 AAC WEBDL-1080p VARYG.mkv
+2025-10-05 11:00:36 [INFO] Processing: New Saga - S01E01 - I'll Change My Fate x265 EAC3 WEBRip-1080p Erai-raws.mkv
+2025-10-05 11:00:42 [INFO] Copied New Saga - S01E01 - I'll Change My Fate x265 EAC3 WEBRip-1080p Erai-raws.mkv β New Saga - S01E01 - I'll Change My Fate x265 EAC3 WEBRip-1080p Erai-raws.mkv
+2025-10-05 11:00:42 [INFO]
+π§© ENCODE SETTINGS
+ β’ Resolution: 1920x1080
+ β’ Scale Filter: lanczos
+ β’ CQ: 32
+ β’ Video Encoder: av1_nvenc (preset p1, pix_fmt p010le)
+ β’ Audio Streams:
+2025-10-05 11:00:42 [INFO] - Stream #1: 2ch, src=und, origβ128kbps β target=128.0kbps
+2025-10-05 11:00:42 [INFO] Starting CQ encode: New Saga - S01E01 - I'll Change My Fate x265 EAC3 WEBRip-1080p Erai-raws -EHX.mkv
+2025-10-05 11:02:07 [INFO] Processing: New Saga - S01E01 - I'll Change My Fate x265 EAC3 WEBRip-1080p Erai-raws.mkv
+2025-10-05 11:02:13 [INFO] Copied New Saga - S01E01 - I'll Change My Fate x265 EAC3 WEBRip-1080p Erai-raws.mkv β New Saga - S01E01 - I'll Change My Fate x265 EAC3 WEBRip-1080p Erai-raws.mkv
+2025-10-05 11:02:13 [INFO]
+π§© ENCODE SETTINGS
+ β’ Resolution: 1920x1080
+ β’ Scale Filter: lanczos
+ β’ CQ: 32
+ β’ Video Encoder: av1_nvenc (preset p1, pix_fmt p010le)
+ β’ Audio Streams:
+2025-10-05 11:02:13 [INFO] - Stream #1: 2ch, src=und, avg_bitrate=128kbps, metadata=224kbps, bucket_target=128.0kbps
+2025-10-05 11:03:17 [INFO] Processing: New Saga - S01E01 - I'll Change My Fate x265 EAC3 WEBRip-1080p Erai-raws.mkv
+2025-10-05 11:03:23 [INFO] Copied New Saga - S01E01 - I'll Change My Fate x265 EAC3 WEBRip-1080p Erai-raws.mkv β New Saga - S01E01 - I'll Change My Fate x265 EAC3 WEBRip-1080p Erai-raws.mkv
+2025-10-05 11:03:23 [INFO]
+π§© ENCODE SETTINGS
+ β’ Resolution: 1920x1080
+ β’ Scale Filter: lanczos
+ β’ CQ: 32
+ β’ Video Encoder: av1_nvenc (preset p1, pix_fmt p010le)
+ β’ Audio Streams:
+2025-10-05 11:03:23 [INFO] - Stream #1: 2ch, src=und, avg_bitrate=128kbps, metadata=224kbps, bucket_target=128.0kbps
+2025-10-05 11:03:23 [INFO] Starting CQ encode: New Saga - S01E01 - I'll Change My Fate x265 EAC3 WEBRip-1080p Erai-raws -EHX.mkv
+2025-10-05 11:04:56 [INFO] π¦ Original: 650.72 MB β Encoded: 298.45 MB (45.9% of original)
+2025-10-05 11:04:59 [INFO] Moved New Saga - S01E01 - I'll Change My Fate x265 EAC3 WEBRip-1080p Erai-raws -EHX.mkv β New Saga - S01E01 - I'll Change My Fate x265 EAC3 WEBRip-1080p Erai-raws -EHX.mkv
+2025-10-05 11:04:59 [INFO] Tracked conversion: New Saga - S01E01 - I'll Change My Fate x265 EAC3 WEBRip-1080p Erai-raws -EHX.mkv, 650.72MB β 298.45MB (45.9%)
+2025-10-05 11:04:59 [INFO] Deleted original and processing copy for New Saga - S01E01 - I'll Change My Fate x265 EAC3 WEBRip-1080p Erai-raws.mkv
+2025-10-05 11:04:59 [INFO] Processing: New Saga - S01E08 - Those Who Act Out of Sight x264 AAC WEBDL-1080p VARYG.mkv
+2025-10-05 11:05:12 [INFO] Copied New Saga - S01E08 - Those Who Act Out of Sight x264 AAC WEBDL-1080p VARYG.mkv β New Saga - S01E08 - Those Who Act Out of Sight x264 AAC WEBDL-1080p VARYG.mkv
+2025-10-05 11:05:12 [INFO]
+π§© ENCODE SETTINGS
+ β’ Resolution: 1920x1080
+ β’ Scale Filter: lanczos
+ β’ CQ: 32
+ β’ Video Encoder: av1_nvenc (preset p1, pix_fmt p010le)
+ β’ Audio Streams:
+2025-10-05 11:05:12 [INFO] - Stream #1: 2ch, src=und, avg_bitrate=128kbps, metadata=0kbps, bucket_target=128.0kbps
+2025-10-05 11:05:12 [INFO] - Stream #2: 2ch, src=und, avg_bitrate=128kbps, metadata=0kbps, bucket_target=128.0kbps
+2025-10-05 11:05:12 [INFO] Starting CQ encode: New Saga - S01E08 - Those Who Act Out of Sight x264 AAC WEBDL-1080p VARYG -EHX.mkv
+2025-10-05 11:06:52 [INFO] π¦ Original: 1505.44 MB β Encoded: 242.56 MB (16.1% of original)
+2025-10-05 11:06:54 [INFO] Moved New Saga - S01E08 - Those Who Act Out of Sight x264 AAC WEBDL-1080p VARYG -EHX.mkv β New Saga - S01E08 - Those Who Act Out of Sight x264 AAC WEBDL-1080p VARYG -EHX.mkv
+2025-10-05 11:06:54 [INFO] Tracked conversion: New Saga - S01E08 - Those Who Act Out of Sight x264 AAC WEBDL-1080p VARYG -EHX.mkv, 1505.44MB β 242.56MB (16.1%)
+2025-10-05 11:06:54 [INFO] Deleted original and processing copy for New Saga - S01E08 - Those Who Act Out of Sight x264 AAC WEBDL-1080p VARYG.mkv
+2025-10-05 11:06:54 [INFO] Skipping: New Saga - S01E11 - Secret Red-Hot Strategy x264 AAC WEBDL-1080p VARYG -EHX.mkv
+2025-10-05 11:06:54 [INFO] Processing: New Saga - S01E05 - Reunion at Dawn h264 EAC3 WEBDL-1080p VARYG.mkv
+2025-10-05 11:07:02 [INFO] Copied New Saga - S01E05 - Reunion at Dawn h264 EAC3 WEBDL-1080p VARYG.mkv β New Saga - S01E05 - Reunion at Dawn h264 EAC3 WEBDL-1080p VARYG.mkv
+2025-10-05 11:07:02 [INFO]
+π§© ENCODE SETTINGS
+ β’ Resolution: 1920x1080
+ β’ Scale Filter: lanczos
+ β’ CQ: 32
+ β’ Video Encoder: av1_nvenc (preset p1, pix_fmt p010le)
+ β’ Audio Streams:
+2025-10-05 11:07:02 [INFO] - Stream #1: 2ch, src=und, avg_bitrate=128kbps, metadata=224kbps, bucket_target=128.0kbps
+2025-10-05 11:07:02 [INFO] - Stream #2: 2ch, src=und, avg_bitrate=128kbps, metadata=224kbps, bucket_target=128.0kbps
+2025-10-05 11:07:02 [INFO] Starting CQ encode: New Saga - S01E05 - Reunion at Dawn h264 EAC3 WEBDL-1080p VARYG -EHX.mkv
+2025-10-05 11:08:32 [INFO] π¦ Original: 891.84 MB β Encoded: 299.91 MB (33.6% of original)
+2025-10-05 11:08:34 [INFO] Moved New Saga - S01E05 - Reunion at Dawn h264 EAC3 WEBDL-1080p VARYG -EHX.mkv β New Saga - S01E05 - Reunion at Dawn h264 EAC3 WEBDL-1080p VARYG -EHX.mkv
+2025-10-05 11:08:34 [INFO] Tracked conversion: New Saga - S01E05 - Reunion at Dawn h264 EAC3 WEBDL-1080p VARYG -EHX.mkv, 891.84MB β 299.91MB (33.6%)
+2025-10-05 11:08:34 [INFO] Deleted original and processing copy for New Saga - S01E05 - Reunion at Dawn h264 EAC3 WEBDL-1080p VARYG.mkv
+2025-10-05 11:08:34 [INFO] Skipping: New Saga - S01E07 - To the Blacksmith's Nation x264 AAC WEBDL-1080p VARYG -EHX.mkv
+2025-10-05 11:08:34 [INFO] Processing: New Saga - S01E12 - The Heroic Tale Continues x264 AAC WEBDL-1080p VARYG.mkv
+2025-10-05 11:09:02 [INFO] Copied New Saga - S01E12 - The Heroic Tale Continues x264 AAC WEBDL-1080p VARYG.mkv β New Saga - S01E12 - The Heroic Tale Continues x264 AAC WEBDL-1080p VARYG.mkv
+2025-10-05 11:09:03 [INFO]
+π§© ENCODE SETTINGS
+ β’ Resolution: 1920x1080
+ β’ Scale Filter: lanczos
+ β’ CQ: 32
+ β’ Video Encoder: av1_nvenc (preset p1, pix_fmt p010le)
+ β’ Audio Streams:
+2025-10-05 11:09:03 [INFO] - Stream #1: 2ch, src=und, avg_bitrate=128kbps, metadata=0kbps, bucket_target=128.0kbps
+2025-10-05 11:09:03 [INFO] - Stream #2: 2ch, src=und, avg_bitrate=128kbps, metadata=0kbps, bucket_target=128.0kbps
+2025-10-05 11:09:03 [INFO] Starting CQ encode: New Saga - S01E12 - The Heroic Tale Continues x264 AAC WEBDL-1080p VARYG -EHX.mkv
+2025-10-05 11:10:39 [INFO] π¦ Original: 1514.95 MB β Encoded: 211.47 MB (14.0% of original)
+2025-10-05 11:10:41 [INFO] Moved New Saga - S01E12 - The Heroic Tale Continues x264 AAC WEBDL-1080p VARYG -EHX.mkv β New Saga - S01E12 - The Heroic Tale Continues x264 AAC WEBDL-1080p VARYG -EHX.mkv
+2025-10-05 11:10:41 [INFO] Tracked conversion: New Saga - S01E12 - The Heroic Tale Continues x264 AAC WEBDL-1080p VARYG -EHX.mkv, 1514.95MB β 211.47MB (14.0%)
+2025-10-05 11:10:41 [INFO] Deleted original and processing copy for New Saga - S01E12 - The Heroic Tale Continues x264 AAC WEBDL-1080p VARYG.mkv
+2025-10-05 11:10:41 [INFO] Skipping: New Saga - S01E04 - The Perfect Start to a Heroic Tale x264 AAC WEBDL-1080p VARYG -EHX.mkv
+2025-10-05 11:10:41 [INFO] Processing: New Saga - S01E06 - Brothers in Arms x264 AAC WEBDL-1080p VARYG.mkv
+2025-10-05 11:10:54 [INFO] Copied New Saga - S01E06 - Brothers in Arms x264 AAC WEBDL-1080p VARYG.mkv β New Saga - S01E06 - Brothers in Arms x264 AAC WEBDL-1080p VARYG.mkv
+2025-10-05 11:10:55 [INFO]
+π§© ENCODE SETTINGS
+ β’ Resolution: 1920x1080
+ β’ Scale Filter: lanczos
+ β’ CQ: 32
+ β’ Video Encoder: av1_nvenc (preset p1, pix_fmt p010le)
+ β’ Audio Streams:
+2025-10-05 11:10:55 [INFO] - Stream #1: 2ch, src=und, avg_bitrate=128kbps, metadata=0kbps, bucket_target=128.0kbps
+2025-10-05 11:10:55 [INFO] - Stream #2: 2ch, src=und, avg_bitrate=128kbps, metadata=0kbps, bucket_target=128.0kbps
+2025-10-05 11:10:55 [INFO] Starting CQ encode: New Saga - S01E06 - Brothers in Arms x264 AAC WEBDL-1080p VARYG -EHX.mkv
+2025-10-05 11:12:29 [INFO] π¦ Original: 1505.50 MB β Encoded: 222.61 MB (14.8% of original)
+2025-10-05 11:12:31 [INFO] Moved New Saga - S01E06 - Brothers in Arms x264 AAC WEBDL-1080p VARYG -EHX.mkv β New Saga - S01E06 - Brothers in Arms x264 AAC WEBDL-1080p VARYG -EHX.mkv
+2025-10-05 11:12:31 [INFO] Tracked conversion: New Saga - S01E06 - Brothers in Arms x264 AAC WEBDL-1080p VARYG -EHX.mkv, 1505.5MB β 222.61MB (14.8%)
+2025-10-05 11:12:31 [INFO] Deleted original and processing copy for New Saga - S01E06 - Brothers in Arms x264 AAC WEBDL-1080p VARYG.mkv
+2025-10-05 11:12:31 [INFO] Skipping: New Saga - S01E10 - Duel x264 AAC WEBDL-1080p VARYG -EHX.mkv
+2025-10-05 11:12:31 [INFO] Processing: New Saga - S01E03 - Application of the Contract x264 AAC WEBDL-1080p VARYG.mkv
+2025-10-05 11:12:45 [INFO] Copied New Saga - S01E03 - Application of the Contract x264 AAC WEBDL-1080p VARYG.mkv β New Saga - S01E03 - Application of the Contract x264 AAC WEBDL-1080p VARYG.mkv
+2025-10-05 11:12:45 [INFO]
+π§© ENCODE SETTINGS
+ β’ Resolution: 1920x1080
+ β’ Scale Filter: lanczos
+ β’ CQ: 32
+ β’ Video Encoder: av1_nvenc (preset p1, pix_fmt p010le)
+ β’ Audio Streams:
+2025-10-05 11:12:45 [INFO] - Stream #1: 2ch, src=und, avg_bitrate=128kbps, metadata=0kbps, bucket_target=128.0kbps
+2025-10-05 11:12:45 [INFO] - Stream #2: 2ch, src=und, avg_bitrate=128kbps, metadata=0kbps, bucket_target=128.0kbps
+2025-10-05 11:12:45 [INFO] Starting CQ encode: New Saga - S01E03 - Application of the Contract x264 AAC WEBDL-1080p VARYG -EHX.mkv
+2025-10-05 11:14:16 [INFO] π¦ Original: 1499.79 MB β Encoded: 267.68 MB (17.8% of original)
+2025-10-05 11:14:19 [INFO] Moved New Saga - S01E03 - Application of the Contract x264 AAC WEBDL-1080p VARYG -EHX.mkv β New Saga - S01E03 - Application of the Contract x264 AAC WEBDL-1080p VARYG -EHX.mkv
+2025-10-05 11:14:19 [INFO] Tracked conversion: New Saga - S01E03 - Application of the Contract x264 AAC WEBDL-1080p VARYG -EHX.mkv, 1499.79MB β 267.68MB (17.8%)
+2025-10-05 11:14:19 [INFO] Deleted original and processing copy for New Saga - S01E03 - Application of the Contract x264 AAC WEBDL-1080p VARYG.mkv
+2025-10-05 11:14:19 [INFO] Processing: New Saga - S01E02 - The Hero's Conditions x265 EAC3 WEBRip-1080p Erai-raws.mkv
+2025-10-05 11:14:23 [INFO] Copied New Saga - S01E02 - The Hero's Conditions x265 EAC3 WEBRip-1080p Erai-raws.mkv β New Saga - S01E02 - The Hero's Conditions x265 EAC3 WEBRip-1080p Erai-raws.mkv
+2025-10-05 11:14:23 [INFO]
+π§© ENCODE SETTINGS
+ β’ Resolution: 1920x1080
+ β’ Scale Filter: lanczos
+ β’ CQ: 32
+ β’ Video Encoder: av1_nvenc (preset p1, pix_fmt p010le)
+ β’ Audio Streams:
+2025-10-05 11:14:23 [INFO] - Stream #1: 2ch, src=und, avg_bitrate=128kbps, metadata=224kbps, bucket_target=128.0kbps
+2025-10-05 11:14:23 [INFO] Starting CQ encode: New Saga - S01E02 - The Hero's Conditions x265 EAC3 WEBRip-1080p Erai-raws -EHX.mkv
+2025-10-05 11:14:54 [INFO] Skipping: New Saga - S01E12 - The Heroic Tale Continues x264 AAC WEBDL-1080p VARYG -EHX.mkv
+2025-10-05 11:14:54 [INFO] Skipping: New Saga - S01E01 - I'll Change My Fate x265 EAC3 WEBRip-1080p Erai-raws -EHX.mkv
+2025-10-05 11:14:54 [INFO] Skipping: New Saga - S01E06 - Brothers in Arms x264 AAC WEBDL-1080p VARYG -EHX.mkv
+2025-10-05 11:14:54 [INFO] Skipping: New Saga - S01E11 - Secret Red-Hot Strategy x264 AAC WEBDL-1080p VARYG -EHX.mkv
+2025-10-05 11:14:54 [INFO] Skipping: New Saga - S01E07 - To the Blacksmith's Nation x264 AAC WEBDL-1080p VARYG -EHX.mkv
+2025-10-05 11:14:54 [INFO] Skipping: New Saga - S01E04 - The Perfect Start to a Heroic Tale x264 AAC WEBDL-1080p VARYG -EHX.mkv
+2025-10-05 11:14:54 [INFO] Skipping: New Saga - S01E03 - Application of the Contract x264 AAC WEBDL-1080p VARYG -EHX.mkv
+2025-10-05 11:14:54 [INFO] Skipping: New Saga - S01E10 - Duel x264 AAC WEBDL-1080p VARYG -EHX.mkv
+2025-10-05 11:14:54 [INFO] Skipping: New Saga - S01E08 - Those Who Act Out of Sight x264 AAC WEBDL-1080p VARYG -EHX.mkv
+2025-10-05 11:14:54 [INFO] Processing: New Saga - S01E02 - The Hero's Conditions x265 EAC3 WEBRip-1080p Erai-raws.mkv
+2025-10-05 11:14:58 [INFO] Copied New Saga - S01E02 - The Hero's Conditions x265 EAC3 WEBRip-1080p Erai-raws.mkv β New Saga - S01E02 - The Hero's Conditions x265 EAC3 WEBRip-1080p Erai-raws.mkv
+2025-10-05 11:14:59 [INFO]
+π§© ENCODE SETTINGS
+ β’ Resolution: 1920x1080
+ β’ Scale Filter: lanczos
+ β’ CQ: 32
+ β’ Video Encoder: av1_nvenc (preset p1, pix_fmt p010le)
+ β’ Audio Streams:
+2025-10-05 11:14:59 [INFO] - Stream #1: 2ch, src=und, avg_bitrate=128kbps, metadata=224kbps, bucket_target=128.0kbps, codec=aac
+2025-10-05 11:14:59 [INFO] Starting CQ encode: New Saga - S01E02 - The Hero's Conditions x265 EAC3 WEBRip-1080p Erai-raws -EHX.mkv
+2025-10-05 11:16:28 [INFO] π¦ Original: 459.88 MB β Encoded: 238.76 MB (51.9% of original)
+2025-10-05 11:16:28 [WARNING] β οΈ Size reduction insufficient (52%). Retrying with bitrate-based encode...
+2025-10-05 11:16:28 [INFO] Running fallback bitrate encode: New Saga - S01E02 - The Hero's Conditions x265 EAC3 WEBRip-1080p Erai-raws -EHX.mkv
+2025-10-05 11:17:20 [INFO] Skipping: New Saga - S01E12 - The Heroic Tale Continues x264 AAC WEBDL-1080p VARYG -EHX.mkv
+2025-10-05 11:17:20 [INFO] Skipping: New Saga - S01E01 - I'll Change My Fate x265 EAC3 WEBRip-1080p Erai-raws -EHX.mkv
+2025-10-05 11:17:20 [INFO] Skipping: New Saga - S01E06 - Brothers in Arms x264 AAC WEBDL-1080p VARYG -EHX.mkv
+2025-10-05 11:17:20 [INFO] Skipping: New Saga - S01E11 - Secret Red-Hot Strategy x264 AAC WEBDL-1080p VARYG -EHX.mkv
+2025-10-05 11:17:20 [INFO] Skipping: New Saga - S01E07 - To the Blacksmith's Nation x264 AAC WEBDL-1080p VARYG -EHX.mkv
+2025-10-05 11:17:20 [INFO] Skipping: New Saga - S01E04 - The Perfect Start to a Heroic Tale x264 AAC WEBDL-1080p VARYG -EHX.mkv
+2025-10-05 11:17:20 [INFO] Skipping: New Saga - S01E03 - Application of the Contract x264 AAC WEBDL-1080p VARYG -EHX.mkv
+2025-10-05 11:17:20 [INFO] Skipping: New Saga - S01E10 - Duel x264 AAC WEBDL-1080p VARYG -EHX.mkv
+2025-10-05 11:17:20 [INFO] Skipping: New Saga - S01E08 - Those Who Act Out of Sight x264 AAC WEBDL-1080p VARYG -EHX.mkv
+2025-10-05 11:17:20 [INFO] Processing: New Saga - S01E02 - The Hero's Conditions x265 EAC3 WEBRip-1080p Erai-raws.mkv
+2025-10-05 11:17:24 [INFO] Copied New Saga - S01E02 - The Hero's Conditions x265 EAC3 WEBRip-1080p Erai-raws.mkv β New Saga - S01E02 - The Hero's Conditions x265 EAC3 WEBRip-1080p Erai-raws.mkv
+2025-10-05 11:17:24 [INFO]
+π§© ENCODE SETTINGS
+ β’ Resolution: 1920x1080
+ β’ Scale Filter: lanczos
+ β’ CQ: 32
+ β’ Video Encoder: av1_nvenc (preset p1, pix_fmt p010le)
+ β’ Audio Streams:
+2025-10-05 11:17:24 [INFO] - Stream #1: 2ch, src=und, avg_bitrate=128kbps, metadata=224kbps, bucket_target=128.0kbps, codec=aac
+2025-10-05 11:17:24 [INFO] Starting CQ encode: New Saga - S01E02 - The Hero's Conditions x265 EAC3 WEBRip-1080p Erai-raws -EHX.mkv
+2025-10-05 11:18:54 [INFO] π¦ Original: 459.88 MB β Encoded: 238.76 MB (51.9% of original)
+2025-10-05 11:18:54 [WARNING] β οΈ Size reduction insufficient (52%). Retrying with bitrate-based encode...
+2025-10-05 11:18:54 [INFO] Running fallback bitrate encode: New Saga - S01E02 - The Hero's Conditions x265 EAC3 WEBRip-1080p Erai-raws -EHX.mkv
+2025-10-05 11:21:27 [INFO] Skipping: New Saga - S01E12 - The Heroic Tale Continues x264 AAC WEBDL-1080p VARYG -EHX.mkv
+2025-10-05 11:21:27 [INFO] Skipping: New Saga - S01E01 - I'll Change My Fate x265 EAC3 WEBRip-1080p Erai-raws -EHX.mkv
+2025-10-05 11:21:27 [INFO] Skipping: New Saga - S01E06 - Brothers in Arms x264 AAC WEBDL-1080p VARYG -EHX.mkv
+2025-10-05 11:21:27 [INFO] Skipping: New Saga - S01E11 - Secret Red-Hot Strategy x264 AAC WEBDL-1080p VARYG -EHX.mkv
+2025-10-05 11:21:27 [INFO] Skipping: New Saga - S01E07 - To the Blacksmith's Nation x264 AAC WEBDL-1080p VARYG -EHX.mkv
+2025-10-05 11:21:27 [INFO] Skipping: New Saga - S01E04 - The Perfect Start to a Heroic Tale x264 AAC WEBDL-1080p VARYG -EHX.mkv
+2025-10-05 11:21:27 [INFO] Skipping: New Saga - S01E03 - Application of the Contract x264 AAC WEBDL-1080p VARYG -EHX.mkv
+2025-10-05 11:21:27 [INFO] Skipping: New Saga - S01E10 - Duel x264 AAC WEBDL-1080p VARYG -EHX.mkv
+2025-10-05 11:21:27 [INFO] Skipping: New Saga - S01E08 - Those Who Act Out of Sight x264 AAC WEBDL-1080p VARYG -EHX.mkv
+2025-10-05 11:21:27 [INFO] Processing: New Saga - S01E02 - The Hero's Conditions x265 EAC3 WEBRip-1080p Erai-raws.mkv
+2025-10-05 11:21:31 [INFO] Copied New Saga - S01E02 - The Hero's Conditions x265 EAC3 WEBRip-1080p Erai-raws.mkv β New Saga - S01E02 - The Hero's Conditions x265 EAC3 WEBRip-1080p Erai-raws.mkv
+2025-10-05 11:21:31 [INFO]
+π§© ENCODE SETTINGS
+ β’ Resolution: 1920x1080
+ β’ Scale Filter: lanczos
+ β’ CQ: 32
+ β’ Video Encoder: av1_nvenc (preset p1, pix_fmt p010le)
+ β’ Audio Streams:
+2025-10-05 11:21:31 [INFO] - Stream #1: 2ch, src=und, avg=128kbps, metadata=224kbps, closest bucket=128.0kbps β codec=aac
+2025-10-05 11:21:31 [INFO] Starting CQ encode: New Saga - S01E02 - The Hero's Conditions x265 EAC3 WEBRip-1080p Erai-raws -EHX.mkv
+2025-10-05 11:23:01 [INFO] π¦ Original: 459.88 MB β Encoded: 238.76 MB (51.9% of original)
+2025-10-05 11:23:01 [WARNING] β οΈ Size reduction insufficient (52%). Retrying with bitrate-based encode...
+2025-10-05 11:23:01 [INFO] Running fallback bitrate encode: New Saga - S01E02 - The Hero's Conditions x265 EAC3 WEBRip-1080p Erai-raws -EHX.mkv
+2025-10-05 11:28:30 [INFO] Skipping: New Saga - S01E12 - The Heroic Tale Continues x264 AAC WEBDL-1080p VARYG -EHX.mkv
+2025-10-05 11:28:30 [INFO] Skipping: New Saga - S01E01 - I'll Change My Fate x265 EAC3 WEBRip-1080p Erai-raws -EHX.mkv
+2025-10-05 11:28:30 [INFO] Skipping: New Saga - S01E06 - Brothers in Arms x264 AAC WEBDL-1080p VARYG -EHX.mkv
+2025-10-05 11:28:30 [INFO] Skipping: New Saga - S01E11 - Secret Red-Hot Strategy x264 AAC WEBDL-1080p VARYG -EHX.mkv
+2025-10-05 11:28:30 [INFO] Skipping: New Saga - S01E07 - To the Blacksmith's Nation x264 AAC WEBDL-1080p VARYG -EHX.mkv
+2025-10-05 11:28:30 [INFO] Skipping: New Saga - S01E04 - The Perfect Start to a Heroic Tale x264 AAC WEBDL-1080p VARYG -EHX.mkv
+2025-10-05 11:28:30 [INFO] Skipping: New Saga - S01E03 - Application of the Contract x264 AAC WEBDL-1080p VARYG -EHX.mkv
+2025-10-05 11:28:30 [INFO] Skipping: New Saga - S01E10 - Duel x264 AAC WEBDL-1080p VARYG -EHX.mkv
+2025-10-05 11:28:30 [INFO] Skipping: New Saga - S01E08 - Those Who Act Out of Sight x264 AAC WEBDL-1080p VARYG -EHX.mkv
+2025-10-05 11:28:30 [INFO] Processing: New Saga - S01E02 - The Hero's Conditions x265 EAC3 WEBRip-1080p Erai-raws.mkv
+2025-10-05 11:28:34 [INFO] Copied New Saga - S01E02 - The Hero's Conditions x265 EAC3 WEBRip-1080p Erai-raws.mkv β New Saga - S01E02 - The Hero's Conditions x265 EAC3 WEBRip-1080p Erai-raws.mkv
+2025-10-05 11:28:34 [INFO]
+π§© ENCODE SETTINGS
+ β’ Resolution: 1920x1080
+ β’ Scale Filter: lanczos
+ β’ CQ: 32
+ β’ Video Encoder: av1_nvenc (preset p1, pix_fmt p010le)
+ β’ Audio Streams:
+2025-10-05 11:28:34 [INFO] - Stream #1: 2ch, src=und, avg=128kbps, metadata=224kbps, closest bucket=128.0kbps β codec=opus
+2025-10-05 11:28:34 [INFO] Starting CQ encode: New Saga - S01E02 - The Hero's Conditions x265 EAC3 WEBRip-1080p Erai-raws -EHX.mkv
+2025-10-05 11:32:11 [INFO] Skipping: New Saga - S01E12 - The Heroic Tale Continues x264 AAC WEBDL-1080p VARYG -EHX.mkv
+2025-10-05 11:32:11 [INFO] Skipping: New Saga - S01E01 - I'll Change My Fate x265 EAC3 WEBRip-1080p Erai-raws -EHX.mkv
+2025-10-05 11:32:11 [INFO] Skipping: New Saga - S01E06 - Brothers in Arms x264 AAC WEBDL-1080p VARYG -EHX.mkv
+2025-10-05 11:32:11 [INFO] Skipping: New Saga - S01E11 - Secret Red-Hot Strategy x264 AAC WEBDL-1080p VARYG -EHX.mkv
+2025-10-05 11:32:11 [INFO] Skipping: New Saga - S01E07 - To the Blacksmith's Nation x264 AAC WEBDL-1080p VARYG -EHX.mkv
+2025-10-05 11:32:11 [INFO] Skipping: New Saga - S01E04 - The Perfect Start to a Heroic Tale x264 AAC WEBDL-1080p VARYG -EHX.mkv
+2025-10-05 11:32:11 [INFO] Skipping: New Saga - S01E03 - Application of the Contract x264 AAC WEBDL-1080p VARYG -EHX.mkv
+2025-10-05 11:32:11 [INFO] Skipping: New Saga - S01E10 - Duel x264 AAC WEBDL-1080p VARYG -EHX.mkv
+2025-10-05 11:32:11 [INFO] Skipping: New Saga - S01E08 - Those Who Act Out of Sight x264 AAC WEBDL-1080p VARYG -EHX.mkv
+2025-10-05 11:32:11 [INFO] Processing: New Saga - S01E02 - The Hero's Conditions x265 EAC3 WEBRip-1080p Erai-raws.mkv
+2025-10-05 11:32:15 [INFO] Copied New Saga - S01E02 - The Hero's Conditions x265 EAC3 WEBRip-1080p Erai-raws.mkv β New Saga - S01E02 - The Hero's Conditions x265 EAC3 WEBRip-1080p Erai-raws.mkv
+2025-10-05 11:32:15 [INFO]
+π§© ENCODE SETTINGS
+ β’ Resolution: 1920x1080
+ β’ Scale Filter: lanczos
+ β’ CQ: 32
+ β’ Video Encoder: av1_nvenc (preset p1, pix_fmt p010le)
+ β’ Audio Streams:
+2025-10-05 11:32:15 [INFO] - Stream #1: 2ch, src=und, avg=128kbps, metadata=224kbps, closest bucket=128.0kbps β codec=opus
+2025-10-05 11:32:15 [INFO] Starting CQ encode: New Saga - S01E02 - The Hero's Conditions x265 EAC3 WEBRip-1080p Erai-raws -EHX.mkv
+2025-10-05 11:33:48 [INFO] Skipping: New Saga - S01E12 - The Heroic Tale Continues x264 AAC WEBDL-1080p VARYG -EHX.mkv
+2025-10-05 11:33:48 [INFO] Skipping: New Saga - S01E01 - I'll Change My Fate x265 EAC3 WEBRip-1080p Erai-raws -EHX.mkv
+2025-10-05 11:33:48 [INFO] Skipping: New Saga - S01E06 - Brothers in Arms x264 AAC WEBDL-1080p VARYG -EHX.mkv
+2025-10-05 11:33:48 [INFO] Skipping: New Saga - S01E11 - Secret Red-Hot Strategy x264 AAC WEBDL-1080p VARYG -EHX.mkv
+2025-10-05 11:33:48 [INFO] Skipping: New Saga - S01E07 - To the Blacksmith's Nation x264 AAC WEBDL-1080p VARYG -EHX.mkv
+2025-10-05 11:33:48 [INFO] Skipping: New Saga - S01E04 - The Perfect Start to a Heroic Tale x264 AAC WEBDL-1080p VARYG -EHX.mkv
+2025-10-05 11:33:48 [INFO] Skipping: New Saga - S01E03 - Application of the Contract x264 AAC WEBDL-1080p VARYG -EHX.mkv
+2025-10-05 11:33:48 [INFO] Skipping: New Saga - S01E10 - Duel x264 AAC WEBDL-1080p VARYG -EHX.mkv
+2025-10-05 11:33:48 [INFO] Skipping: New Saga - S01E08 - Those Who Act Out of Sight x264 AAC WEBDL-1080p VARYG -EHX.mkv
+2025-10-05 11:33:48 [INFO] Processing: New Saga - S01E02 - The Hero's Conditions x265 EAC3 WEBRip-1080p Erai-raws.mkv
+2025-10-05 11:33:52 [INFO] Copied New Saga - S01E02 - The Hero's Conditions x265 EAC3 WEBRip-1080p Erai-raws.mkv β New Saga - S01E02 - The Hero's Conditions x265 EAC3 WEBRip-1080p Erai-raws.mkv
+2025-10-05 11:33:52 [INFO]
+π§© ENCODE SETTINGS
+ β’ Resolution: 1920x1080
+ β’ Scale Filter: lanczos
+ β’ CQ: 32
+ β’ Video Encoder: av1_nvenc (preset p1, pix_fmt p010le)
+ β’ Audio Streams:
+2025-10-05 11:33:52 [INFO] - Stream #1: 2ch, src=und, avg_bitrate=128kbps, metadata=224kbps, bucket_target=128.0kbps
+2025-10-05 11:33:52 [INFO] Starting CQ encode: New Saga - S01E02 - The Hero's Conditions x265 EAC3 WEBRip-1080p Erai-raws -EHX.mkv
+2025-10-05 11:35:22 [INFO] π¦ Original: 459.88 MB β Encoded: 238.76 MB (51.9% of original)
+2025-10-05 11:35:22 [WARNING] β οΈ Size reduction insufficient (52%). Retrying with bitrate-based encode...
+2025-10-05 11:35:22 [INFO] Running fallback bitrate encode: New Saga - S01E02 - The Hero's Conditions x265 EAC3 WEBRip-1080p Erai-raws -EHX.mkv
+2025-10-05 11:36:54 [INFO] Moved New Saga - S01E02 - The Hero's Conditions x265 EAC3 WEBRip-1080p Erai-raws -EHX.mkv β New Saga - S01E02 - The Hero's Conditions x265 EAC3 WEBRip-1080p Erai-raws -EHX.mkv
+2025-10-05 11:36:54 [INFO] Tracked conversion: New Saga - S01E02 - The Hero's Conditions x265 EAC3 WEBRip-1080p Erai-raws -EHX.mkv, 459.88MB β 238.76MB (51.9%)
+2025-10-05 11:36:54 [INFO] Deleted original and processing copy for New Saga - S01E02 - The Hero's Conditions x265 EAC3 WEBRip-1080p Erai-raws.mkv
+2025-10-05 11:36:54 [INFO] Skipping: New Saga - S01E05 - Reunion at Dawn h264 EAC3 WEBDL-1080p VARYG -EHX.mkv
+2025-10-05 11:36:54 [INFO] Skipping: New Saga - S01E09 - Hidden Ambitions x264 AAC WEBDL-1080p VARYG -EHX.mkv
+2025-10-05 11:46:30 [INFO] Processing: You Are Ms. Servant - S01E01 - My Fateful Encounter With You x264 AAC WEBDL-1080p VARYG.mkv
+2025-10-05 11:46:42 [INFO] Copied You Are Ms. Servant - S01E01 - My Fateful Encounter With You x264 AAC WEBDL-1080p VARYG.mkv β You Are Ms. Servant - S01E01 - My Fateful Encounter With You x264 AAC WEBDL-1080p VARYG.mkv
+2025-10-05 11:46:42 [INFO]
+π§© ENCODE SETTINGS
+ β’ Resolution: 1920x1080
+ β’ Scale Filter: lanczos
+ β’ CQ: 32
+ β’ Video Encoder: av1_nvenc (preset p1, pix_fmt p010le)
+ β’ Audio Streams:
+2025-10-05 11:46:42 [INFO] - Stream #1: 2ch, src=und, avg_bitrate=128kbps, metadata=0kbps, bucket_target=128000kbps
+2025-10-05 11:46:42 [INFO] Running CQ encode: You Are Ms. Servant - S01E01 - My Fateful Encounter With You x264 AAC WEBDL-1080p VARYG -EHX.mkv
+2025-10-05 11:49:22 [INFO] Processing: You Are Ms. Servant - S01E01 - My Fateful Encounter With You x264 AAC WEBDL-1080p VARYG.mkv
+2025-10-05 11:49:34 [INFO] Copied You Are Ms. Servant - S01E01 - My Fateful Encounter With You x264 AAC WEBDL-1080p VARYG.mkv β You Are Ms. Servant - S01E01 - My Fateful Encounter With You x264 AAC WEBDL-1080p VARYG.mkv
+2025-10-05 11:49:35 [INFO]
+π§© ENCODE SETTINGS
+ β’ Resolution: 1920x1080
+ β’ Scale Filter: lanczos
+ β’ CQ: 32
+ β’ Video Encoder: av1_nvenc (preset p1, pix_fmt p010le)
+ β’ Audio Streams:
+2025-10-05 11:49:35 [INFO] - Stream #1: 2ch, src=und, avg_bitrate=128kbps, metadata=0kbps, bucket_target=128.0kbps
+2025-10-05 11:49:35 [INFO] Running CQ encode: You Are Ms. Servant - S01E01 - My Fateful Encounter With You x264 AAC WEBDL-1080p VARYG -EHX.mkv
+2025-10-05 11:50:44 [INFO] π¦ Original: 1404.32 MB β Encoded: 300.44 MB (21.4% of original)
+2025-10-05 11:50:47 [INFO] Moved You Are Ms. Servant - S01E01 - My Fateful Encounter With You x264 AAC WEBDL-1080p VARYG -EHX.mkv β You Are Ms. Servant - S01E01 - My Fateful Encounter With You x264 AAC WEBDL-1080p VARYG -EHX.mkv
+2025-10-05 11:50:47 [INFO] Tracked conversion: You Are Ms. Servant - S01E01 - My Fateful Encounter With You x264 AAC WEBDL-1080p VARYG -EHX.mkv, 1404.32MB β 300.44MB (21.4%), method=CQ
+2025-10-05 11:50:47 [INFO] Deleted original and processing copy for You Are Ms. Servant - S01E01 - My Fateful Encounter With You x264 AAC WEBDL-1080p VARYG.mkv
+2025-10-05 11:50:47 [INFO] Processing: You are Ms. Servant - S01E02 - You Want to Know x264 AAC WEBDL-1080p VARYG.mkv
+2025-10-05 11:51:01 [INFO] Copied You are Ms. Servant - S01E02 - You Want to Know x264 AAC WEBDL-1080p VARYG.mkv β You are Ms. Servant - S01E02 - You Want to Know x264 AAC WEBDL-1080p VARYG.mkv
+2025-10-05 11:51:01 [INFO]
+π§© ENCODE SETTINGS
+ β’ Resolution: 1920x1080
+ β’ Scale Filter: lanczos
+ β’ CQ: 32
+ β’ Video Encoder: av1_nvenc (preset p1, pix_fmt p010le)
+ β’ Audio Streams:
+2025-10-05 11:51:01 [INFO] - Stream #1: 2ch, src=und, avg_bitrate=128kbps, metadata=0kbps, bucket_target=128.0kbps
+2025-10-05 11:51:01 [INFO] Running CQ encode: You are Ms. Servant - S01E02 - You Want to Know x264 AAC WEBDL-1080p VARYG -EHX.mkv
+2025-10-05 11:52:12 [INFO] π¦ Original: 1408.95 MB β Encoded: 313.09 MB (22.2% of original)
+2025-10-05 11:52:15 [INFO] Moved You are Ms. Servant - S01E02 - You Want to Know x264 AAC WEBDL-1080p VARYG -EHX.mkv β You are Ms. Servant - S01E02 - You Want to Know x264 AAC WEBDL-1080p VARYG -EHX.mkv
+2025-10-05 11:52:15 [INFO] Tracked conversion: You are Ms. Servant - S01E02 - You Want to Know x264 AAC WEBDL-1080p VARYG -EHX.mkv, 1408.95MB β 313.09MB (22.2%), method=CQ
+2025-10-05 11:52:15 [INFO] Deleted original and processing copy for You are Ms. Servant - S01E02 - You Want to Know x264 AAC WEBDL-1080p VARYG.mkv
+2025-10-05 11:52:15 [INFO] Processing: You are Ms. Servant - S01E03 - You Are Ms. Yuki x264 AAC WEBDL-1080p VARYG.mkv
+2025-10-05 11:52:28 [INFO] Copied You are Ms. Servant - S01E03 - You Are Ms. Yuki x264 AAC WEBDL-1080p VARYG.mkv β You are Ms. Servant - S01E03 - You Are Ms. Yuki x264 AAC WEBDL-1080p VARYG.mkv
+2025-10-05 11:52:28 [INFO]
+π§© ENCODE SETTINGS
+ β’ Resolution: 1920x1080
+ β’ Scale Filter: lanczos
+ β’ CQ: 32
+ β’ Video Encoder: av1_nvenc (preset p1, pix_fmt p010le)
+ β’ Audio Streams:
+2025-10-05 11:52:28 [INFO] - Stream #1: 2ch, src=und, avg_bitrate=128kbps, metadata=0kbps, bucket_target=128.0kbps
+2025-10-05 11:52:28 [INFO] Running CQ encode: You are Ms. Servant - S01E03 - You Are Ms. Yuki x264 AAC WEBDL-1080p VARYG -EHX.mkv
+2025-10-05 11:53:37 [INFO] π¦ Original: 1407.34 MB β Encoded: 307.42 MB (21.8% of original)
+2025-10-05 11:53:39 [INFO] Moved You are Ms. Servant - S01E03 - You Are Ms. Yuki x264 AAC WEBDL-1080p VARYG -EHX.mkv β You are Ms. Servant - S01E03 - You Are Ms. Yuki x264 AAC WEBDL-1080p VARYG -EHX.mkv
+2025-10-05 11:53:39 [INFO] Tracked conversion: You are Ms. Servant - S01E03 - You Are Ms. Yuki x264 AAC WEBDL-1080p VARYG -EHX.mkv, 1407.34MB β 307.42MB (21.8%), method=CQ
+2025-10-05 11:53:40 [INFO] Deleted original and processing copy for You are Ms. Servant - S01E03 - You Are Ms. Yuki x264 AAC WEBDL-1080p VARYG.mkv
+2025-10-05 11:53:40 [INFO] Processing: You are Ms. Servant - S01E04 - You Won't Miss Out x264 AAC HDTV-1080p SubsPlease.mkv
+2025-10-05 11:53:52 [INFO] Copied You are Ms. Servant - S01E04 - You Won't Miss Out x264 AAC HDTV-1080p SubsPlease.mkv β You are Ms. Servant - S01E04 - You Won't Miss Out x264 AAC HDTV-1080p SubsPlease.mkv
+2025-10-05 11:53:53 [INFO]
+π§© ENCODE SETTINGS
+ β’ Resolution: 1920x1080
+ β’ Scale Filter: lanczos
+ β’ CQ: 32
+ β’ Video Encoder: av1_nvenc (preset p1, pix_fmt p010le)
+ β’ Audio Streams:
+2025-10-05 11:53:53 [INFO] - Stream #1: 2ch, src=und, avg_bitrate=128kbps, metadata=0kbps, bucket_target=128.0kbps
+2025-10-05 11:53:53 [INFO] Running CQ encode: You are Ms. Servant - S01E04 - You Won't Miss Out x264 AAC HDTV-1080p SubsPlease -EHX.mkv
+2025-10-05 11:55:02 [INFO] π¦ Original: 1401.62 MB β Encoded: 323.88 MB (23.1% of original)
+2025-10-05 11:55:05 [INFO] Moved You are Ms. Servant - S01E04 - You Won't Miss Out x264 AAC HDTV-1080p SubsPlease -EHX.mkv β You are Ms. Servant - S01E04 - You Won't Miss Out x264 AAC HDTV-1080p SubsPlease -EHX.mkv
+2025-10-05 11:55:05 [INFO] Tracked conversion: You are Ms. Servant - S01E04 - You Won't Miss Out x264 AAC HDTV-1080p SubsPlease -EHX.mkv, 1401.62MB β 323.88MB (23.1%), method=CQ
+2025-10-05 11:55:06 [INFO] Deleted original and processing copy for You are Ms. Servant - S01E04 - You Won't Miss Out x264 AAC HDTV-1080p SubsPlease.mkv
+2025-10-05 11:55:06 [INFO] Processing: You are Ms. Servant - S01E05 - What You Want to Protect x264 AAC WEBDL-1080p VARYG.mkv
+2025-10-05 11:55:18 [INFO] Copied You are Ms. Servant - S01E05 - What You Want to Protect x264 AAC WEBDL-1080p VARYG.mkv β You are Ms. Servant - S01E05 - What You Want to Protect x264 AAC WEBDL-1080p VARYG.mkv
+2025-10-05 11:55:18 [INFO]
+π§© ENCODE SETTINGS
+ β’ Resolution: 1920x1080
+ β’ Scale Filter: lanczos
+ β’ CQ: 32
+ β’ Video Encoder: av1_nvenc (preset p1, pix_fmt p010le)
+ β’ Audio Streams:
+2025-10-05 11:55:18 [INFO] - Stream #1: 2ch, src=und, avg_bitrate=128kbps, metadata=0kbps, bucket_target=128.0kbps
+2025-10-05 11:55:18 [INFO] Running CQ encode: You are Ms. Servant - S01E05 - What You Want to Protect x264 AAC WEBDL-1080p VARYG -EHX.mkv
+2025-10-05 11:56:26 [INFO] π¦ Original: 1407.84 MB β Encoded: 263.15 MB (18.7% of original)
+2025-10-05 11:56:29 [INFO] Moved You are Ms. Servant - S01E05 - What You Want to Protect x264 AAC WEBDL-1080p VARYG -EHX.mkv β You are Ms. Servant - S01E05 - What You Want to Protect x264 AAC WEBDL-1080p VARYG -EHX.mkv
+2025-10-05 11:56:29 [INFO] Tracked conversion: You are Ms. Servant - S01E05 - What You Want to Protect x264 AAC WEBDL-1080p VARYG -EHX.mkv, 1407.84MB β 263.15MB (18.7%), method=CQ
+2025-10-05 11:56:29 [INFO] Deleted original and processing copy for You are Ms. Servant - S01E05 - What You Want to Protect x264 AAC WEBDL-1080p VARYG.mkv
+2025-10-05 11:56:29 [INFO] Processing: You are Ms. Servant - S01E06 - You're Lonelier Than I Thought x264 AAC WEBDL-1080p VARYG.mkv
+2025-10-05 11:56:41 [INFO] Copied You are Ms. Servant - S01E06 - You're Lonelier Than I Thought x264 AAC WEBDL-1080p VARYG.mkv β You are Ms. Servant - S01E06 - You're Lonelier Than I Thought x264 AAC WEBDL-1080p VARYG.mkv
+2025-10-05 11:56:42 [INFO]
+π§© ENCODE SETTINGS
+ β’ Resolution: 1920x1080
+ β’ Scale Filter: lanczos
+ β’ CQ: 32
+ β’ Video Encoder: av1_nvenc (preset p1, pix_fmt p010le)
+ β’ Audio Streams:
+2025-10-05 11:56:42 [INFO] - Stream #1: 2ch, src=und, avg_bitrate=128kbps, metadata=0kbps, bucket_target=128.0kbps
+2025-10-05 11:56:42 [INFO] - Stream #2: 2ch, src=und, avg_bitrate=128kbps, metadata=0kbps, bucket_target=128.0kbps
+2025-10-05 11:56:42 [INFO] Running CQ encode: You are Ms. Servant - S01E06 - You're Lonelier Than I Thought x264 AAC WEBDL-1080p VARYG -EHX.mkv
+2025-10-05 11:58:01 [INFO] π¦ Original: 1448.64 MB β Encoded: 344.80 MB (23.8% of original)
+2025-10-05 11:58:04 [INFO] Moved You are Ms. Servant - S01E06 - You're Lonelier Than I Thought x264 AAC WEBDL-1080p VARYG -EHX.mkv β You are Ms. Servant - S01E06 - You're Lonelier Than I Thought x264 AAC WEBDL-1080p VARYG -EHX.mkv
+2025-10-05 11:58:04 [INFO] Tracked conversion: You are Ms. Servant - S01E06 - You're Lonelier Than I Thought x264 AAC WEBDL-1080p VARYG -EHX.mkv, 1448.64MB β 344.8MB (23.8%), method=CQ
+2025-10-05 11:58:04 [INFO] Deleted original and processing copy for You are Ms. Servant - S01E06 - You're Lonelier Than I Thought x264 AAC WEBDL-1080p VARYG.mkv
+2025-10-05 11:58:04 [INFO] Processing: You are Ms. Servant - S01E07 - You've Finally Figured It Out x264 AAC WEBDL-1080p VARYG.mkv
+2025-10-05 11:58:19 [INFO] Copied You are Ms. Servant - S01E07 - You've Finally Figured It Out x264 AAC WEBDL-1080p VARYG.mkv β You are Ms. Servant - S01E07 - You've Finally Figured It Out x264 AAC WEBDL-1080p VARYG.mkv
+2025-10-05 11:58:19 [INFO]
+π§© ENCODE SETTINGS
+ β’ Resolution: 1920x1080
+ β’ Scale Filter: lanczos
+ β’ CQ: 32
+ β’ Video Encoder: av1_nvenc (preset p1, pix_fmt p010le)
+ β’ Audio Streams:
+2025-10-05 11:58:19 [INFO] - Stream #1: 2ch, src=und, avg_bitrate=128kbps, metadata=0kbps, bucket_target=128.0kbps
+2025-10-05 11:58:19 [INFO] - Stream #2: 2ch, src=und, avg_bitrate=128kbps, metadata=0kbps, bucket_target=128.0kbps
+2025-10-05 11:58:19 [INFO] Running CQ encode: You are Ms. Servant - S01E07 - You've Finally Figured It Out x264 AAC WEBDL-1080p VARYG -EHX.mkv
+2025-10-05 11:59:37 [INFO] π¦ Original: 1445.40 MB β Encoded: 340.70 MB (23.6% of original)
+2025-10-05 11:59:40 [INFO] Moved You are Ms. Servant - S01E07 - You've Finally Figured It Out x264 AAC WEBDL-1080p VARYG -EHX.mkv β You are Ms. Servant - S01E07 - You've Finally Figured It Out x264 AAC WEBDL-1080p VARYG -EHX.mkv
+2025-10-05 11:59:40 [INFO] Tracked conversion: You are Ms. Servant - S01E07 - You've Finally Figured It Out x264 AAC WEBDL-1080p VARYG -EHX.mkv, 1445.4MB β 340.7MB (23.6%), method=CQ
+2025-10-05 11:59:40 [INFO] Deleted original and processing copy for You are Ms. Servant - S01E07 - You've Finally Figured It Out x264 AAC WEBDL-1080p VARYG.mkv
+2025-10-05 11:59:40 [INFO] Processing: You are Ms. Servant - S01E08 - The Autumn With You and the Sauce x264 AAC WEBDL-1080p VARYG.mkv
+2025-10-05 11:59:54 [INFO] Copied You are Ms. Servant - S01E08 - The Autumn With You and the Sauce x264 AAC WEBDL-1080p VARYG.mkv β You are Ms. Servant - S01E08 - The Autumn With You and the Sauce x264 AAC WEBDL-1080p VARYG.mkv
+2025-10-05 11:59:54 [INFO]
+π§© ENCODE SETTINGS
+ β’ Resolution: 1920x1080
+ β’ Scale Filter: lanczos
+ β’ CQ: 32
+ β’ Video Encoder: av1_nvenc (preset p1, pix_fmt p010le)
+ β’ Audio Streams:
+2025-10-05 11:59:54 [INFO] - Stream #1: 2ch, src=und, avg_bitrate=128kbps, metadata=0kbps, bucket_target=128.0kbps
+2025-10-05 11:59:54 [INFO] - Stream #2: 2ch, src=und, avg_bitrate=128kbps, metadata=0kbps, bucket_target=128.0kbps
+2025-10-05 11:59:54 [INFO] Running CQ encode: You are Ms. Servant - S01E08 - The Autumn With You and the Sauce x264 AAC WEBDL-1080p VARYG -EHX.mkv
+2025-10-05 12:01:12 [INFO] π¦ Original: 1450.30 MB β Encoded: 363.32 MB (25.1% of original)
+2025-10-05 12:01:15 [INFO] Moved You are Ms. Servant - S01E08 - The Autumn With You and the Sauce x264 AAC WEBDL-1080p VARYG -EHX.mkv β You are Ms. Servant - S01E08 - The Autumn With You and the Sauce x264 AAC WEBDL-1080p VARYG -EHX.mkv
+2025-10-05 12:01:15 [INFO] Tracked conversion: You are Ms. Servant - S01E08 - The Autumn With You and the Sauce x264 AAC WEBDL-1080p VARYG -EHX.mkv, 1450.3MB β 363.32MB (25.1%), method=CQ
+2025-10-05 12:01:15 [INFO] Deleted original and processing copy for You are Ms. Servant - S01E08 - The Autumn With You and the Sauce x264 AAC WEBDL-1080p VARYG.mkv
+2025-10-05 12:01:15 [INFO] Processing: You are Ms. Servant - S01E09 - You and the Cultural Stage x264 AAC WEBDL-1080p VARYG.mkv
+2025-10-05 12:01:29 [INFO] Copied You are Ms. Servant - S01E09 - You and the Cultural Stage x264 AAC WEBDL-1080p VARYG.mkv β You are Ms. Servant - S01E09 - You and the Cultural Stage x264 AAC WEBDL-1080p VARYG.mkv
+2025-10-05 12:01:29 [INFO]
+π§© ENCODE SETTINGS
+ β’ Resolution: 1920x1080
+ β’ Scale Filter: lanczos
+ β’ CQ: 32
+ β’ Video Encoder: av1_nvenc (preset p1, pix_fmt p010le)
+ β’ Audio Streams:
+2025-10-05 12:01:29 [INFO] - Stream #1: 2ch, src=und, avg_bitrate=128kbps, metadata=0kbps, bucket_target=128.0kbps
+2025-10-05 12:01:29 [INFO] - Stream #2: 2ch, src=und, avg_bitrate=128kbps, metadata=0kbps, bucket_target=128.0kbps
+2025-10-05 12:01:29 [INFO] Running CQ encode: You are Ms. Servant - S01E09 - You and the Cultural Stage x264 AAC WEBDL-1080p VARYG -EHX.mkv
+2025-10-05 12:02:50 [INFO] π¦ Original: 1450.71 MB β Encoded: 268.45 MB (18.5% of original)
+2025-10-05 12:02:52 [INFO] Moved You are Ms. Servant - S01E09 - You and the Cultural Stage x264 AAC WEBDL-1080p VARYG -EHX.mkv β You are Ms. Servant - S01E09 - You and the Cultural Stage x264 AAC WEBDL-1080p VARYG -EHX.mkv
+2025-10-05 12:02:52 [INFO] Tracked conversion: You are Ms. Servant - S01E09 - You and the Cultural Stage x264 AAC WEBDL-1080p VARYG -EHX.mkv, 1450.71MB β 268.45MB (18.5%), method=CQ
+2025-10-05 12:02:52 [INFO] Deleted original and processing copy for You are Ms. Servant - S01E09 - You and the Cultural Stage x264 AAC WEBDL-1080p VARYG.mkv
+2025-10-05 12:02:52 [INFO] Processing: You are Ms. Servant - S01E10 - You and the Forbidden Fruit x264 AAC WEBDL-1080p VARYG.mkv
+2025-10-05 12:03:05 [INFO] Copied You are Ms. Servant - S01E10 - You and the Forbidden Fruit x264 AAC WEBDL-1080p VARYG.mkv β You are Ms. Servant - S01E10 - You and the Forbidden Fruit x264 AAC WEBDL-1080p VARYG.mkv
+2025-10-05 12:03:05 [INFO]
+π§© ENCODE SETTINGS
+ β’ Resolution: 1920x1080
+ β’ Scale Filter: lanczos
+ β’ CQ: 32
+ β’ Video Encoder: av1_nvenc (preset p1, pix_fmt p010le)
+ β’ Audio Streams:
+2025-10-05 12:03:05 [INFO] - Stream #1: 2ch, src=und, avg_bitrate=128kbps, metadata=0kbps, bucket_target=128.0kbps
+2025-10-05 12:03:05 [INFO] - Stream #2: 2ch, src=und, avg_bitrate=128kbps, metadata=0kbps, bucket_target=128.0kbps
+2025-10-05 12:03:05 [INFO] Running CQ encode: You are Ms. Servant - S01E10 - You and the Forbidden Fruit x264 AAC WEBDL-1080p VARYG -EHX.mkv
+2025-10-05 12:04:24 [INFO] π¦ Original: 1453.40 MB β Encoded: 319.20 MB (22.0% of original)
+2025-10-05 12:04:26 [INFO] Moved You are Ms. Servant - S01E10 - You and the Forbidden Fruit x264 AAC WEBDL-1080p VARYG -EHX.mkv β You are Ms. Servant - S01E10 - You and the Forbidden Fruit x264 AAC WEBDL-1080p VARYG -EHX.mkv
+2025-10-05 12:04:26 [INFO] Tracked conversion: You are Ms. Servant - S01E10 - You and the Forbidden Fruit x264 AAC WEBDL-1080p VARYG -EHX.mkv, 1453.4MB β 319.2MB (22.0%), method=CQ
+2025-10-05 12:04:27 [INFO] Deleted original and processing copy for You are Ms. Servant - S01E10 - You and the Forbidden Fruit x264 AAC WEBDL-1080p VARYG.mkv
+2025-10-05 12:04:27 [INFO] Processing: You are Ms. Servant - S01E11 - Your Prayers Are Gods' Prayers x264 AAC WEBDL-1080p VARYG.mkv
+2025-10-05 12:04:40 [INFO] Copied You are Ms. Servant - S01E11 - Your Prayers Are Gods' Prayers x264 AAC WEBDL-1080p VARYG.mkv β You are Ms. Servant - S01E11 - Your Prayers Are Gods' Prayers x264 AAC WEBDL-1080p VARYG.mkv
+2025-10-05 12:04:40 [INFO]
+π§© ENCODE SETTINGS
+ β’ Resolution: 1920x1080
+ β’ Scale Filter: lanczos
+ β’ CQ: 32
+ β’ Video Encoder: av1_nvenc (preset p1, pix_fmt p010le)
+ β’ Audio Streams:
+2025-10-05 12:04:40 [INFO] - Stream #1: 2ch, src=und, avg_bitrate=128kbps, metadata=0kbps, bucket_target=128.0kbps
+2025-10-05 12:04:40 [INFO] - Stream #2: 2ch, src=und, avg_bitrate=128kbps, metadata=0kbps, bucket_target=128.0kbps
+2025-10-05 12:04:40 [INFO] Running CQ encode: You are Ms. Servant - S01E11 - Your Prayers Are Gods' Prayers x264 AAC WEBDL-1080p VARYG -EHX.mkv
+2025-10-05 12:06:01 [INFO] π¦ Original: 1454.60 MB β Encoded: 310.35 MB (21.3% of original)
+2025-10-05 12:06:04 [INFO] Moved You are Ms. Servant - S01E11 - Your Prayers Are Gods' Prayers x264 AAC WEBDL-1080p VARYG -EHX.mkv β You are Ms. Servant - S01E11 - Your Prayers Are Gods' Prayers x264 AAC WEBDL-1080p VARYG -EHX.mkv
+2025-10-05 12:06:04 [INFO] Tracked conversion: You are Ms. Servant - S01E11 - Your Prayers Are Gods' Prayers x264 AAC WEBDL-1080p VARYG -EHX.mkv, 1454.6MB β 310.35MB (21.3%), method=CQ
+2025-10-05 12:06:04 [INFO] Deleted original and processing copy for You are Ms. Servant - S01E11 - Your Prayers Are Gods' Prayers x264 AAC WEBDL-1080p VARYG.mkv
+2025-10-05 12:06:04 [INFO] Processing: You are Ms. Servant - S01E12 - The Joyous Tidings You All Bring x264 AAC WEBDL-1080p VARYG.mkv
+2025-10-05 12:06:17 [INFO] Copied You are Ms. Servant - S01E12 - The Joyous Tidings You All Bring x264 AAC WEBDL-1080p VARYG.mkv β You are Ms. Servant - S01E12 - The Joyous Tidings You All Bring x264 AAC WEBDL-1080p VARYG.mkv
+2025-10-05 12:06:17 [INFO]
+π§© ENCODE SETTINGS
+ β’ Resolution: 1920x1080
+ β’ Scale Filter: lanczos
+ β’ CQ: 32
+ β’ Video Encoder: av1_nvenc (preset p1, pix_fmt p010le)
+ β’ Audio Streams:
+2025-10-05 12:06:17 [INFO] - Stream #1: 2ch, src=und, avg_bitrate=128kbps, metadata=0kbps, bucket_target=128.0kbps
+2025-10-05 12:06:17 [INFO] - Stream #2: 2ch, src=und, avg_bitrate=128kbps, metadata=0kbps, bucket_target=128.0kbps
+2025-10-05 12:06:17 [INFO] Running CQ encode: You are Ms. Servant - S01E12 - The Joyous Tidings You All Bring x264 AAC WEBDL-1080p VARYG -EHX.mkv
+2025-10-05 12:07:40 [INFO] π¦ Original: 1444.42 MB β Encoded: 329.28 MB (22.8% of original)
+2025-10-05 12:07:43 [INFO] Moved You are Ms. Servant - S01E12 - The Joyous Tidings You All Bring x264 AAC WEBDL-1080p VARYG -EHX.mkv β You are Ms. Servant - S01E12 - The Joyous Tidings You All Bring x264 AAC WEBDL-1080p VARYG -EHX.mkv
+2025-10-05 12:07:43 [INFO] Tracked conversion: You are Ms. Servant - S01E12 - The Joyous Tidings You All Bring x264 AAC WEBDL-1080p VARYG -EHX.mkv, 1444.42MB β 329.28MB (22.8%), method=CQ
+2025-10-05 12:07:43 [INFO] Deleted original and processing copy for You are Ms. Servant - S01E12 - The Joyous Tidings You All Bring x264 AAC WEBDL-1080p VARYG.mkv
+2025-10-05 12:33:23 [INFO] Skipping: Vikings - S03E06 - Born Again x265 AAC Bluray-1080p Silence -EHX.mkv
+2025-10-05 12:33:23 [INFO] Processing: Vikings - S03E08 - To the Gates! x265 AAC Bluray-1080p Silence.mkv
+2025-10-05 12:33:39 [INFO] Copied Vikings - S03E08 - To the Gates! x265 AAC Bluray-1080p Silence.mkv β Vikings - S03E08 - To the Gates! x265 AAC Bluray-1080p Silence.mkv
+2025-10-05 12:33:39 [INFO]
+π§© ENCODE SETTINGS
+ β’ Resolution: 1920x1080
+ β’ Scale Filter: bicubic
+ β’ CQ: 28
+ β’ Video Encoder: av1_nvenc (preset p1, pix_fmt p010le)
+ β’ Audio Streams:
+2025-10-05 12:33:39 [INFO] - Stream #1: 6ch, src=und, avg_bitrate=128kbps, metadata=0kbps, bucket_target=160.0kbps
+2025-10-05 12:33:39 [INFO] Running CQ encode: Vikings - S03E08 - To the Gates! x265 AAC Bluray-1080p Silence -EHX.mkv
+2025-10-05 12:38:42 [INFO] Skipping: Vikings - S03E06 - Born Again x265 AAC Bluray-1080p Silence -EHX.mkv
+2025-10-05 12:38:42 [INFO] Processing: Vikings - S03E08 - To the Gates! x265 AAC Bluray-1080p Silence.mkv
+2025-10-05 12:38:57 [INFO] Copied Vikings - S03E08 - To the Gates! x265 AAC Bluray-1080p Silence.mkv β Vikings - S03E08 - To the Gates! x265 AAC Bluray-1080p Silence.mkv
+2025-10-05 12:38:57 [INFO]
+π§© ENCODE SETTINGS
+ β’ Resolution: 1920x1080
+ β’ Scale Filter: bicubic
+ β’ CQ: 28
+ β’ Video Encoder: av1_nvenc (preset p1, pix_fmt p010le)
+ β’ Audio Streams:
+2025-10-05 12:38:57 [INFO] - Stream #1: 6ch, src=und, avg_bitrate=128kbps, metadata=0kbps, bucket_target=192.0kbps
+2025-10-05 12:38:57 [INFO] Running CQ encode: Vikings - S03E08 - To the Gates! x265 AAC Bluray-1080p Silence -EHX.mkv
+2025-10-05 12:43:01 [INFO] π¦ Original: 1812.11 MB β Encoded: 1746.19 MB (96.4% of original)
+2025-10-05 12:43:01 [WARNING] CQ encode failed target. Switching to Bitrate for remaining files.
+2025-10-05 12:43:01 [INFO]
+π§© ENCODE SETTINGS
+ β’ Resolution: 1920x1080
+ β’ Scale Filter: bicubic
+ β’ CQ: N/A
+ β’ Video Encoder: av1_nvenc (preset p1, pix_fmt p010le)
+ β’ Audio Streams:
+2025-10-05 12:43:01 [INFO] - Stream #1: 6ch, src=und, avg_bitrate=128kbps, metadata=0kbps, bucket_target=192.0kbps
+2025-10-05 12:43:01 [INFO] Running Bitrate encode: Vikings - S03E08 - To the Gates! x265 AAC Bluray-1080p Silence -EHX.mkv
+2025-10-05 12:47:05 [INFO] π¦ Original: 1812.11 MB β Encoded: 609.28 MB (33.6% of original)
+2025-10-05 12:47:10 [INFO] Moved Vikings - S03E08 - To the Gates! x265 AAC Bluray-1080p Silence -EHX.mkv β Vikings - S03E08 - To the Gates! x265 AAC Bluray-1080p Silence -EHX.mkv
+2025-10-05 12:47:10 [INFO] Tracked conversion: Vikings - S03E08 - To the Gates! x265 AAC Bluray-1080p Silence -EHX.mkv, 1812.11MB β 609.28MB (33.6%), method=CQ
+2025-10-05 12:47:11 [INFO] Deleted original and processing copy for Vikings - S03E08 - To the Gates! x265 AAC Bluray-1080p Silence.mkv
+2025-10-05 12:47:11 [INFO] Skipping: Vikings - S03E02 - The Wanderer x265 AAC Bluray-1080p Silence -EHX.mkv
+2025-10-05 12:47:11 [INFO] Skipping: Vikings - S03E03 - Warrior's Fate x265 AAC Bluray-1080p Silence -EHX.mkv
+2025-10-05 12:47:11 [INFO] Skipping: Vikings - S03E04 - Scarred x265 AAC Bluray-1080p Silence -EHX.mkv
+2025-10-05 12:47:11 [INFO] Skipping: Vikings - S03E05 - The Usurper x265 AAC Bluray-1080p Silence -EHX.mkv
+2025-10-05 12:47:11 [INFO] Skipping: Vikings - S03E09 - Breaking Point x265 AAC Bluray-1080p Silence -EHX.mkv
+2025-10-05 12:47:11 [INFO] Skipping: Vikings - S03E07 - Paris x265 AAC Bluray-1080p Silence -EHX.mkv
+2025-10-05 12:47:11 [INFO] Skipping: Vikings - S03E10 - The Dead x265 AAC Bluray-1080p Silence -EHX.mkv
+2025-10-05 12:47:11 [INFO] Skipping: Vikings - S03E01 - Mercenary x265 AAC Bluray-1080p Silence -EHX.mkv
diff --git a/main.py b/main.py
index 1ee4fbd..f016119 100644
--- a/main.py
+++ b/main.py
@@ -1,11 +1,31 @@
#!/usr/bin/env python3
import argparse
+import csv
import json
+import os
import shutil
import subprocess
from pathlib import Path
from core.config_helper import load_config_xml
+from core.logger_helper import setup_logger
+
+# =============================
+# Setup logger
+# =============================
+LOG_FOLDER = Path(__file__).parent / "logs"
+logger = setup_logger(LOG_FOLDER)
+
+# =============================
+# Tracker CSV
+# =============================
+TRACKER_FILE = Path(__file__).parent / "conversion_tracker.csv"
+if not TRACKER_FILE.exists():
+ with open(TRACKER_FILE, "w", newline="", encoding="utf-8") as f:
+ writer = csv.writer(f)
+ writer.writerow([
+ "type","show","filename","original_size_MB","processed_size_MB","percentage","method"
+ ])
# =============================
# AUDIO BUCKET LOGIC
@@ -25,15 +45,22 @@ def choose_audio_bitrate(channels: int, bitrate_kbps: int, audio_config: dict) -
return audio_config["multi_channel"]["high"]
# =============================
-# AUDIO STREAM DETECTION
+# PATH NORMALIZATION
+# =============================
+def normalize_path_for_service(local_path: str, path_mappings: dict) -> str:
+ for win_path, linux_path in path_mappings.items():
+ if local_path.lower().startswith(win_path.lower()):
+ return local_path.replace(win_path, linux_path).replace("\\", "/")
+ return local_path.replace("\\", "/")
+
+# =============================
+# AUDIO STREAMS DETECTION
# =============================
def get_audio_streams(input_file: Path):
cmd = [
- "ffprobe", "-v", "error",
- "-select_streams", "a",
- "-show_entries", "stream=index,channels,bit_rate",
- "-of", "json",
- str(input_file)
+ "ffprobe","-v","error","-select_streams","a",
+ "-show_entries","stream=index,channels,duration,bit_rate,tags=language",
+ "-of","json", str(input_file)
]
result = subprocess.run(cmd, capture_output=True, text=True)
data = json.loads(result.stdout)
@@ -41,148 +68,214 @@ def get_audio_streams(input_file: Path):
for s in data.get("streams", []):
index = s["index"]
channels = s.get("channels", 2)
- bitrate = int(int(s.get("bit_rate", 128000)) / 1000)
- streams.append((index, channels, bitrate))
+ src_lang = s.get("tags", {}).get("language", "und")
+ bit_rate_meta = int(s.get("bit_rate", 0)) if s.get("bit_rate") else 0
+ try:
+ duration = float(s.get("duration", 0))
+ if duration and bit_rate_meta == 0:
+ fmt_cmd = [
+ "ffprobe","-v","error","-show_entries","format=size,duration",
+ "-of","json", str(input_file)
+ ]
+ fmt_result = subprocess.run(fmt_cmd, capture_output=True, text=True)
+ fmt_data = json.loads(fmt_result.stdout)
+ size_bytes = int(fmt_data.get("format", {}).get("size", 0))
+ total_duration = float(fmt_data.get("format", {}).get("duration", duration))
+ n_streams = len(data.get("streams", []))
+ avg_bitrate_kbps = int((size_bytes*8/n_streams)/total_duration/1000)
+ elif duration and bit_rate_meta:
+ avg_bitrate_kbps = int(bit_rate_meta / 1000)
+ else:
+ avg_bitrate_kbps = 128
+ except Exception:
+ avg_bitrate_kbps = 128
+ streams.append((index, channels, avg_bitrate_kbps, src_lang, int(bit_rate_meta / 1000)))
return streams
# =============================
# FFmpeg ENCODE
# =============================
def run_ffmpeg(input_file: Path, output_file: Path, cq: int, scale_width: int, scale_height: int,
- filter_flags: str, audio_config: dict, encode_config: dict):
+ filter_flags: str, audio_config: dict, method: str):
streams = get_audio_streams(input_file)
+ header = f"\nπ§© ENCODE SETTINGS\n β’ Resolution: {scale_width}x{scale_height}\n β’ Scale Filter: {filter_flags}\n β’ CQ: {cq if method=='CQ' else 'N/A'}\n β’ Video Encoder: av1_nvenc (preset p1, pix_fmt p010le)\n β’ Audio Streams:"
+ logger.info(header)
+ print(" ")
+ # print(header)
- print("\nπ§© ENCODE SETTINGS")
- print(f" β’ Resolution: {scale_width}x{scale_height}")
- print(f" β’ Scale Filter: {filter_flags}")
- print(f" β’ CQ: {cq}")
- print(f" β’ Video Encoder: av1_nvenc (preset p1, pix_fmt p010le)")
+ for (index, channels, avg_bitrate, src_lang, meta_bitrate) in streams:
+ br = choose_audio_bitrate(channels, avg_bitrate, audio_config)
+ line = f" - Stream #{index}: {channels}ch, src={src_lang}, avg_bitrate={avg_bitrate}kbps, metadata={meta_bitrate}kbps, bucket_target={br/1000:.1f}kbps"
+ print(line)
+ logger.info(line)
- print(" β’ Audio Streams:")
- for (index, channels, bitrate) in streams:
- br = choose_audio_bitrate(channels, bitrate, audio_config)
- print(f" - Stream #{index}: {channels}ch, origβ{bitrate}kbps β target {br/1000:.1f}kbps")
+ cmd = ["ffmpeg","-y","-i",str(input_file),
+ "-vf",f"scale={scale_width}:{scale_height}:flags={filter_flags}:force_original_aspect_ratio=decrease",
+ "-map","0:v","-map","0:a","-map","0:s?",
+ "-c:v","av1_nvenc","-preset","p1","-pix_fmt","p010le"]
- # Build CQ encode command
- cmd = [
- "ffmpeg", "-y", "-i", str(input_file),
- "-vf", f"scale={scale_width}:{scale_height}:flags={filter_flags}:force_original_aspect_ratio=decrease",
- "-map", "0:v", "-map", "0:a", "-map", "0:s?",
- "-c:v", "av1_nvenc", "-preset", "p1", "-cq", str(cq), "-pix_fmt", "p010le"
- ]
- for i, (index, channels, bitrate) in enumerate(streams):
- br = choose_audio_bitrate(channels, bitrate, audio_config)
- cmd += [f"-c:a:{i}", "aac", f"-b:a:{i}", str(br), f"-ac:{i}", str(channels)]
+ if method=="CQ":
+ cmd += ["-cq", str(cq)]
+ else:
+ if scale_height>=1080:
+ vb, maxrate, bufsize = "1500k","1750k","2250k"
+ else:
+ vb, maxrate, bufsize = "900k","1250k","1600k"
+ cmd += ["-b:v",vb,"-maxrate",maxrate,"-bufsize",bufsize]
+
+ for i, (index, channels, avg_bitrate, src_lang, meta_bitrate) in enumerate(streams):
+ br = choose_audio_bitrate(channels, avg_bitrate, audio_config)
+ cmd += [f"-c:a:{i}","aac",f"-b:a:{i}",str(br),f"-ac:{i}",str(channels)]
+
+ cmd += ["-c:s","copy",str(output_file)]
+
+ print(f"\n㪠Running {method} encode: {output_file.name}")
+ logger.info(f"Running {method} encode: {output_file.name}")
- cmd += ["-c:s", "copy", str(output_file)]
subprocess.run(cmd, check=True)
- # Check size reduction
orig_size = input_file.stat().st_size
out_size = output_file.stat().st_size
reduction_ratio = out_size / orig_size
- print(f"π¦ Original: {orig_size/1e6:.2f} MB β Encoded: {out_size/1e6:.2f} MB ({reduction_ratio:.1%} of original)")
+ msg = f"π¦ Original: {orig_size/1e6:.2f} MB β Encoded: {out_size/1e6:.2f} MB ({reduction_ratio:.1%} of original)"
+ print(msg)
+ logger.info(msg)
- # Fallback if too large
- if reduction_ratio >= 0.5:
- print(f"β οΈ Size reduction insufficient ({reduction_ratio:.0%}). Retrying with bitrate-based encode...")
- output_file.unlink(missing_ok=True)
-
- if scale_height >= 1080:
- vb, maxrate, bufsize = encode_config["fallback"]["bitrate_1080"], encode_config["fallback"]["maxrate_1080"], encode_config["fallback"]["bufsize_1080"]
- else:
- vb, maxrate, bufsize = encode_config["fallback"]["bitrate_720"], encode_config["fallback"]["maxrate_720"], encode_config["fallback"]["bufsize_720"]
-
- cmd = [
- "ffmpeg", "-y", "-i", str(input_file),
- "-vf", f"scale={scale_width}:{scale_height}:flags={filter_flags}:force_original_aspect_ratio=decrease",
- "-map", "0:v", "-map", "0:a", "-map", "0:s?",
- "-c:v", "av1_nvenc", "-preset", "p1",
- "-b:v", vb, "-maxrate", maxrate, "-bufsize", bufsize,
- "-pix_fmt", "p010le"
- ]
- for i, (index, channels, bitrate) in enumerate(streams):
- br = choose_audio_bitrate(channels, bitrate, audio_config)
- cmd += [f"-c:a:{i}", "aac", f"-b:a:{i}", str(br), f"-ac:{i}", str(channels)]
- cmd += ["-c:s", "copy", str(output_file)]
- subprocess.run(cmd, check=True)
+ return orig_size, out_size, reduction_ratio
# =============================
# PROCESS FOLDER
# =============================
-def process_folder(folder: Path, cq: int, resolution: str, processing_folder: Path, config: dict):
+def process_folder(folder: Path, cq: int, resolution: str, config: dict):
if not folder.exists():
print(f"β Folder not found: {folder}")
+ logger.error(f"Folder not found: {folder}")
return
- filter_flags_default = config["encode"]["filters"]["default"]
- filter_flags_tv = config["encode"]["filters"]["tv"]
-
+ audio_config = config["audio"]
+ filters_config = config["encode"]["filters"]
+ suffix = config["suffix"]
+ extensions = config["extensions"]
+ res_height = 1080 if resolution=="1080" else 720
+ res_width = 1920 if resolution=="1080" else 1280
+ filter_flags = filters_config.get("default","lanczos")
folder_lower = str(folder).lower()
if "\\tv\\" in folder_lower or "/tv/" in folder_lower:
- filter_flags = filter_flags_tv
- cq_default_key = f"tv_{resolution}"
+ filter_flags = filters_config.get("tv","bicubic")
+ cq_default = config["encode"]["cq"].get(f"tv_{resolution}",32)
else:
- filter_flags = filter_flags_default
- cq_default_key = f"movie_{resolution}"
-
+ cq_default = config["encode"]["cq"].get(f"movie_{resolution}",32)
if cq is None:
- cq = config["encode"]["cq"][cq_default_key]
-
- res_height = 1080 if resolution == "1080" else 720
- res_width = 1920 if resolution == "1080" else 1280
+ cq = cq_default
+ processing_folder = Path(config["processing_folder"])
processing_folder.mkdir(parents=True, exist_ok=True)
+ # Track if we switch to bitrate mode
+ use_bitrate = False
+
for file in folder.rglob("*"):
- if file.suffix.lower() not in config["extensions"]:
+ if file.suffix.lower() not in extensions:
continue
- if any(tag in file.name.lower() for tag in ["ehx", "megusta"]):
+ if any(tag.lower() in file.name.lower() for tag in ["ehx","megusta"]):
print(f"βοΈ Skipping: {file.name}")
+ logger.info(f"Skipping: {file.name}")
continue
print("="*60)
+ logger.info(f"Processing: {file.name}")
print(f"π Processing: {file.name}")
temp_input = processing_folder / file.name
shutil.copy2(file, temp_input)
- temp_output = processing_folder / f"{file.stem}{config['suffix']}{file.suffix}"
+ logger.info(f"Copied {file.name} β {temp_input.name}")
+ temp_output = processing_folder / f"{file.stem}{suffix}{file.suffix}"
- run_ffmpeg(temp_input, temp_output, cq, res_width, res_height, filter_flags,
- config["audio"], config["encode"])
+ method = "Bitrate" if use_bitrate else "CQ"
+ try:
+ orig_size, out_size, reduction_ratio = run_ffmpeg(temp_input, temp_output, cq, res_width, res_height, filter_flags, audio_config, method)
+ except subprocess.CalledProcessError as e:
+ print(f"β FFmpeg failed: {e}")
+ logger.error(f"FFmpeg failed: {e}")
+ temp_input.unlink(missing_ok=True)
+ break
+
+ if method=="CQ" and reduction_ratio>=0.5:
+ print(f"β οΈ CQ encode did not achieve target size. Switching all remaining files to Bitrate.")
+ logger.warning("CQ encode failed target. Switching to Bitrate for remaining files.")
+ use_bitrate = True
+ try:
+ # Retry current file using bitrate
+ temp_output.unlink(missing_ok=True)
+ orig_size, out_size, reduction_ratio = run_ffmpeg(temp_input, temp_output, cq, res_width, res_height, filter_flags, audio_config, "Bitrate")
+ if reduction_ratio>=0.5:
+ print("β Bitrate encode also failed target. Stopping process.")
+ logger.error("Bitrate encode failed target. Stopping process.")
+ temp_input.unlink(missing_ok=True)
+ break
+ except subprocess.CalledProcessError as e:
+ print(f"β Bitrate retry failed: {e}")
+ logger.error(f"Bitrate retry failed: {e}")
+ temp_input.unlink(missing_ok=True)
+ break
+ elif method=="Bitrate" and reduction_ratio>=0.5:
+ print("β Bitrate encode failed target. Stopping process.")
+ logger.error("Bitrate encode failed target. Stopping process.")
+ temp_input.unlink(missing_ok=True)
+ break
dest_file = file.parent / temp_output.name
shutil.move(temp_output, dest_file)
print(f"π Moved {temp_output.name} β {dest_file.name}")
+ logger.info(f"Moved {temp_output.name} β {dest_file.name}")
- # Cleanup
- if dest_file.exists():
- try:
- temp_input.unlink()
- file.unlink()
- print(f"π§Ή Deleted original and processing copy")
- except Exception as e:
- print(f"β οΈ Could not delete files: {e}")
+ folder_parts = [p.lower() for p in folder.parts]
+ if "tv" in folder_parts:
+ f_type = "tv"
+ tv_index = folder_parts.index("tv")
+ show = folder.parts[tv_index + 1] if len(folder.parts) > tv_index + 1 else "Unknown"
+ elif "anime" in folder_parts:
+ f_type = "anime"
+ anime_index = folder_parts.index("anime")
+ show = folder.parts[anime_index + 1] if len(folder.parts) > anime_index + 1 else "Unknown"
+ else:
+ f_type = "movie"
+ show = "N/A"
+
+ orig_size_mb = round(orig_size / 1e6, 2)
+ proc_size_mb = round(out_size / 1e6, 2)
+ percentage = round(proc_size_mb / orig_size_mb * 100, 1)
+
+ with open(TRACKER_FILE, "a", newline="", encoding="utf-8") as f:
+ writer = csv.writer(f)
+ writer.writerow([f_type, show, dest_file.name, orig_size_mb, proc_size_mb, percentage, method])
+
+ logger.info(f"Tracked conversion: {dest_file.name}, {orig_size_mb}MB β {proc_size_mb}MB ({percentage}%), method={method}")
+ print(f"π Logged conversion: {dest_file.name} ({percentage}%), method={method}")
+
+ try:
+ temp_input.unlink()
+ file.unlink()
+ logger.info(f"Deleted original and processing copy for {file.name}")
+ except Exception as e:
+ print(f"β οΈ Could not delete files: {e}")
+ logger.warning(f"Could not delete files: {e}")
# =============================
# MAIN
# =============================
def main():
- parser = argparse.ArgumentParser(description="Batch encode videos")
+ parser = argparse.ArgumentParser(description="Batch encode videos with logging and tracker")
parser.add_argument("folder", help="Path to folder containing videos")
parser.add_argument("--cq", type=int, help="Override default CQ")
- parser.add_argument("--r", "--resolution", dest="resolution", choices=["720","1080"], help="Target resolution (720 or 1080)")
- parser.add_argument("--processing", type=str, help="Processing folder")
+ parser.add_argument("--r", "--resolution", dest="resolution", default="1080", choices=["720","1080"], help="Target resolution")
args = parser.parse_args()
config_path = Path(__file__).parent / "config.xml"
config = load_config_xml(config_path)
- cq = args.cq if args.cq is not None else None
- resolution = args.resolution if args.resolution else "1080"
- processing_folder = Path(args.processing) if args.processing else Path(config["processing_folder"])
+ process_folder(Path(args.folder), args.cq, args.resolution, config)
- process_folder(Path(args.folder), cq, resolution, processing_folder, config)
if __name__ == "__main__":
main()