Product icon Help book icon Video Mill : User's Guide

Script Samples


About The Samples

These samples are intended to show possible usage scenarios with Scripts. With the flexibility of Scripts, there will often be alternate approaches to achieve the desired results.

Three Video Playlist that Includes a Static Image Media Item


Requirement

You want to start by a showing with a short film. Follow that with a promotional static image screen which includes a 10 minute count-down marquee timer. Then play the main feature.


Solution

Set up one Script to sequentially Play, then Unload each of the three Media Screens.

In the case of the Pre-Show Promotional Marquee, that could be as simple as a static image (jpg, png, etc) listing coming attractions. See the Rules of Script Execution for the special case of "Playing Media Items Which Are Static Images". You can also add a Marquee timer that counts down the minutes until show time.

Listing 1. Evening Show
Script: Evening Show
Total Time: 02:07:00
Description: Play 11 min short feature. Show Promo Marquee (10 mins). Start main feature.

Steps:
1. Play (Space Shuttle Short)
2. UnLoad (Space Shuttle Short)
3. Play (Pre-Show Marquee)
4. UnLoad (Pre-Show Marquee)
5. Play (The African Queen 1080pHD)
6. UnLoad (The African Queen 1080pHD)

Play 3 Videos Simultaneously


Requirement

You want to have 3 videos play simultaneously. Each Media Screen should close once its video completes playing.


Solution

Use Offset Timed Load Steps to play all videos immediately when the Script starts by using an offset time of zero (:00.0). In the Media Item Descriptors of each video, check the Unload when Media Ends checkbox. Use Location Override setting in each Media Item's Screen Dimensions to locate each screen on the display so that they do not block each other for viewing.

Listing 2. Play 3 Videos Simultaneously
Script: Play 3 Simultaneously
Total Time: 00:05:16
Steps:
1. Play (Video1), Offset: :00.0
2. Play (Video2), Offset: :00.0
3. Play (Video3), Offset: :00.0

Play 3 Videos - Stagger Screen Visibilty


Requirement

You want to have 3 videos play simultaneously (as in scenario above). But you only want one screen to be visible at a given time. And the visible screen should change every 5 seconds, from Video1 to Video2 to Video3.


Solution

You can run the sample Script above to start the three videos playing. Then run the Script in Listing 3, to change the screen visibility every 5 seconds. Set this Script to repeat as many times as needed based on the play Duration of Video1, Video2 and Video3.

Listing 3. Play 3 Videos - Stagger Screen Visibilty
Script: Stagger Visibity
Total Time: 00:00:15
Special Processing:
* Repeat: 5 times.
Steps:
1. Screen Visible (Video1) = False
2. Screen Visible (Video2) = False
3. Screen Visible (Video3) = False
4. Screen Visible (Video1) = True
5. Delay (:05.0)
6. Screen Visible (Video1) = False
7. Screen Visible (Video2) = True
8. Delay (:05.0)
9. Screen Visible (Video2) = False
10. Screen Visible (Video3) = True
11. Delay (:05.0)

Using Scripts for Modular Tasks


Requirement

You want to display two playlists of flyers on a large TV monitor in a store window. It will display two flyers side by side for 30 seconds then move to the next two flyers. Each flyer is a simple PNG images with some promotional or event message.


Solution

Create one Master Script (Listing 4) to start two other playlist Scripts. The playlist Scripts (Listing 5), will play each flyer sequentially.

Notes: The time duration that each flyer is displayed is set in Media Item Options> Default Durations. Positioning of the flyers is greatly simplified by using Basic Load Templates. In the Media Screen Dimensions panel, set the Media Item's Load Template to either the "Left Half" and "Right Half" Basic Style Template.

Listing 4. Master Starter Script.
Script: Master Starter
Description: Starts two scripts simultaneously.

Steps:
1. Run Script (Right Side Flyers)
2. Run Script (Left Side Flyers)
Listing 5. Two Playlist Scripts.
Script: Right Side Flyers
Description: Plays the flyers on right side of display.

Special Processing:
* Loop continously.
Steps:
1. Play (FlyerRight-A)
2. Play (FlyerRight-B)
3. Play (FlyerRight-C)
4. Play (FlyerRight-D)

...................................................
Script: Left Side Flyers
Description: Plays the flyers on left side of display.

Special Processing:
* Loop continously.
Steps:
1. Play (FlyerLeft-A)
2. Play (FlyerLeft-B)
3. Play (FlyerLeft-C)
4. Play (FlyerLeft-D)

Start an Exteral Program from a Script


Requirement

You have an External Program that will turn on and control a DMX lighting array. It will accept a lighting sequence name as a command line argument. You want to start that Exteral Program and pass it a lighting sequence name. Then immediately Play a video.


Solution

Use a Start Exteral Program Step to start the DMX lighting program.

Listing 6. Starting an Exteral Program.
Script: Turn on DMX Lights, Play Video1
Total Time: 00:01:45
Steps:
1. Start Ext.Program (DMX Lights), Var: IntroSequence
2. Play (Video1)

Pause and Resume a Video Every 5 Seconds


Requirement

You want to Play a video but have it pause and resume every 5 seconds until it finishes playing.


Solution

Create two Scripts. One Script Plays the video (Listing 7). And after 5 seconds, it runs the second Script that will produce the pause/resume behavior.

The second Script (Listing 8), alternates between Pause and Resume using 5 second Delay steps to time the transition. The Script is set to loop continuously until it is stopped.

Listing 7. Play Video1
Script: Play Video1
Total Time: 00:01:45
Steps:
1. Play (Video1)
2. Run Script (Pause and resume Video1), Offset: :05.0
Listing 8. Starting an Exteral Program.
Script: Pause and Resume Video1
Total Time: 00:00:10
Special Processing:
* Loop continuously.
Steps:
1. Pause (Video1)
2. Delay (:05.0)
3. Resume (Video1)
4. Delay (:05.0)

Pause All and Resume All Every 5 Seconds


Requirement

You want to Play 3 videos but have them all pause and resume every 5 seconds until they finish playing.


Solution

Create two Scripts. One Script Plays the 3 videos (Listing 9). And after 5 seconds, it runs the second Script that will produce the pause/resume behavior.

The second Script (Listing 10), alternates between Pause All and Resume All every 5 seconds. The Script is set to loop continuously until it is stopped. The Delay step is added at the end since a Script will not Loop if it only has Offset Timed Steps. If you only want to do pause/resume once, the Delay step is not needed.

Listing 9. Play 3 Videos and Pause/Resume every 5 seconds.
Script: Play 3 Videos
Total Time: 00:01:45
Steps:
1. Play (Video1), Offset: :00.0
2. Play (Video2), Offset: :00.0
3. Play (Video3), Offset: :00.0
4. Run Script (Pause All and Resume All), Offset: :05.0
Listing 10. Pause All and Resume All.
Script: Pause All and Resume All
Total Time: 00:00:10
Special Processing:
* Loop continuously.
Steps:
Steps: 
1. Pause All, Offset: :05
2. Resume All, Offset: :10
3. Delay (:01)

Playing Multiple Playlist Scripts In Sequential Order


Requirement

You want to play two playlists of videos on one display (it could be any number of playlists). Playlist-A should complete playing all its videos before Playlist-B starts playing. And you want to run these playlists in this manner continously throughout the day.


Solution

Create a Master Script (Listing 11) to run two other playlist Scripts. Step-1 starts Playlist-A. Step-2 will Wait On Playlist-A to complete all its videos. Then Playlist-B is started. In the Master Script's Special Processing controls, check the Loop continously checkmark. This modular approach allows you to quickly swap in/out other playlist and you can include as many playlists as desired.

The two playlist Scripts (Listing 12, Playlist-A and Playlist-B), will play each video sequentially. These can contain any number of videos and/or images.

For this scenario, the most efficient method is to use a Load Template because it will create one Media Screen and all videos will play via the one Screen. If you don't use a Load Template, each video will create its own Media Screen. In this case, you would need to follow each Play step with an Unload step to get rid of each Screen after the video play completes.

Listing 11. Master Starter Script
Script: Master Playlist
Special Processing:
* Loop continously.
Steps:
1. Run Script (Playlist-A)
2. Wait On Script (Playlist-A)
3. Run Script (Playlist-B)
4. Wait On Script (Playlist-B)
Listing 12. Two Playlist Scripts
Script: Playlist-A
Description: Plays four videos in sequential order.
Steps:
1. Play (Video-A)
2. Play (Video-B)
3. Play (Video-C)
4. Play (Video-D)

...................................................
Script: Playlist-B
Description: Plays four videos in sequential order.
Steps:
1. Play (Video-E)
2. Play (Video-F)
3. Play (Video-G)
4. Play (Video-H)

Close Of Business Clean Up


Requirement

You have a Playlist that loops continuously and possibly other scripts that run in a complex sequence. At close of business time, you want to immediately end all script processing and close any open Media Screens.


Solution

Create a Clean Up Script (Listing 13) and schedule the script to run a minute prior to closing time.

Two steps will do end of processing clean up. "Unload All Screens" will close any open Media Screens. "Halt All Scripts" will end any scripts that may be running. When using these step commands together, make sure to do them in the order shown because "Halt All Scripts" really does means ALL, including the script it is contained in. If "Unload All Screens" comes AFTER "Halt All Scripts", the step will never execute.

Listing 13. End Of Day Clean Up Script
Script: End Of Day Clean Up
Steps:
1. Unload All Screens
2. Halt All Scripts