This article describes how to improve MP3 duration accuracy.
- In most cases, the built-in duration calculation is sufficient and it's not necessary to add the properties described in this article. Only add the properties if you need precise duration.
- Enabling the properties will have a small effect on performance. If you have large MP3 files, the accuracy of the duration will be more apparent.
- To calculate more accurate frame sizes, in Application.xml, add the following properties to the MediaReader/Properties container:
<MediaReader> <!-- Properties defined here will override any properties defined in conf/MediaReaders.xml for any MediaReaders loaded by this applications --> <Properties> <Property> <Name>calculateMoreAccurateFrameSize</Name> <Value>true</Value> <Type>Boolean</Type> </Property> <Property> <Name>calculateMoreAccurateFrameWindow</Name> <Value>200</Value> <Type>Integer</Type> </Property> </Properties> </MediaReader>
If you're having problems or want to discuss this article, post in our forum.