def apply_effect(self, start=None, length=None, effect=None): if effect is None: raise original_filename = os.path.join(settings.MEDIA_ROOT, self.video.name) if start is None and length is None: new_filename = effect(original_filename) else: new_filename = effects.apply_effect(original_filename, start, length, effect) self.video.save(os.path.basename(new_filename), File(file(new_filename))) os.unlink(new_filename)
def test_apply_slomo_effect(self): new_filename = effects.apply_effect( effects.flip_180(movie_path('flipped')), "00:00:05", "00:00:04", effect=effects.slow_motion) return new_filename
def test_apply_effect(self): # basically a NOP, slight timing change due to ffmpeg new_filename = effects.apply_effect( movie_path('testdata'), "00:00:00", "00:00:05") return new_filename