public class VbriFrame extends Object
In MP3s encoded using the franhofer encoder which variable bit rate the first frame in the file contains a special frame called a Vrbi Frame, instead of audio data (Other Vbr encoders use the more common Xing Frame). This is used to store additional information about the file. The most important aspect for this library is details allowing us to determine the bitrate of a Variable Bit Rate VBR file without having to process the whole file. From http://www.codeproject.com/KB/audio-video/mpegaudioinfo.aspx#SideInfo This header is only used by MPEG audio files encoded with the Fraunhofer Encoder as far as I know. It is different from the XING header. You find it exactly 32 bytes after the end of the first MPEG audio header in the file. (Note that the position is zero-based; position, length and example are each in byte-format.) Position Length Meaning Example 0 4 VBR header ID in 4 ASCII chars, always 'VBRI', not NULL-terminated 'VBRI' 4 2 Version ID as Big-Endian WORD 1 6 2 Delay as Big-Endian float 7344 8 2 Quality indicator 75 10 4 Number of Bytes of Audio as Big-Endian DWORD 45000 14 4 Number of Frames as Big-Endian DWORD 7344 18 2 Number of entries within TOC table as Big-Endian WORD 100 20 2 Scale factor of TOC table entries as Big-Endian DWORD 1 22 2 Size per table entry in bytes (max 4) as Big-Endian WORD 2 24 2 Frames per table entry as Big-Endian WORD 845 26 TOC entries for seeking as Big-Endian integral. From size per table entry and number of entries, you can calculate the length of this field.
Modifier and Type | Field and Description |
---|---|
static int |
MAX_BUFFER_SIZE_NEEDED_TO_READ_VBRI |
Modifier and Type | Method and Description |
---|---|
int |
getAudioSize() |
String |
getEncoder() |
int |
getFrameCount() |
boolean |
isVbr()
Is this VBRIFrame detailing a varaible bit rate MPEG
|
static ByteBuffer |
isVbriFrame(ByteBuffer bb,
MPEGFrameHeader mpegFrameHeader)
IS this a VBRI frame
|
static VbriFrame |
parseVBRIFrame(ByteBuffer header)
Parse the VBRIFrame of an MP3File, cannot be called until we have validated that
this is a VBRIFrame
|
String |
toString() |
public static final int MAX_BUFFER_SIZE_NEEDED_TO_READ_VBRI
public final int getFrameCount()
public final int getAudioSize()
public static VbriFrame parseVBRIFrame(ByteBuffer header) throws InvalidAudioFrameException
InvalidAudioFrameException
public static ByteBuffer isVbriFrame(ByteBuffer bb, MPEGFrameHeader mpegFrameHeader)
bb
- mpegFrameHeader
- public final boolean isVbr()
public String getEncoder()
Copyright © 2005–2020 jthink.net. All rights reserved.