Compare commits
4
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
525b9d4dc6 | ||
|
|
3e81425f84 | ||
|
|
1d73c869da | ||
|
|
e00fa1ca80 |
No files matched your search
@@ -223,7 +223,7 @@ def process_one(German_Video: Path, Quality_Video: Path, output_dir: Path, offse
|
|||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
output_dir = "/home/honney/mount/Media/tmp/serien/ready/Classroom of the Elite/Season 01"
|
output_dir = "./output_dir"
|
||||||
if not os.path.isdir(output_dir):
|
if not os.path.isdir(output_dir):
|
||||||
raise NotADirectoryError(f"Output directory is not a valid Directory: {output_dir}")
|
raise NotADirectoryError(f"Output directory is not a valid Directory: {output_dir}")
|
||||||
start_num = 2
|
start_num = 2
|
||||||
@@ -236,12 +236,12 @@ def main():
|
|||||||
for i in tqdm(episodes, desc="Episodes"):
|
for i in tqdm(episodes, desc="Episodes"):
|
||||||
# i =1
|
# i =1
|
||||||
# if i:
|
# if i:
|
||||||
german_pattern = f"/home/honney/mount/Media/tmp/serien/ger_low_quality/Classroom of the Elite (2017-2024) [imdbid-tt7263328]/Season 01/Classroom of the Elite S01E0{i:02}.mkv"
|
german_pattern = f"./dubbed_source/Season 01/Example Series S01E{i:02}.mkv"
|
||||||
if os.path.isfile(german_pattern):
|
if os.path.isfile(german_pattern):
|
||||||
German_Video = [german_pattern]
|
German_Video = [german_pattern]
|
||||||
else:
|
else:
|
||||||
German_Video = glob.glob(german_pattern)
|
German_Video = glob.glob(german_pattern)
|
||||||
quality_pattern = f"/home/honney/mount/Media/tmp/serien/high_quality/Classroom of the Elite/S01/E{i:02}*"
|
quality_pattern = f"./high_quality/S01/E{i:02}*"
|
||||||
if os.path.isfile(quality_pattern):
|
if os.path.isfile(quality_pattern):
|
||||||
Quality_Video = [quality_pattern]
|
Quality_Video = [quality_pattern]
|
||||||
else:
|
else:
|
||||||
|
|||||||
+1
-1
@@ -66,5 +66,5 @@ def get_intro_outro(file: Path, length: float = 90.0) -> List[Tuple[float, float
|
|||||||
### https://github.com/jonbarrow/open-anime-timestamps?utm_source=chatgpt.com
|
### https://github.com/jonbarrow/open-anime-timestamps?utm_source=chatgpt.com
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
file = "/home/honney/projects/mkv/output_dir/08.mkv"
|
file = "./output_dir/episode.mkv"
|
||||||
print(get_intro_outro(Path(file)))
|
print(get_intro_outro(Path(file)))
|
||||||
@@ -100,8 +100,8 @@ def corelate_videos(vid1: Path, vid2: Path, fps: float) -> float:
|
|||||||
|
|
||||||
# --- Example Usage ---
|
# --- Example Usage ---
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
video_path_1 = Path("/home/honney/projects/mkv/Maid-sama/11_org.mkv")
|
video_path_1 = Path("./examples/high_quality_episode.mkv")
|
||||||
video_path_2 = Path("/home/honney/projects/mkv/Maid-sama/11_ger.mkv")
|
video_path_2 = Path("./examples/dubbed_episode.mkv")
|
||||||
|
|
||||||
target_fps, _, _, _ = probe_video(video_path_1)
|
target_fps, _, _, _ = probe_video(video_path_1)
|
||||||
|
|
||||||
|
|||||||
@@ -81,8 +81,8 @@ if __name__ == '__main__':
|
|||||||
offset_f, offset_t = find_temporal_offset(Path(sys.argv[1]), Path(sys.argv[2]))
|
offset_f, offset_t = find_temporal_offset(Path(sys.argv[1]), Path(sys.argv[2]))
|
||||||
print(f"Offset between Videos:\n{offset_f} Frames\n{offset_t} s")
|
print(f"Offset between Videos:\n{offset_f} Frames\n{offset_t} s")
|
||||||
elif len(sys.argv) == 1:
|
elif len(sys.argv) == 1:
|
||||||
file1 = "/home/honney/projects/mkv/Maid-sama/11_org.mkv"
|
file1 = "./examples/high_quality_episode.mkv"
|
||||||
file2 = "/home/honney/projects/mkv/Maid-sama/11_ger.mkv"
|
file2 = "./examples/dubbed_episode.mkv"
|
||||||
if not os.path.isfile(file1):
|
if not os.path.isfile(file1):
|
||||||
raise ValueError(f"{file1} is not a valid file path")
|
raise ValueError(f"{file1} is not a valid file path")
|
||||||
if not os.path.isfile(file2):
|
if not os.path.isfile(file2):
|
||||||
|
|||||||
Reference in new issue
Block a user