Copyright © 2008-2011 MultiMedia Soft

ExtractAudioFromVideoFile method

Previous pageReturn to chapter overviewNext page

Remarks

 

Starts extraction of the audio track from a video clip into an output sound file: in this case contents of the resulting output file is not loaded into the editor directly so, in case you should need to edit the output sound file, once extraction will be completed, you will have to load it with a call to the LoadSound method.

An extraction session can be stopped at any time through a call to the ExtractAudioAbort method.

 

A successful call to this method will fire the AudioExtractFromVideoStart event followed by a number of AudioExtractFromVideoPerc events and finally by the AudioExtractFromVideoDone event.

 

 

Syntax

 

[Visual Basic]

control.ExtractAudioFromVideoFile (

nFrequency as Long,

nChannels as Long,

strOutputPath as String,

strInputPath as String

) as enumErrorCodes


 

[C++]

short control.ExtractAudioFromVideoFile (

long nFrequency,

long nChannels,

LPCTSTR strOutputPath

LPCTSTR strInputPath

);


 

 

Parameter

Description

 

 

nFrequency

Frequency used to resample the sound to export (44100, 22050, etc.). This parameter is ignored when:

the EncodeFormats.FormatToUse property is set to ENCODING_FORMAT_WMA and the EncodeFormats.WMA.EncodeMode property is set to WMA_ENCODE_PROFILE
the EncodeFormats.FormatToUse property is set to ENCODING_FORMAT_ACM

nChannels

Number of channels used to resample the sound to export (1 for Mono or 2 for Stereo). This parameter is ignored when:

the EncodeFormats.FormatToUse property is set to ENCODING_FORMAT_WMA and the EncodeFormats.WMA.EncodeMode property is set to WMA_ENCODE_PROFILE
the EncodeFormats.FormatToUse property is set to ENCODING_FORMAT_ACM

strOutputPath

String containing the absolute pathname of the destination audio file. If this pathname should contain invalid characters, they would be automatically changed into an underscore '_' character.

strInputPath

String containing the absolute pathname of the source video file. If this pathname should contain invalid characters, they would be automatically changed into an underscore '_' character.

 

 

Return value

 

Value

Meaning

 

 

Negative value

An error occurred, check the LastError property value in order to see the error code meaning

enumErrorCodes.ERR_NOERROR (0)

The method call was successful.