forked from kieranjol/IFIscripts
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathseq.py
More file actions
executable file
·27 lines (24 loc) · 739 Bytes
/
seq.py
File metadata and controls
executable file
·27 lines (24 loc) · 739 Bytes
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
#!/usr/bin/env python
import subprocess
import sys
import os
from glob import glob
source_directory = sys.argv[1]
os.chdir(source_directory)
images = (
glob('*.tif') +
glob('*.tiff') +
glob('*.dpx')
)
numberless_filename = images[0].split("_")[0:-1]
ffmpeg_friendly_name = ''
counter = 0
while counter <len(numberless_filename) :
ffmpeg_friendly_name += numberless_filename[counter] + '_'
counter += 1
dirname = os.path.dirname(source_directory)
output = dirname + '/%s_consolidate.mov' % os.path.split(source_directory)[-1]
ffmpeg_friendly_name += '%06d.tiff'
cmd = ['ffmpeg','-f','image2','-framerate','24', '-i', ffmpeg_friendly_name,'-c:v','v210',output]
print cmd
subprocess.call(cmd)