-
Notifications
You must be signed in to change notification settings - Fork 34
/
Copy pathloopline.py
executable file
·34 lines (31 loc) · 989 Bytes
/
loopline.py
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
#!/usr/bin/env python
import sys
import os
import subprocess
import makeffv1
import dvsip
from ififuncs import get_mediainfo
def main():
video_files, csv_report_filename = makeffv1.get_input()
dv_files = dvsip.get_input()
all_files = video_files + dv_files
if os.path.isdir(sys.argv[1]):
output = sys.argv[1]
elif os.path.isfile(sys.argv[1]):
output = os.path.dirname(sys.argv[1])
proxies_dir = os.path.join(output, 'proxies')
if not os.path.isdir(proxies_dir):
os.makedirs(proxies_dir)
for video in all_files:
subprocess.check_call(
[sys.executable, os.path.expanduser("~/ifigit/ifiscripts/bitc.py"),
'-clean','-yadif',
'-crf','20',
os.path.join(output,video),
'-o', proxies_dir]
)
makeffv1.make_ffv1(video_files, csv_report_filename)
dvsip.make_sip(dv_files)
print 'Proxies sent to %s' % proxies_dir
if __name__ == '__main__':
main()