Files
anime_dub_sync/mkv/check_intro_outro.py
2026-03-20 00:46:36 +01:00

19 lines
622 B
Python

import sys
import os
from pathlib import Path
from mkv import check_intro_outro_sync
if __name__ == '__main__':
if len(sys.argv) == 2:
if os.path.isfile(sys.argv[1]):
boolean, floater, stream = check_intro_outro_sync(Path(sys.argv[1]))
if boolean:
print("Video is syncable!")
print(f"With offset of {floater} at audio_stream {stream}")
else:
print("Video is not syncable!")
else:
raise FileExistsError(f"File does not exists: {sys.argv[1]}")
else:
print("python check_intro.py /path/to/file")