libZPlay documentation (Win32)
IndexReferenceHome
PreviousUpNext
MP3

MPEG-1, MPEG-2, MPEG 2.5 - Layer I, Layer II, Layer III

Mp3 support is provided by libmad - MPEG audio decoder library 

Decoder 
MP3 
File extension 
mp3, mp2, mp1 
Description 
MPEG-1 and the MPEG-2 extension to Lower Sampling Frequencies, as well as the so-called MPEG 2.5 format. All three audio layers (Layer I, Layer II,and Layer III a.k.a. MP3) are fully implemented. Support free format bitstream. MAD does not yet support MPEG-2 multichannel audio (although it should be backward compatible with such streams) nor does it currently support AAC. 
Supported by 
Web 
Email 
Copyright © 
2000-2004 Underbit Technologies, Inc. GNU General Public License 
Info tags 
Supported by ID3v1, ID3v2.2, ID3v2.3, ID3v2.4 
Reverse playing 
Supported by prescanning whole stream and decoding mp3 frames backward with frame overlap. 
Accurate length 
Supported. Please read Remarks section. 
Accurate seek 
Supported. Please read Remarks section. 
BPM detection 
Supported. 
Gapless playing 
Supported. Please read Remarks section. 
Dynamic streams 
Supported. 
Format autodetection 
Supported by analyzing file extension and detecting ID3v2 tag at stream beginning. 
Audio autodetection 
Supported by analyzing mp3 frame header (samplerate, channel number). 
Supported channels 
1 channel (mono), 2 channels (stereo) 
Recording/Encoder 
Supported by LAME encoder
Accurate length enabled

Note: This feature is fully supported if LAME INFO tag is found to detect encoder delay and padding samples. 

To enable sample accurate length you need to use SetSettings function and enable accurate seek using TSettingID sidAccurateLength parameter. This will enable "sample" accurate length by scaning stream and counting all mp3 frames. If there is no LANE tag in stream, encoder delay and padding samples will not be consider and length will be inaccurate. 

Note: By default, sample accurate length is NOT enabled. 

 

Accurate length disabled

If sample accurate length in not enabled, length is calculated from XING header, if XING header exists. If there is no XING header, length is calculated from stream size and size of first valid mp3 frame. On streams with constant bitrate this method is sample accurate. On streams with variable bitrate without XING header this method is inaccurate, very inaccurate. 

 

Accurate seek enabled

Note: This feature is fully supported if LAME INFO tag is found to detect encoder delay and padding samples. 

To enable sample accurate seek you need to use SetSettings function and enable accurate seek using TSettingID sidAccurateSee parameter. This will enable "sample" accurate seek by scaning stream and detecting all mp3 frames up to specified position. If there is no LANE tag in stream, encoder delay and padding samples will not be consider and seek will be inaccurate. 

Note: By default, sample accurate seek is NOT enabled. 

 

Accurate seek disabled

If sample accurate seek in not enabled, seek position is calculated from XING header, if XING header exists. If there is no XING header, seek position is calculated from stream size using linear interpolation. On streams with constant bitrate this method is quite accurate, but not sample accurate. On streams with variable bitrate without XING header this method is inaccurate. 

 

Gapless playing

Note: This feature is fully supported if LAME INFO tag is found to detect encoder delay and padding samples. 

Gapless plaing is supported only if stream has LAME tag because we need encoder delay and padding samples to calculate correct song length and implement gapless transition from one song to another song. If there is no LAME INFO tag, encoder delay and padding samples will not be consider and some blank samples will be inserted between two song.

Free format bistream is supported (bitrate over 320 kbps and bitrate outside standard bitrates defined by MPEG standard). 

 

Copyright (c) 2010. Zoran Cindori - All rights reserved.

Web: http://libzplay.sourceforge.net/

Email: zcindori@inet.hr