Class MP3Output
MP3 output settings.
Inherited Members
Namespace: VisioForge.Core.Types.Output
Assembly: VisioForge.Core.dll
Syntax
public sealed class MP3Output : IVideoCaptureBaseOutput, IVideoEditBaseOutput
Constructors
MP3Output()
Initializes a new instance of the MP3Output class.
Declaration
public MP3Output()
Properties
CBR_Bitrate
Gets or sets audio MP3 bitrate.
Declaration
public int CBR_Bitrate { get; set; }
Property Value
Type | Description |
---|---|
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.
Declaration
public bool CRCProtected { get; set; }
Property Value
Type | Description |
---|---|
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.
Declaration
public MP3ChannelsMode ChannelsMode { get; set; }
Property Value
Type | Description |
---|---|
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.
Copyright
Gets or sets a value indicating whether MP3 copyright tag enabled.
Declaration
public bool Copyright { get; set; }
Property Value
Type | Description |
---|---|
bool |
DisableShortBlocks
Gets or sets a value indicating whether MP3 short blocks disabled.
Declaration
public bool DisableShortBlocks { get; set; }
Property Value
Type | Description |
---|---|
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.
Declaration
public bool EnableXingVBRTag { get; set; }
Property Value
Type | Description |
---|---|
bool |
EncodingQuality
Gets or sets MP3 encoding quality.
Declaration
public int EncodingQuality { get; set; }
Property Value
Type | Description |
---|---|
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.
Declaration
public bool ForceMono { get; set; }
Property Value
Type | Description |
---|---|
bool |
KeepAllFrequencies
Gets or sets a value indicating whether all frequiencies will be saved.
Declaration
public bool KeepAllFrequencies { get; set; }
Property Value
Type | Description |
---|---|
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.
Declaration
public bool ModeFixed { get; set; }
Property Value
Type | Description |
---|---|
bool |
Original
Gets or sets a value indicating whether original tag enabled.
Declaration
public bool Original { get; set; }
Property Value
Type | Description |
---|---|
bool |
SampleRate
Gets or sets sample rate for the MP3.
Declaration
public int SampleRate { get; set; }
Property Value
Type | Description |
---|---|
int |
StrictISOCompliance
Gets or sets a value indicating whether ISO compliance flag enabled.
Declaration
public bool StrictISOCompliance { get; set; }
Property Value
Type | Description |
---|---|
bool |
StrictlyEnforceVBRMinBitrate
Gets or sets a value indicating whether minimal VBR bitrate will be enforced.
Declaration
public bool StrictlyEnforceVBRMinBitrate { get; set; }
Property Value
Type | Description |
---|---|
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.
Declaration
public bool UseInAVI { get; set; }
Property Value
Type | Description |
---|---|
bool |
VBR_MaxBitrate
Gets or sets maximum allowed bit rate.
Declaration
public int VBR_MaxBitrate { get; set; }
Property Value
Type | Description |
---|---|
int |
VBR_MinBitrate
Gets or sets minimum allowed bit rate.
Declaration
public int VBR_MinBitrate { get; set; }
Property Value
Type | Description |
---|---|
int |
VBR_Mode
Gets or sets a value indicating whether MP3 VBR mode enabled.
Declaration
public bool VBR_Mode { get; set; }
Property Value
Type | Description |
---|---|
bool |
VBR_Quality
Gets or sets MP3 VBR quality.
Declaration
public int VBR_Quality { get; set; }
Property Value
Type | Description |
---|---|
int |
VoiceEncodingMode
Gets or sets a value indicating whether voice encoding mode enabled.
Declaration
public bool VoiceEncodingMode { get; set; }
Property Value
Type | Description |
---|---|
bool |
Remarks
Experimental voice encoding mode.
Methods
GetInternalTypeVC()
Gets internal output format.
Declaration
public VideoCaptureOutputFormat GetInternalTypeVC()
Returns
Type | Description |
---|---|
VideoCaptureOutputFormat | Returns VideoCaptureOutputFormat. |
GetInternalTypeVE()
Gets internal output format.
Declaration
public VideoEditOutputFormat GetInternalTypeVE()
Returns
Type | Description |
---|---|
VideoEditOutputFormat | Returns VideoEditOutputFormat. |
Load(string)
Loads from JSON.
Declaration
public static MP3Output Load(string json)
Parameters
Type | Name | Description |
---|---|---|
string | json | JSON string. |
Returns
Type | Description |
---|---|
MP3Output | The string. |
Save()
Saves to JSON.
Declaration
public string Save()
Returns
Type | Description |
---|---|
string | The string. |