Compare commits
No commits in common. "657a1dd2341858296bdf6447ce166e6927937c3a" and "b9ac80398ce9bc1ad61b4ecd2524f39daccf78b0" have entirely different histories.
657a1dd234
...
b9ac80398c
2 changed files with 11 additions and 3 deletions
|
|
@ -13,7 +13,14 @@ import numpy as np
|
||||||
import ox
|
import ox
|
||||||
|
|
||||||
|
|
||||||
FFMPEG = 'ffmpeg'
|
FFMPEG = None
|
||||||
|
for cmd in ('ffmpeg', 'avconv'):
|
||||||
|
cmd = ox.file.cmd(cmd)
|
||||||
|
if subprocess.call(['which', cmd], stdout=subprocess.PIPE) == 0:
|
||||||
|
FFMPEG = cmd
|
||||||
|
break
|
||||||
|
if not FFMPEG:
|
||||||
|
print("could not find ffmpeg, make sure its installed and available in PATH")
|
||||||
FPS = 25
|
FPS = 25
|
||||||
|
|
||||||
class Video(object):
|
class Video(object):
|
||||||
|
|
|
||||||
|
|
@ -44,9 +44,10 @@ class Timelines():
|
||||||
self.render_slitscan = 'slitscan' in modes
|
self.render_slitscan = 'slitscan' in modes
|
||||||
if 'multiline' in modes:
|
if 'multiline' in modes:
|
||||||
info = ox.avinfo(video_files[0])
|
info = ox.avinfo(video_files[0])
|
||||||
|
self.render_multiline = info['video'][0]['width']
|
||||||
self.output_h = sizes[0]
|
self.output_h = sizes[0]
|
||||||
sizes = [info['video'][0]['height']] + sizes[1:]
|
sizes = [info['video'][0]['height']] + sizes[1:]
|
||||||
self.render_multiline = info['video'][0]['width']
|
self.render_multiline = True
|
||||||
self._pool = ThreadPool(multiprocessing.cpu_count())
|
self._pool = ThreadPool(multiprocessing.cpu_count())
|
||||||
else:
|
else:
|
||||||
self.render_multiline = False
|
self.render_multiline = False
|
||||||
|
|
@ -459,7 +460,7 @@ class Timelines():
|
||||||
self.tile_path, line, 'slitscan', self.output_h, index, type
|
self.tile_path, line, 'slitscan', self.output_h, index, type
|
||||||
)
|
)
|
||||||
ox.makedirs(os.path.dirname(tile_file))
|
ox.makedirs(os.path.dirname(tile_file))
|
||||||
width = self.large_tile_image[mode][line].size[0]
|
width = self.large_tile_image[mode][line].size[1]
|
||||||
img = self.large_tile_image[mode][line]
|
img = self.large_tile_image[mode][line]
|
||||||
if self.output_h != self.large_tile_image[mode][line].size[0]:
|
if self.output_h != self.large_tile_image[mode][line].size[0]:
|
||||||
img = img.resize((width, self.output_h), Image.BICUBIC)
|
img = img.resize((width, self.output_h), Image.BICUBIC)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue