IWMEncFileArchiveStats.FileSize

Windows Media Encoder SDK banner art

The FileSize property retrieves the size of the archive file.

Syntax

decimal = IWMEncFileArchiveStats.FileSize;

Parameters

This property takes no parameters.

Property Value

A Decimal that indicates the size of the output file. Multiply the value by 10 to retrieve the file sizes in Kb.

Remarks

File size information does not persist after the encoding process has stopped. You can create a timer object to retrieve the archiving statistics.

Example Code

using WMEncoderLib;

try
{
// See the IWMEncFile object for an example that explains how to
// create and use an archive file.
// The following example shows how to capture archiving statistics
// during the encoding process.

// Declare objects and variables.
  IWMEncStatistics Stats;
  IWMEncFileArchiveStats FileStats;
  decimal lDuration;
  decimal lSize;

// Create an IWMEncStatistics object and retrieve
// the IWMEncFileArchiveStats object from it.
  Stats = Encoder.Statistics;
  FileStats =(IWMEncFileArchiveStats)Stats.FileArchiveStats; 

// Find the duration (seconds) and size (Kb) of the archive file.
  lDuration = FileStats.FileDuration * 10;
  lSize = FileStats.FileSize * 10000;
}

catch (Exception e)
{
     // TODO: Handle exceptions.
}

Requirements

Reference: Windows Media Encoder

Namespace: WMEncoderLib

Assembly: Interop.WMEncoderLib.dll

Library: WMEncoderLib.dll

See Also