#13 #24 Fix invalid duration due to difference in first N frames. Solution: read few frames and compute duration based on the last frame data.

This commit is contained in:
wapmorgan
2023-05-28 21:04:09 +03:00
parent cbbd6b306b
commit 534c3052d4
3 changed files with 16 additions and 5 deletions

View File

@@ -115,6 +115,12 @@ php bin/scan ./
- `Mp3Info::isValidAudio($filename)`
Static method that checks if file `$filename` looks like a mp3-file. Returns `true` if file looks like a mp3, otherwise false.
### Settings
You can adjust some variables to reconfigure before instantiating of object:
- `Mp3Info::$headerSeekLimit` - count of bytes to search for the first mpeg header in audio. Default: `2048` (bytes).
- `Mp3Info::$framesCountRead` - count of mpeg frames to read before compute audio duration. Default: `2` (frames).
## Technical information
Supporting features:
* id3v1