forked from allejok96/jw-scripts
-
Notifications
You must be signed in to change notification settings - Fork 1
/
jw-signs
53 lines (43 loc) · 1.56 KB
/
jw-signs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#!/usr/bin/env python3
import argparse
import sys
from jwlib.arguments import add_arguments
from signs.parse import JWSigns
parser = argparse.ArgumentParser(prog='jw-signs',
usage='%(prog)s [INPUT] [options] [DIR]',
description='Split videos Bible jw.org sign language')
add_arguments(parser, ['--quiet'])
parser.add_argument('input',
metavar='INPUT DIR',
help='input directory of file or folder')
parser.add_argument('--book',
default='0',
help='comma separated list of booknums')
parser.add_argument('--chapter',
default='0',
help='comma separated list of chapters')
parser.add_argument('--hwaccel',
action='store_true',
help='hardware acceleration nvidia')
parser.add_argument('--hevc',
action='store_true',
help='High Efficiency Video Coding also known as H.265')
parser.add_argument('work_dir',
metavar='OUTPUT DIR',
help='directory to save data in')
parser.add_argument('--raw',
action='store_true',
help='split videos without name parsing mark chapters')
jw = JWSigns()
parser.parse_args(namespace=jw)
try:
if jw.raw:
r = jw.raw_parse()
else:
r = jw.parse()
jw.cook(r)
except KeyboardInterrupt:
if hasattr(jw, 'finished_event'):
jw.finished_event.set()
print('\n\nCancelled')
exit(1)