From: Antonio Ospite Date: Wed, 7 Dec 2016 16:01:36 +0000 (+0100) Subject: vidi-timeline.py: set a default canvas size of 640x480 X-Git-Url: https://git.ao2.it/vidi-player.git/commitdiff_plain/a2244f398d67ed5d9e82e99f851a3f7d91f3c7b9?ds=sidebyside vidi-timeline.py: set a default canvas size of 640x480 --- diff --git a/vidi-timeline.py b/vidi-timeline.py index 07639e6..7e58863 100755 --- a/vidi-timeline.py +++ b/vidi-timeline.py @@ -28,10 +28,11 @@ ADD_TITLE = True TITLE_TEXT = None TITLE_DURATION = 5 TITLE_CREDITS = "Created with vidi-timeline\nhttps://git.ao2.it/vidi-player.git" +CANVAS_SIZE = (640, 480) -def timeline_from_midi(midi_file, video_font_path): - timeline = vidi.Timeline() +def timeline_from_midi(midi_file, canvas_size, video_font_path): + timeline = vidi.Timeline(canvas_size) if ADD_TITLE: title = TITLE_TEXT @@ -99,7 +100,7 @@ def main(): video_font_path = os.path.realpath(sys.argv[2]) - timeline = timeline_from_midi(midi_file, video_font_path) + timeline = timeline_from_midi(midi_file, CANVAS_SIZE, video_font_path) if len(sys.argv) > 3: timeline.save(sys.argv[3])