def which_method(self, config): if config['compress']['type'] == "ffmpeg": return ffmpeg.FFmpeg(config['debug'], config['silent']) else: return handbrake.HandBrake(config['debug'], config['compress']['compressionPath'], config['silent'])
def __init__(self, path, temp=os.getcwd() + '/data/tmpcsv/', path2script='C:/R/spectr.R'): self.path = path self.temp = os.getcwd() + temp self.path2script = path2script self.ff = ffmpeg.FFmpeg(self.path)
def test_cut_no_duration(self): filename = self.video_name output = 'test.opus' start = '00:10:20' ff = ffmpeg.FFmpeg() ret = ff.extract(filename, start, None, output) self.assertEqual(ret.returncode, 0) os.remove(output)