Download the PHP package darkwob/youtube-mp3-converter without Composer
On this page you can find all versions of the php package darkwob/youtube-mp3-converter. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download darkwob/youtube-mp3-converter
More information about darkwob/youtube-mp3-converter
Files in darkwob/youtube-mp3-converter
Package youtube-mp3-converter
Short Description A powerful YouTube to MP3 converter with playlist support, progress tracking, and advanced features
License MIT
Homepage https://github.com/darkwob/youtube-mp3-converter
Informations about the package youtube-mp3-converter
🎵 YouTube to MP3 Converter
A powerful and feature-rich YouTube to MP3 converter library that supports both YouTube and YouTube Music, including playlist functionality, remote conversion, and extensive customization options.
✨ Key Features
- 🎵 Convert YouTube videos to multiple audio formats
- 📑 Full playlist support with customizable filters
- 🎧 YouTube Music support
- 📊 Real-time progress tracking (File-based or Redis)
- 🌐 Remote server conversion support
- 🔒 Token-based security
- 🎯 Clean and modern API
- 🔄 Automatic file cleanup
- 🛠️ Extensive configuration options
- 🚀 Asynchronous processing support
🚀 Installation
Requirements
- PHP >= 7.4
- JSON extension
- FFmpeg (optional, for advanced audio processing)
- Redis (optional, for Redis-based progress tracking)
💻 Basic Usage
Simple Video Conversion
Advanced Configuration
Remote Conversion
Progress Tracking with Redis
🔧 API Reference
YouTubeConverter Class
Main class for video conversion operations.
Methods
processVideo(string $url): array
- Process a single video or playlistgetVideoInfo(string $url): array
- Get video metadatadownloadVideo(string $url, string $id): string
- Download video file
ConverterOptions Class
Configuration options for the converter.
Methods
setAudioFormat(string $format): self
- Set output audio formatsetAudioQuality(int $quality): self
- Set audio quality (0-9)setVideoFormat(string $format): self
- Set video format selectionenableSponsorBlock(): self
- Enable SponsorBlock integrationsetPlaylistItems(string $items): self
- Set playlist items to processsetDateFilter(string $start, string $end): self
- Set date range filtersetFileSizeLimit(string $limit): self
- Set maximum file sizesetOutputTemplate(string $template): self
- Set output filename templatesetProxy(string $proxy): self
- Set proxy serversetRateLimit(int $limit): self
- Set rate limitenableThumbnail(): self
- Enable thumbnail embeddingsetMetadata(array $metadata): self
- Set audio metadata
RemoteConverter Class
Handle remote conversion operations.
Methods
startConversion(string $url, ConverterOptions $options): string
- Start remote conversiongetProgress(string $jobId): array
- Get conversion progressdownloadFile(string $jobId, string $output): bool
- Download converted file
Progress Tracking
Both FileProgress
and RedisProgress
implement ProgressInterface
:
Methods
update(string $id, string $status, float $progress, string $message): void
get(string $id): ?array
delete(string $id): void
getAll(): array
cleanup(int $maxAge = 3600): void
🛠️ Error Handling
The package uses custom exceptions for different error scenarios:
🔒 Security
- Token-based authentication for remote conversion
- Rate limiting support
- Proxy support for restricted networks
- Input validation and sanitization
- Secure file handling
📝 License
This project is licensed under the MIT License - see the LICENSE file for details.
🤝 Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
📚 Documentation
For more detailed documentation and examples, visit our Wiki.
⚠️ Disclaimer
This package is for educational purposes only. Please respect YouTube's terms of service and copyright laws when using this package.
All versions of youtube-mp3-converter with dependencies
norkunas/youtube-dl-php Version ^2.0
ext-json Version *
symfony/process Version ^5.4|^6.0
guzzlehttp/guzzle Version ^7.0
monolog/monolog Version ^2.0|^3.0