Example Code

Change the Reproduction Speed of a Video in LabVIEW

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.

    Software

  • Vision Development Module
  • LabVIEW

Code and Documents

Attachment

Overview

This example demonstrates how to play an AVI video file with a user defined wait time between each frame.

 

Description

If you want to replay an AVI video in LabVIEW, you need to control the frame rate of the video. The Vision Development Module (VDM) already provides the functions to open, read and close an AVI file. The frame rate has to be implemented with a wait time inside the loop which reads frame-by-frame from the AVI file.

 

Requirements

 Software

  • LabVIEW Base Development System 2012 (or compatible)
  • NI Vision Development Module 2012 (or compatible)
  • If running in a Real-Time context, you will need the LabVIEW Real-Time Module 2012 (or compatible)

 Hardware

  • No hardware is necessary to use this example VI

 

Steps to Implement or Execute Code

  1. Download and open the attached ZIP-file
  2. Open the VI and follow the instructions on the Front Panel

 

Additional Information or References

Play AVI Video With User Defined Frame Rate - Front Panel.png

 

Play AVI Video With User Defined Frame Rate - Block Diagram.png

 

**The code for this example has been edited to meet the new Community Example Style Guidelines. The edited copy is marked with the text ‘NIVerified’. Read here for more information about the new Example Guidelines and Community Platform.**

Salvador Mikel
National Instruments
Ingeniería de Aplicaciones
www.ni.com/soporte

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.