Copyright © 2005-2019 MultiMedia Soft

VideoPlayer.FrameGrabberExecToFile method

Previous pageReturn to chapter overviewNext page

Remarks

 

Executes a frames grabbing session whose output will be stored on disk files. After completing the grabbing session, you can enumerate all of the grabbed frames through the combination of the VideoPlayer.FrameGrabberResultsGetFilesCount and VideoPlayer.FrameGrabberResultsGetFilePathname methods.

 

For further details about frames grabbing see the How to grab frames from video files tutorial.

For further details about the use of the embedded video player see the VideoPlayer class section.

For details about video clips rendering refer to the How to play video files through DirectShow tutorial.

 

 

Syntax

 

[Visual Basic]

Public Function FrameGrabberExecToFile (

nPlayerIndex as Int16,

nStopType as enumVideoGrabberStopTypes,

nStartPosition as Int32,

nEndPosition as Int32,

nNumberOfFrames as Int32,

strOutputPath as String,

strOutputFilenamePrefix as String,

nFormat as enumGraphicFormats,

nFormatParameter as Int32

) as enumErrorCodes


 

[C#]

public enumErrorCodes FrameGrabberExecToFile (

Int16 nPlayerIndex,

enumVideoGrabberStopTypes nStopType,

Int32 nStartPosition,

Int32 nEndPosition,

Int32 nNumberOfFrames,

string strOutputPath,

string strOutputFilenamePrefix,

enumGraphicFormats nFormat,

Int32 nFormatParameter

);


 

[C++]

public: enumErrorCodes FrameGrabberExecToFile (

Int16 nPlayerIndex,

enumVideoGrabberStopTypes nStopType,

Int32 nStartPosition,

Int32 nEndPosition,

Int32 nNumberOfFrames,

string strOutputPath,

string strOutputFilenamePrefix,

enumGraphicFormats nFormat,

Int32 nFormatParameter

);


 

Parameter

Description

 

 

nPlayer

Number representing the zero-based index of the player that will use the video player.

nStopType

Condition under which the stop of the grabbing session will occur.

Supported values are the following:

Mnemonic value

Value

Meaning

VIDEOGRABBER_STOP_POSITION

0

When this option is selected, the beginning of the grabbing is defined by the value set into the nStartPosition and the end of the grabbing is defined by the value set into the nEndPosition parameter. In this case the nNumberOfFrames parameter is ignored.

VIDEOGRABBER_STOP_FRAMES_NUM

1

When this option is selected, the beginning of the grabbing is defined by the value set into the nStartPosition and the end of the grabbing will occur after grabbing the number of frames set into the nNumberOfFrames parameter. In this case the nEndPosition parameter is ignored.

nStartPosition

Start position, expressed in milliseconds, where the grabbing session will begin. The value 0 represents the sound's beginning.

nEndPosition

Stop position, expressed in milliseconds, where the grabbing session will end. The value -1 represents the end of the video clip.

This parameter is ignored if the nStopType parameter is set to VIDEOGRABBER_STOP_FRAMES_NUM.

nNumberOfFrames

Number of frames to grab before stopping the grabbing session.

This parameter is ignored if the nStopType parameter is set to VIDEOGRABBER_STOP_POSITION.

strOutputPath

String containing the absolute path where grabbed frames will be stored.

strOutputFilenamePrefix

Fixed prefix of the filename for each grabbed frame.

nFormat

Graphic format used to save the bitmap.

Supported values are the following:

Mnemonic value

Value

Meaning

GRAPHIC_FORMAT_BMP

0

BMP format

GRAPHIC_FORMAT_JPEG

1

JPEG format

GRAPHIC_FORMAT_PNG

2

PNG format

GRAPHIC_FORMAT_GIF

3

GIF format

GRAPHIC_FORMAT_TIFF

4

TIFF format

nFormatParameter

Eventual parameters required by the chosen graphic format.

 

When the nFormat parameter is set to GRAPHIC_FORMAT_JPEG, this parameter defines the JPEG compression factor whose range can be in the range from 0 (Maximum compression, Lower Quality) to 100 (Minimum compression, Higher Quality).

 

 

Return value

 

Value

Meaning

 

 

Negative value

An error occurred (see the LastError property for further error details)

enumErrorCodes.NOERROR (0)

The method call was successful.