Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Youtube Downloader

Youtube Downloader Laravel Package

athlon1600/youtube-downloader

Pure-PHP YouTube downloader library that fetches direct stream links (audio-only and combined audio+video) without shelling out to youtube-dl or using JS interpreters. Simple API: getDownloadLinks() and pick the best format URL.

View on GitHub
Deep Wiki
Context7

:tv: PHP based alternative to youtube-dl and yt-dlp. Active and frequently updated! :star:

Frequently asked questions about Youtube Downloader
Can I use this package in a Laravel application without shelling out to youtube-dl?
Yes, this package is a pure PHP implementation with no shell dependencies. It fetches direct stream links entirely within your Laravel app, avoiding external binaries like youtube-dl or yt-dlp.
What Laravel versions does this package support?
The package requires PHP 7.4+ and works seamlessly with Laravel 8.0+ (LTS). It aligns with Laravel’s dependency management via Composer and supports modern features like type declarations for better IDE integration.
How do I handle rate limiting or throttling from YouTube?
YouTube may throttle requests (e.g., 100 kb/s limit). Mitigate this by using Laravel’s retry helper or queue delays (e.g., `delay(60)`) for staggered downloads. Proxy rotation via `Browser::setProxy()` can also help.
Is this package suitable for production use with high download volumes?
For high-volume use, test performance under load as pure PHP may struggle with concurrent downloads. Consider offloading tasks to Laravel Queues and monitor GitHub issues for breaking changes due to YouTube’s frequent API updates.
How do I merge audio and video streams if they’re separate?
This package returns separate audio and combined audio+video streams. To merge them, you’ll need FFmpeg installed on your server. Use FFmpeg CLI commands or a Laravel wrapper like `spatie/laravel-ffmpeg` for automation.
Does this package support live streaming or age-restricted YouTube content?
Live streaming is supported via the `YouTubeStreamer` class, enabling direct playback from your Laravel server. For age-restricted content, manually handle cookies (e.g., export from browsers) or use Laravel’s session management.
What are the legal risks of using this package in a Laravel app?
YouTube’s Terms of Service prohibit scraping, so integration may pose legal risks. Use this package only for internal tools (e.g., moderation, analytics) and consult legal teams before deploying to production, especially for commercial applications.
How do I integrate this with Laravel’s queue system for background downloads?
Wrap the `getDownloadLinks()` method in a Laravel job (e.g., `php artisan make:job DownloadYouTubeVideo`) and dispatch it to the queue. Use `delay()` for staggered processing and handle failures with Laravel’s retry logic.
Are there alternatives to this package for Laravel?
Alternatives include PHP wrappers for `yt-dlp` (e.g., `php-yt-dlp`) or direct API calls via YouTube’s official API (paid). However, this package is unique for being a pure PHP, actively maintained solution without shell dependencies.
How do I store downloaded video metadata in Laravel’s database?
The `VideoInfo` object returned by the package can be serialized and stored in a Laravel database (e.g., JSON column). Use Eloquent models or DTOs to structure metadata for analytics, caching, or auditing.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
besmartand-pro/php-quality-config
sentix/ai-chatbot
terminal42/code-quality-tools
codifyo/ts-generator-bundle
testo/fiber
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity