Table of Contents

Class MP3Output

Namespace
VisioForge.Core.Types.Output
Assembly
VisioForge.Core.dll

MP3 output settings.

public sealed class MP3Output : IVideoCaptureBaseOutput, IVideoEditBaseOutput

Inheritance

Implements

Inherited Members

Constructors

MP3Output()

Initializes a new instance of the VisioForge.Core.Types.Output.MP3Output class.

public MP3Output()

Properties

CBR_Bitrate

Gets or sets audio MP3 bitrate.

public int CBR_Bitrate { get; set; }

Property Value

int

Remarks

For MPEG-1 (sampling frequencies of 32, 44.1 and 48 kHz) bit rate = 32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320 For MPEG-2 (sampling frequencies of 16, 22.05 and 24 kHz) bit rate = 8, 16, 24, 32, 40, 48, 56, 64, 80, 96, 112, 128, 144, 160 Default is 128 kbps for MPEG1 and 64 kbps for MPEG-2.

CRCProtected

Gets or sets a value indicating whether MP3 CRC tag enabled.

public bool CRCProtected { get; set; }

Property Value

bool

Remarks

Adds the cyclic redundancy check (CRC) code in each frame, allowing to detect transmission errors that could occur on the MP3 stream. However, it takes 16 bits per frame that would otherwise be used for encoding, and then will be slightly reduced the sound quality.

ChannelsMode

Gets or sets channels mode.

public MP3ChannelsMode ChannelsMode { get; set; }

Property Value

MP3ChannelsMode

Remarks

Joint-stereo is the default mode for stereo files with VBR when -V is more than 4 or fixed bit rates of 160kbs or less. At higher fixed bit rates or higher VBR settings, the default is stereo. Stereo: In this mode, the encoder makes no use of potentially existing correlations between the two input channels. It can, however, negotiate the bit demand between both channel, i.e. give one channel more bits if the other contains silence or needs less bits because of a lower complexity. Joint stereo: In this mode, the encoder will make use of a correlation between both channels. The signal will be matrixed into a sum (“mid”), computed by L+R, and difference (“side”) signal, computed by L-R, and more bits are allocated to the mid channel. This will effectively increase the bandwidth if the signal does not have too much stereo separation, thus giving a significant gain in encoding quality. Using mid/side stereo inappropriately can result in audible compression artifacts. To much switching between mid/side and regular stereo can also sound bad. To determine when to switch to mid/side stereo, MP3 uses a much more sophisticated algorithm than that described in the ISO documentation, and thus is safe to use in joint stereo mode. Dual channels: In this mode, the 2 channels will be totally independently encoded. Each channel will have exactly half of the bit rate. This mode is designed for applications like dual languages encoding (ex: English in one channel and French in the other). Using this encoding mode for regular stereo files will result in a lower quality encoding. Mono: The input will be encoded as a mono signal. If it was a stereo signal, it will be downsampled to mono. The downmix is calculated as the sum of the left and right channel, attenuated by 6 dB.

Gets or sets a value indicating whether MP3 copyright tag enabled.

public bool Copyright { get; set; }

Property Value

bool

DisableShortBlocks

Gets or sets a value indicating whether MP3 short blocks disabled.

public bool DisableShortBlocks { get; set; }

Property Value

bool

Remarks

Encodes all frames using long blocks only. This could increases quality when encoding at very low bitrates, but can produces serious pre-echo artifacts.

EnableXingVBRTag

Gets or sets a value indicating whether MP3 Xing VBR tag enabled.

public bool EnableXingVBRTag { get; set; }

Property Value

bool

EncodingQuality

Gets or sets MP3 encoding quality.

public int EncodingQuality { get; set; }

Property Value

int

Remarks

Bit rate is of course the main influence on quality. The higher the bit rate, the higher the quality. However, for a given bit rate, we have a choice of algorithms to determine the best scale factors and Huffman encoding (noise shaping). 0: Use slowest and best possible version of all algorithms. 0 and 1 are slow and may not produce significantly higher quality. 2: Recommended. 5: Default value. Good speed, reasonable quality. 7: Very fast, ok quality. (psycho acoustics are used for pre-echo and M/S, but no noise shaping is done. 9: Disables almost all algorithms including psy-model. Results as poor quality.

ForceMono

Gets or sets a value indicating whether multi-channel audio will be downmuxed to mono.

public bool ForceMono { get; set; }

Property Value

bool

KeepAllFrequencies

Gets or sets a value indicating whether all frequiencies will be saved.

public bool KeepAllFrequencies { get; set; }

Property Value

bool

Remarks

Keeps all frequencies. (Disables all filters). MP3 will automatically apply various types of lowpass filters. This is because the high frequency coefficients can take up a lot of bits that would be better used for lower, more important frequencies. This property will disable all lowpass filtering. Not recommended.

ModeFixed

Gets or sets a value indicating whether "Mode fixed" tag enabled.

public bool ModeFixed { get; set; }

Property Value

bool

Original

Gets or sets a value indicating whether original tag enabled.

public bool Original { get; set; }

Property Value

bool

SampleRate

Gets or sets sample rate for the MP3.

public int SampleRate { get; set; }

Property Value

int

StrictISOCompliance

Gets or sets a value indicating whether ISO compliance flag enabled.

public bool StrictISOCompliance { get; set; }

Property Value

bool

StrictlyEnforceVBRMinBitrate

Gets or sets a value indicating whether minimal VBR bitrate will be enforced.

public bool StrictlyEnforceVBRMinBitrate { get; set; }

Property Value

bool

Remarks

This is mainly for use with hardware players that do not support low bit rate mp3. Without this option, the minimum bit rate will be ignored for passages of analog silence, ie when the music level is below the absolute threshold of human hearing (ATH).

UseInAVI

Gets or sets a value indicating whether MP3 encoder will be used during video capture to AVI.

public bool UseInAVI { get; set; }

Property Value

bool

VBR_MaxBitrate

Gets or sets maximum allowed bit rate.

public int VBR_MaxBitrate { get; set; }

Property Value

int

VBR_MinBitrate

Gets or sets minimum allowed bit rate.

public int VBR_MinBitrate { get; set; }

Property Value

int

VBR_Mode

Gets or sets a value indicating whether MP3 VBR mode enabled.

public bool VBR_Mode { get; set; }

Property Value

bool

VBR_Quality

Gets or sets MP3 VBR quality.

public int VBR_Quality { get; set; }

Property Value

int

VoiceEncodingMode

Gets or sets a value indicating whether voice encoding mode enabled.

public bool VoiceEncodingMode { get; set; }

Property Value

bool

Remarks

Experimental voice encoding mode.

Methods

GetInternalTypeVC()

Gets internal output format.

public VideoCaptureOutputFormat GetInternalTypeVC()

Returns

VideoCaptureOutputFormat

Returns VisioForge.Core.Types.VideoCapture.VideoCaptureOutputFormat.

GetInternalTypeVE()

Gets internal output format.

public VideoEditOutputFormat GetInternalTypeVE()

Returns

VideoEditOutputFormat

Returns VisioForge.Core.Types.VideoEdit.VideoEditOutputFormat.

Load(string)

Loads from JSON.

public static MP3Output Load(string json)

Parameters

json string

JSON string.

Returns

MP3Output

The String.

Save()

Saves to JSON.

public string Save()

Returns

string

The String.