Permalink
Browse files

clean videos

  • Loading branch information...
sdpython committed Jan 20, 2018
1 parent 60eba01 commit 0c4c07f6f8cfd0726815a938e204c4d30e021ca0
@@ -68,7 +68,7 @@ def test_video_audio_bug(self):
exp = os.path.join(temp, "courte2x.mp4")
video_save(vid4, exp)
self.assertExists(exp)
clean_video(vid4)
clean_video([vid4, vid2, vid3])
if __name__ == "__main__":
@@ -46,7 +46,7 @@
from pyquickhelper.loghelper import fLOG
from pyquickhelper.pycode import get_temp_folder, ExtTestCase
from src.code_beatrix.art.video import video_save, video_modification, clean_video
from src.code_beatrix.art.video import video_save, video_modification, clean_video, video_load
class TestVideoModif(ExtTestCase):
@@ -57,12 +57,12 @@ def test_modify_avideo(self):
self._testMethodName,
OutputPrint=__name__ == "__main__")
temp = get_temp_folder(__file__, "temp_video_modification")
vid = os.path.join(temp, '..', 'data', 'videxa.mp4')
vid = video_load(os.path.join(temp, '..', 'data', 'videxa.mp4'))
vid2 = video_modification(vid, speed=2., mirrory=True, mirrorx=True)
exp = os.path.join(temp, "courte2x.mp4")
video_save(vid2, exp)
self.assertExists(exp)
clean_video(vid2)
clean_video([vid2, vid])
if __name__ == "__main__":
@@ -46,7 +46,7 @@
from pyquickhelper.loghelper import fLOG
from pyquickhelper.pycode import get_temp_folder, ExtTestCase
from src.code_beatrix.art.video import video_save, video_compose, clean_video
from src.code_beatrix.art.video import video_save, video_compose, clean_video, video_load
class TestVideoPlacement(ExtTestCase):
@@ -57,23 +57,25 @@ def test_modify_placement(self):
self._testMethodName,
OutputPrint=__name__ == "__main__")
temp = get_temp_folder(__file__, "temp_video_placement")
vid = os.path.join(temp, '..', 'data', 'videxa.mp4')
vid = video_load(os.path.join(temp, '..', 'data', 'videxa.mp4'))
vid2 = video_compose(vid, vid, t2=1, place='h2')
exp = os.path.join(temp, "h2.mp4")
video_save(vid2, exp)
self.assertExists(exp)
clean_video(vid2)
vid2 = video_compose(vid, vid, t2=1, place='v2')
exp = os.path.join(temp, "v2.mp4")
video_save(vid2, exp)
self.assertExists(exp)
clean_video(vid2)
vid2 = video_compose(vid, vid, t2=1, place='br', zoom=0.2)
exp = os.path.join(temp, "br.mp4")
video_save(vid2, exp)
self.assertExists(exp)
clean_video(vid2)
clean_video([vid2, vid])
if __name__ == "__main__":
@@ -92,8 +92,7 @@ def test_video_text_image(self):
video_save(comb, exp2, fps=20, duration=5)
self.assertExists(exp1)
self.assertExists(exp2)
clean_video(text)
clean_video(comb)
clean_video([text, comb, vidimg])
if __name__ == "__main__":

0 comments on commit 0c4c07f

Please sign in to comment.