A Python tool designed to validate and analyze MP3 files in bulk. This tool helps identify potential issues in audio files by checking playability, detecting audio quality problems, and generating comprehensive reports.
-
File Validation
- Checks if MP3 files are playable
- Validates file format and structure
- Examines audio metadata
-
Audio Analysis
- Detects audio clipping issues
- Identifies silent segments
- Analyzes audio quality metrics
-
Reporting
- Generates detailed Excel reports
- Includes file-by-file analysis
- Provides summary statistics
-
User Experience
- Progress bar for processing status
- Colorized console output
- Detailed error messages
- Supports batch processing
- Python 3.7 or higher
- FFmpeg (included in executable version)
- Required Python packages:
mutagen pydub pandas numpy openpyxl tqdm
- Download
check_music_validity.exe
from the latest release - Run directly - no installation needed!
-
Clone the repository:
git clone https://github.com/Astraaaaaaa/test-music-validity.git cd test-music-validity
-
Install dependencies:
pip install -r requirements.txt
-
(Optional) Build executable:
pyinstaller test-music-validity.py --onefile --icon=icon.ico --name=check_music_validity
Basic usage:
python test-music-validity.py --input "path/to/music/folder" --output "report.xlsx"
Or with executable:
check_music_validity.exe --input "path/to/music/folder" --output "report.xlsx"
Argument | Description | Required | Default |
---|---|---|---|
--input |
Input folder path | Yes | - |
--output |
Output Excel file | No | report.xlsx |
The Excel report includes:
Column | Description |
---|---|
File Name | Name of the MP3 file |
File Path | Full path to the file |
Playable | Whether the file can be played |
Duration (s) | Length of the audio in seconds |
Clipping Count | Number of detected clipping instances |
Silent Segments | Number of silent segments detected |
Bitrate | Audio bitrate in kbps |
Sample Rate | Sample rate in Hz |
Error Message | Any errors encountered during analysis |
Processing files: 100%|██████████| 50/50 [00:30<00:00, 1.67file/s]
Summary Report:
Total files processed: 50
Playable files: 48
Files with clipping: 3
Unplayable files: 2
Report saved to: report.xlsx
Contributions are welcome! Here's how you can help:
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature
) - Commit your changes (
git commit -m 'Add some AmazingFeature'
) - Push to the branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- pydub for audio processing
- mutagen for MP3 metadata handling
- pandas for data processing
- FFmpeg for audio file handling
Astra - astralee95@gmail.com
Project Link: https://github.com/Astraaaaaaa/test-music-validity
- v1.0.0
- Initial release
- Basic MP3 validation features
- Excel report generation