Skip to content
This repository was archived by the owner on Jun 23, 2025. It is now read-only.

VidLapse API

Ernest Mallett edited this page Jul 20, 2017 · 2 revisions

Constructors

The following are all the constructors available for the VidLapse class.

constructor VidLapse(float freq, string folder)
constructor VidLapse(string folder)
constructor VidLapse(int freq, string fullpath)
constructor VidLapse(string fullpath, bool blank)
constructor VidLapse()

Examples:

VidLapse lapse = new VidLapse(1f,"Images");
VidLapse lapse = new VidLapse("Images");
VidLapse lapse = new VidLapse(1,"c:\images");
VidLapse lapse = new VidLapse("c:\images",false);
VidLapse lapse = new VidLapse();

Methods

void RemoveImages()

  • Called to empty the images directory

Example:

VidLapse lapse = new VidLapse();
lapse.RemoveImages();

IEnumerator CaptureImages()

  • Called to begin capturing images

Example:

VidLapse lapse = new VidLapse();
StartCoroutine(lapse.CaptureImages());

void Upload(string user, string pass)

  • Called to upload most recently created video to youtube
  • string user - Username of the account to upload to
  • string pass - Password of the account to upload to

Example:

lapse.Upload("user","pass");

void Upload(string user, string pass, string videotitle)

  • Called to upload most recently created video to youtube
  • string user - Username of the account to upload to
  • string pass - Password of the account to upload to
  • string videotitle - Name of video that will be displayed

Example:

lapse.Upload("user","pass","My new timelapse!");

void Upload(string user, string pass, string videotitle, string description)

  • Called to upload most recently created video to youtube
  • string user - Username of the account to upload to
  • string pass - Password of the account to upload to
  • string videotitle - Name of video that will be displayed
  • string description - Description that will be shown

Example:

lapse.Upload("user","pass","My new timelapse!","A video I made with VidLapse!");

void CreateMovie()

  • Called to begin creating the movie Example:
lapse.CreateMovie();

void CreateMovie(int width, int height, int framerate)

  • Called to begin creating the movie
  • int width - Width of the video to be created
  • int height - Height of the video to be created
  • int framerate - Framerate of the video to be created Example:
lapse.CreateMovie(240,180,20);

Getters/Setters

float Frequency

  • Getter/Setter to set the image capture frequency in seconds Example:
VidLapse lapse = new VidLapse();
lapse.Frequency = 1f;

bool SaveToDesktop

  • Getter/Setter to save the video on desktop or not Example:
VidLapse lapse = new VidLapse();
lapse.SaveToDesktop = true;

int Stored

  • Getter that contains the number of images currently stored Example:
VidLapse lapse = new VidLapse();
Debug.Log("Number of images stored: "+lapse.Stored);

string MovieName

  • Getter/Setter to set the name of the video to be created Example:
VidLapse lapse = new VidLapse();
lapse.MovieName = "My new movie";

string Folder

  • Getter/Setter to set the directory images will be stored in Example:
VidLapse lapse = new VidLapse();
lapse.Folder="Images";

float VideoProgress

  • Getter to determine progress of movie creation

bool Record

  • Getter/Setter to determine if recording and/or to stop recording Example:
VidLapse lapse = new VidLapse();
StartCoroutine(lapse.CaptureImages());
lapse.Record=false;