Merge lp:~thealok/openlp/videotests into lp:openlp

Proposed by ALok
Status: Merged
Merged at revision: not available
Proposed branch: lp:~thealok/openlp/videotests
Merge into: lp:openlp
Diff against target: None lines
To merge this branch: bzr merge lp:~thealok/openlp/videotests
Reviewer Review Type Date Requested Status
Raoul Snyman Approve
Tim Bentley Approve
Review via email: mp+7918@code.launchpad.net
To post a comment you must log in.
Revision history for this message
ALok (thealok) wrote :

Video test suite:
Aspect ratio tests.
Audio video sync tests.

Revision history for this message
Tim Bentley (trb143) wrote :

Approved.
Whatever they do!

review: Approve
Revision history for this message
Raoul Snyman (raoul-snyman) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added directory 'resources/videos'
2=== added file 'resources/videos/AspectRatioTest-16-9-ana.h264.mp4'
3Binary files resources/videos/AspectRatioTest-16-9-ana.h264.mp4 1970-01-01 00:00:00 +0000 and resources/videos/AspectRatioTest-16-9-ana.h264.mp4 2009-06-25 23:34:49 +0000 differ
4=== added file 'resources/videos/AspectRatioTest-16-9-squ.h264.mp4'
5Binary files resources/videos/AspectRatioTest-16-9-squ.h264.mp4 1970-01-01 00:00:00 +0000 and resources/videos/AspectRatioTest-16-9-squ.h264.mp4 2009-06-25 23:34:49 +0000 differ
6=== added file 'resources/videos/AspectRatioTest-16-9-squ.xvid.avi'
7Binary files resources/videos/AspectRatioTest-16-9-squ.xvid.avi 1970-01-01 00:00:00 +0000 and resources/videos/AspectRatioTest-16-9-squ.xvid.avi 2009-06-25 23:34:49 +0000 differ
8=== added file 'resources/videos/AspectRatioTest-4-3-ana.h264.mp4'
9Binary files resources/videos/AspectRatioTest-4-3-ana.h264.mp4 1970-01-01 00:00:00 +0000 and resources/videos/AspectRatioTest-4-3-ana.h264.mp4 2009-06-25 23:34:49 +0000 differ
10=== added file 'resources/videos/AspectRatioTest-4-3-squ.h264.mp4'
11Binary files resources/videos/AspectRatioTest-4-3-squ.h264.mp4 1970-01-01 00:00:00 +0000 and resources/videos/AspectRatioTest-4-3-squ.h264.mp4 2009-06-25 23:34:49 +0000 differ
12=== added file 'resources/videos/AspectRatioTest-4-3-squ.xvid.avi'
13Binary files resources/videos/AspectRatioTest-4-3-squ.xvid.avi 1970-01-01 00:00:00 +0000 and resources/videos/AspectRatioTest-4-3-squ.xvid.avi 2009-06-25 23:34:49 +0000 differ
14=== added file 'resources/videos/AspectRatioTest-rand-squ.h264.mp4'
15Binary files resources/videos/AspectRatioTest-rand-squ.h264.mp4 1970-01-01 00:00:00 +0000 and resources/videos/AspectRatioTest-rand-squ.h264.mp4 2009-06-25 23:34:49 +0000 differ
16=== added file 'resources/videos/left-720.png'
17Binary files resources/videos/left-720.png 1970-01-01 00:00:00 +0000 and resources/videos/left-720.png 2009-06-25 23:34:49 +0000 differ
18=== added file 'resources/videos/normal-720.png'
19Binary files resources/videos/normal-720.png 1970-01-01 00:00:00 +0000 and resources/videos/normal-720.png 2009-06-25 23:34:49 +0000 differ
20=== added file 'resources/videos/right-720.png'
21Binary files resources/videos/right-720.png 1970-01-01 00:00:00 +0000 and resources/videos/right-720.png 2009-06-25 23:34:49 +0000 differ
22=== added file 'resources/videos/synctest.24.avs'
23--- resources/videos/synctest.24.avs 1970-01-01 00:00:00 +0000
24+++ resources/videos/synctest.24.avs 2009-06-25 23:34:49 +0000
25@@ -0,0 +1,6 @@
26+# audio/video sync test
27+# by: Andrew Lok
28+# 2009-06-22
29+
30+Import("synctest.avsi")
31+SyncClip(23.976, 44100)
32
33=== added file 'resources/videos/synctest.24.muxed.avi'
34Binary files resources/videos/synctest.24.muxed.avi 1970-01-01 00:00:00 +0000 and resources/videos/synctest.24.muxed.avi 2009-06-25 23:34:49 +0000 differ
35=== added file 'resources/videos/synctest.24.muxed.mp4'
36Binary files resources/videos/synctest.24.muxed.mp4 1970-01-01 00:00:00 +0000 and resources/videos/synctest.24.muxed.mp4 2009-06-25 23:34:49 +0000 differ
37=== added file 'resources/videos/synctest.25.avs'
38--- resources/videos/synctest.25.avs 1970-01-01 00:00:00 +0000
39+++ resources/videos/synctest.25.avs 2009-06-25 23:34:49 +0000
40@@ -0,0 +1,6 @@
41+# audio/video sync test
42+# by: Andrew Lok
43+# 2009-06-22
44+
45+Import("synctest.avsi")
46+SyncClip(25, 48000)
47
48=== added file 'resources/videos/synctest.25.muxed.avi'
49Binary files resources/videos/synctest.25.muxed.avi 1970-01-01 00:00:00 +0000 and resources/videos/synctest.25.muxed.avi 2009-06-25 23:34:49 +0000 differ
50=== added file 'resources/videos/synctest.30.avs'
51--- resources/videos/synctest.30.avs 1970-01-01 00:00:00 +0000
52+++ resources/videos/synctest.30.avs 2009-06-25 23:34:49 +0000
53@@ -0,0 +1,6 @@
54+# audio/video sync test
55+# by: Andrew Lok
56+# 2009-06-22
57+
58+Import("synctest.avsi")
59+SyncClip(29.97, 32000)
60
61=== added file 'resources/videos/synctest.30.muxed.avi'
62Binary files resources/videos/synctest.30.muxed.avi 1970-01-01 00:00:00 +0000 and resources/videos/synctest.30.muxed.avi 2009-06-25 23:34:49 +0000 differ
63=== added file 'resources/videos/synctest.30.small.avs'
64--- resources/videos/synctest.30.small.avs 1970-01-01 00:00:00 +0000
65+++ resources/videos/synctest.30.small.avs 2009-06-25 23:34:49 +0000
66@@ -0,0 +1,7 @@
67+# audio/video sync test
68+# by: Andrew Lok
69+# 2009-06-22
70+
71+Import("synctest.avsi")
72+SyncClip(29.97, 22050)
73+BicubicResize(640,360)
74
75=== added file 'resources/videos/synctest.30.small.muxed.avi'
76Binary files resources/videos/synctest.30.small.muxed.avi 1970-01-01 00:00:00 +0000 and resources/videos/synctest.30.small.muxed.avi 2009-06-25 23:34:49 +0000 differ
77=== added file 'resources/videos/synctest.avsi'
78--- resources/videos/synctest.avsi 1970-01-01 00:00:00 +0000
79+++ resources/videos/synctest.avsi 2009-06-25 23:34:49 +0000
80@@ -0,0 +1,47 @@
81+# audio/video sync test
82+# by: Andrew Lok
83+# 2009-06-22
84+
85+#
86+# This code is part of OpenLP's testsuite
87+# OpenLP - Open Source Lyrics Projection
88+# Copyright (c) 2009 Andrew Lok
89+#
90+# This program is free software; you can redistribute it and/or modify it under
91+# the terms of the GNU General Public License as published by the Free Software
92+# Foundation; version 2 of the License.
93+#
94+# This program is distributed in the hope that it will be useful, but WITHOUT ANY
95+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
96+# PARTICULAR PURPOSE. See the GNU General Public License for more details.
97+#
98+# You should have received a copy of the GNU General Public License along with
99+# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
100+# Place, Suite 330, Boston, MA 02111-1307 USA
101+#
102+
103+function SyncClip(float framerate, int audiorate)
104+{
105+ frames=30
106+ seconds=frames/framerate
107+
108+ silence = Tone(seconds, 440, audiorate, 1, "silence", 1.0)
109+ tone = Tone(seconds, 440, audiorate, 1, "sine", 1.0)
110+
111+ silence2 = MonoToStereo(silence, silence)
112+ left = MonoToStereo(tone, silence)
113+ right = MonoToStereo(silence, tone)
114+
115+ leftvid=ImageSource("left-720.png",end = frames, fps=framerate, use_DevIL=true)
116+ rightvid=ImageSource("right-720.png",end = frames, fps=framerate, use_DevIL=true)
117+ normalvid=ImageSource("normal-720.png",end = frames, fps=framerate, use_DevIL=true)
118+
119+ cycle = AudioDub(leftvid,left) ++ AudioDub(normalvid,silence2) ++ AudioDub(rightvid,right) ++ AudioDub(normalvid,silence2)
120+
121+ final = loop(cycle,times=5)
122+
123+ final = final.ConvertToYV12()
124+ final = final.info()
125+
126+ return final
127+}