From eedba1eea9ebabd5ea6e9e424a273cb870325aef Mon Sep 17 00:00:00 2001 From: Douglas Bagnall Date: Tue, 1 Mar 2011 11:24:29 +1300 Subject: [PATCH] more nhew scripts; final one is nhew-4 --- test/nhew-4.py | 36 ++++++++++++++++++++++++++++++++++++ test/nhew-shrink.py | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 70 insertions(+) create mode 100755 test/nhew-4.py create mode 100755 test/nhew-shrink.py diff --git a/test/nhew-4.py b/test/nhew-4.py new file mode 100755 index 0000000..b4eaac7 --- /dev/null +++ b/test/nhew-4.py @@ -0,0 +1,36 @@ +#!/usr/bin/python + +import sys, os + +OPO_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) +#test/opo_launcher is a symlink to ../opo-launcher +import opo_launcher + +try: + codec = sys.argv[1] +except IndexError: + codec = 'mpeg4' +try: + muxer = sys.argv[2] +except IndexError: + muxer = 'avi' + +#SCALE = 3.0 / 4.0 +SCALE = 7.0 / 8.0 + + +filename = '%s/stitched_video/nhew2-512-%s-%s.%s' % (OPO_DIR, int(SCALE * 100), codec, muxer) + +INPUT_VIDEOS = [ + OPO_DIR + '/unstitched_video/Charmaine 28th.mov', + OPO_DIR + '/unstitched_video/Julia resize 4 28th.mov', + OPO_DIR + '/unstitched_video/mum really finished.mov', + OPO_DIR + '/unstitched_video/luisa resize 4 28th.mov', + ] + +#p = opo_launcher.start_stitching_process('/tmp/test.avi', INPUT_VIDEOS[:4], 352, 288) +p = opo_launcher.start_stitching_process(filename, INPUT_VIDEOS, 512, 384, 2, + encoder=codec, muxer=muxer, scale=SCALE, + clip_top=0, audio_codec='mp2') + +print p.communicate() diff --git a/test/nhew-shrink.py b/test/nhew-shrink.py new file mode 100755 index 0000000..9bfe1d4 --- /dev/null +++ b/test/nhew-shrink.py @@ -0,0 +1,34 @@ +#!/usr/bin/python + +import sys, os + +OPO_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) +#test/opo_launcher is a symlink to ../opo-launcher +import opo_launcher + +try: + codec = sys.argv[1] +except IndexError: + codec = 'mpeg4' +try: + muxer = sys.argv[2] +except IndexError: + muxer = 'avi' + + + +filename = '%s/stitched_video/nhew-512-%s.%s' % (OPO_DIR, codec, muxer) + +INPUT_VIDEOS = [ + OPO_DIR + '/unstitched_video/Charmaine.mov', + OPO_DIR + '/unstitched_video/Julia-ready-for-view.mov', + OPO_DIR + '/unstitched_video/Julie-ready-to-view-wif-sound.mov', + OPO_DIR + '/unstitched_video/Luisa.mov', + ] + +#p = opo_launcher.start_stitching_process('/tmp/test.avi', INPUT_VIDEOS[:4], 352, 288) +p = opo_launcher.start_stitching_process(filename, INPUT_VIDEOS, 512, 384, 2, + encoder=codec, muxer=muxer, scale=1.0, + clip_top=0, audio_codec='mp2') + +print p.communicate() -- 2.11.4.GIT