File: videotest.ssc

package info (click to toggle)
stellarium 24.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 911,396 kB
  • sloc: ansic: 317,377; cpp: 204,602; xml: 48,590; javascript: 26,348; python: 1,254; perl: 1,108; sh: 207; makefile: 190; pascal: 169
file content (25 lines) | stat: -rw-r--r-- 1,005 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// Name: Video Test
// Author: Georg Zotti
// License: Public Domain
// Description: This script plays a video file and test some functionalities.
//              Note that video support is a build-time option and
//              may not be supported for the version of Stellarium
//              which you have.  Also, different platforms may
//              support different video formats.
//

// The video path name is relative to the scripts directory.
core.loadVideo("tests/media/stellarium.mp4", "vid", 100, 70, false);

lab = LabelMgr.labelScreen("Playing video file...", 100, 20, true, 20, "#ff0000");
core.wait(3);
core.playVideo("vid");
//core.showVideo("vid");
core.resizeVideo("vid", 0.3, -1); // resize to 1/3 of current width, keep original aspect ratio.
core.wait(1); // we need a short waiting period while video is playing to have valid values like duration!
dur=core.getVideoDuration("vid");
core.wait(dur/1000. + 2.);
LabelMgr.deleteLabel(lab);
core.wait(0.4);

core.dropVideo("vid");