19 lines
622 B
Python
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")
|