Compare commits

...

2 Commits

Author SHA1 Message Date
j 657a1dd234 only use ffmpeg 2021-11-21 23:17:34 +01:00
j f3771f1b56 fix multiline mode 2021-08-16 18:26:09 +02:00
2 changed files with 3 additions and 11 deletions

View File

@ -13,14 +13,7 @@ import numpy as np
import ox
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")
FFMPEG = 'ffmpeg'
FPS = 25
class Video(object):

View File

@ -44,10 +44,9 @@ class Timelines():
self.render_slitscan = 'slitscan' in modes
if 'multiline' in modes:
info = ox.avinfo(video_files[0])
self.render_multiline = info['video'][0]['width']
self.output_h = sizes[0]
sizes = [info['video'][0]['height']] + sizes[1:]
self.render_multiline = True
self.render_multiline = info['video'][0]['width']
self._pool = ThreadPool(multiprocessing.cpu_count())
else:
self.render_multiline = False
@ -460,7 +459,7 @@ class Timelines():
self.tile_path, line, 'slitscan', self.output_h, index, type
)
ox.makedirs(os.path.dirname(tile_file))
width = self.large_tile_image[mode][line].size[1]
width = self.large_tile_image[mode][line].size[0]
img = self.large_tile_image[mode][line]
if self.output_h != self.large_tile_image[mode][line].size[0]:
img = img.resize((width, self.output_h), Image.BICUBIC)