node-taglib-sharp / Exports / MpegAudioHeader
Provides information about an MPEG audio stream. For more information and definition of the header, see http://www.mpgedit.org/mpgedit/mpeg_format/mpeghdr.htm
- audioBitrate
- audioChannels
- audioSampleRate
- channelMode
- description
- durationMilliseconds
- isCopyrighted
- isOriginal
- isProtected
- layer
- mediaTypes
- vbrHeader
- version
• get audioBitrate(): number
Bitrate of the audio in kilobits per second represented by the current instance.
number
• get audioChannels(): number
Number of channels in the audio represented by the current instance.
number
• get audioSampleRate(): number
Sample rate of the audio represented by the current instance.
number
• get channelMode(): MpegAudioChannelMode
Gets the MPEG audio channel mode of the audio represented by the current instance.
• get description(): string
Gets a text description of the media represented by the current instance.
string
• get durationMilliseconds(): number
Duration of the media in milliseconds represented by the current instance.
number
IAudioCodec.durationMilliseconds
• get isCopyrighted(): boolean
Whether the current audio is copyrighted.
boolean
• get isOriginal(): boolean
Whether the current audio is original.
boolean
• get isProtected(): boolean
Gets whether the audio represented by the current instance is protected by CRC.
boolean
• get layer(): number
Gets the MPEG audio layer used to encode the audio represented by the current instance.
number
• get mediaTypes(): MediaTypes
Types of media represented by the current instance, bitwise combined.
• get vbrHeader(): default
Gets the variable bitrate header (VBR) if the MPEG audio frame contains one.
default
• get version(): MpegVersion
Gets the MPEG version used to encode the audio represented by the current instance.
▸ Static fromFile(file, searchStart, searchEnd, streamBytes?): MpegAudioHeader
Constructs an MPEG audio header by searching the provided file for an MPEG sync signature and reading the header that immediately follows.
| Name | Type | Description |
|---|---|---|
file |
File |
File from which to read the audio header |
searchStart |
number |
Offset into the file to begin searching |
searchEnd |
number |
Offset into the file to stop searching |
streamBytes? |
number |
Total number of bytes in the audio stream. Used to calculate duration if a VBR header does not additionally specify it. If VBR header is not present and streamBytes is undefined, then duration will be 0. |
MpegAudioHeader Header as read from the file, undefined if not found.