Skip to content

Video formats

The playlist features makes it possible to specify a list of video clips that have to be played automatically one after the other.

Overview

  • all the playlist actions are performed by using the Playlist function, detailed below.

  • the playlist content can be retrieved by the GetPlaylist function, that returns a list of strings separated by CR/LF

  • the current index in the playlist is returned by the PlaylistIndex property

  • when the end of the playlist is reached, the OnPlayerEndOfPlaylist event occurs.

  • it is possible to know if the playlist is currently playing by testing IsPlaylistActive.

The Playlist function

The playlist function accepts 2 parameters:

  • a first parameter that specify the action

  • a 2nd parameter that specify the video clip (used only for pl_Add and pl_Remove).

The first parameter can take one of the following values:

pl_Add: adds the video clip (specified as 2nd parameter) to the playlist

pl_Remove: removes the video clip (specified as 2nd parameter) from the playlist

pl_Clear: clears the playlist

pl_Loop: enables the loop mode (the playlist restart from the beginning when the end is reached)

pl_NoLoop: disables the loop mode

pl_Play: starts playing the playlist

pl_Stop: stops playing the playlist after the end of the current clip

pl_Next: starts playing the next clip (immediately)

pl_Previous: starts playing the previous clip (immediately)

pl_SortAlpha: sorts the playlist in the alphabetical order

pl_SortRevAlpha: sorts the playlist in the reverse alphabetical order

pl_Random: enable the "random" mode: the clips will be played in a random order.

pl_Sequential: disables the "random" mode: the clips will be played sequentially.

Building the playlist

Simply invoke Playlist (pl_Add, "... path of the video clip...") as many times as required. Pass and empty string for the "VideoClip" parameter when it is not required (it is required only for pl_Add and pl_Remove). E.g.:

videograbber.Playlist (pl_Clear, '');

videograbber.Playlist (pl_Add, 'vg000004.avi');

videograbber.Playlist (pl_Add, 'vg000002.avi');

videograbber.Playlist (pl_Add, 'StaticImage1.BMP');

videograbber.Playlist (pl_Add, 'vg000003.avi');

videograbber.Playlist (pl_Add, 'vg000005.avi');

videograbber.Playlist (pl_Add, 'vg000001.avi');

videograbber.Playlist (pl_Add, 'StaticImage2.JPG');

Starting the playlist

Be sure to set all the required options (like pl_Loop, pl_SortAlpha or pl_Random), then invoke pl_Play. E.g.:

videograbber.Playlist (pl_Clear, '');

videograbber.Playlist (pl_Add, 'vg000004.avi');

videograbber.Playlist (pl_Add, 'vg000002.avi');

videograbber.Playlist (pl_Add, 'StaticImage1.BMP');

videograbber.Playlist (pl_Add, 'vg000003.avi');

videograbber.Playlist (pl_Add, 'vg000005.avi');

videograbber.Playlist (pl_Add, 'vg000001.avi');

videograbber.Playlist (pl_Add, 'StaticImage2.JPG');

videograbber.PlaylistIndex:= 0;

videograbber.PlayerDuration = 50000000; // specifies 5 seconds of display time for static images

videograbber.Playlist (pl_SortAlpha, '');

videograbber.Playlist (pl_Loop, '');

videograbber.Playlist (pl_Random, '');

videograbber.Playlist (pl_Play, '');

Pausing the playlist

Simply invoke PausePlayer.

Stopping the playlist

  • to stop the playlist at the end of the current clip, invoke Playlist (pl_Stop)
  • to close the playlist immediately, invoke ClosePlayer

Using static images or animaged GIFs in the playlist

Static images (like BMP, JPG files) can be opened alternatively with video clips.

To specify the display time for static images, assign the PlayerDuration with the desired value (expressed as 100ns units, e.g. 7 seconds = 70000000).