Example Code

AVI Playback, Frame Seek, and Extraction

Code and Documents

Attachment

Overview

This VI is based on another Community VI AVI playback with frame seek however, the following features were added

  • Ability to extract a section of the video (frames)
  • Ability to save the extracted video/frames to a new AVI

With this VI the user can "clip" or "cut" a section of the video they want, and save the section into a new AVI file.

As stated in the previous sample, this VI also "allows you to playback an AVI file and provides additional functionality to slow down playback, select a specific frame, and advance frame-by-frame."

Description

This code uses an event driven state machine to implement an AVI viewer in LabVIEW.

The frame extraction and saving to a different AVI is done in a For Loop in the Event Structure.

Steps to Implement or Execute Code

Viewing the AVI

  1. Run the code
  2. Select an AVI file to view
  3. Use the Play/Pause/Previous Frame/Next Frame/Slow buttons to play through the AVI file.
  4. The 'Delay' control allows the speed of the slow playback to be modified
  5. The 'Current Frame' control can be changed to select a specific frame.

Extracting part of the AVI

  1. Move to the first frame you want to extract, press "Mark First Frame"
  2. Move to the last frame of portion you want to extract, press "Mark Last Frame"
  3. Press "Extract and Save", specify where to save the output AVI file.

Requirements

Software

LabVIEW 2014, valid AVI file.

LabVIEW Vision Development Module

Hardware

None

Preview

screenshot.579.png

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

Comments
soumendras
Member
Member
on

Please upload for labview 2013 also ...genuinely need this

Contributors