Weave 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 Laravel Package

athlon1600/youtube-downloader

A pure PHP YouTube downloader with no JavaScript interpreters, shell calls, or heavy dependencies. Fetch video and audio stream links via a simple API, with built-in exception handling. Actively maintained.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit

  • The package's core architectural proposition is credible and differentiating: pure PHP, Composer-installable, no JS interpreter, no shell-outs, no youtube-dl/yt-dlp binary to ship, patch, and defend in a container. For a Laravel estate under security review, eliminating exec() and a vendored Python binary removes an entire category of findings and CVE-tracking obligations.
  • The v4 public surface is small and object-oriented: YouTubeDownloader::getDownloadLinks() returns a DownloadOptions aggregate of StreamFormat objects plus a VideoInfo object, with helpers (getCombinedFormats(), getFirstCombinedFormat()) and typed exceptions. That is easy to wrap in a Laravel service class and mock behind an interface.
  • Critical caveat: there is no Laravel glue — no service provider, facade, config file, or publishable assets. We own the binding, configuration, exception translation, and timeout policy. That is a day of work, not a blocker, but "install the package" is not "ship the feature."
  • The library ships its own cURL HTTP client (Browser via php-curl-file-downloader) rather than using Guzzle or Illuminate\Http\Client. It therefore bypasses Laravel's HTTP middleware, retry helpers, Http::fake(), and structured logging. Outbound traffic policy and observability must be built around it, not inside it.

Integration feasibility

  • Single-step install via composer require athlon1600/youtube-downloader ^4.0. The PHP ^7.4 || ^8.0 floor is moot on a current stack (Laravel 10+ already requires 8.1+), and the dependency graph is genuinely thin, so conflict risk is low.
  • The real constraint is functional ceiling, and the project's own To-Do list is the most honest disclosure we have: private videos unsupported, no captcha or 429 Too Many Requests mitigation, no separate audio+video muxing via ffmpeg, and known ~100 kb/s throttling for many videos. Several of these are not nice-to-haves — the missing DASH merge caps practical output quality, and captcha/429 handling determines whether the thing works at any volume.
  • YouTubeStreamer proxies an arbitrary googlevideo.com URL passed by the caller. Release v3.1.1 already patched a security issue around passing URLs to the demo stream.php. Exposed to users without host allowlisting and signature validation, this is an SSRF and open-relay risk. Treat as a server-side, trusted-input-only component.

Technical risk

  • Adversarial dependency: the package is a scraper in a permanent arms race with an undocumented, actively changing YouTube front end. Release history is dominated by breakage fixes — cipher → signatureCipher renames, signature-decoder regex updates, player_response parsing failures, get_video_info 404 regressions. Reliability is a function of one maintainer's reaction time, not of our engineering.
  • Bus factor: 934 stars, MIT, active releases and CI, but zero recorded dependents — thin ecosystem validation. Effectively a single-maintainer project. If maintenance stops, we inherit a scraped-YouTube parser we cannot realistically own.
  • Legal/product risk: the README's disclaimer restricts the tool to personal use and explicitly states that downloading copyrighted material violates YouTube's Terms of Service. This is a decision for legal, not engineering, and it may invalidate the intended use case entirely.

Key questions

  1. Has Legal signed off on the ToS position for the specific use case (user-initiated personal downloads vs. server-side caching/redistribution)?
  2. What is our tolerated breakage SLA, and do we need a fallback extractor (a yt-dlp sidecar or hosted API) behind the same interface?
  3. Do we need pre-merged A/V at >720p, which the package cannot produce today?
  4. What request volume, and are we willing to run rotating egress IPs/proxies (the Browser supports proxying since v2.0.8) to survive throttling and 429s?
  5. Will we pass YouTube account cookies for age-restricted content, and if so, whose account and under what security controls?
  6. Who on our side owns patching when YouTube changes its player JS — us, or the upstream maintainer with our PRs?

Integration Approach

Stack fit

  • Clean fit for a Laravel 10/11 app: bind a YouTubeDownloaderInterface in a service provider, resolve a configured singleton, translate YouTubeException into domain exceptions, and expose the feature behind a queued job rather than a synchronous controller action. The library's synchronous cURL calls must not run in a user-facing request cycle.
  • The extracted data model maps well to Eloquent: persist VideoInfo metadata and StreamFormat rows (itag, mime type, quality, expiry) so the UI can render format choices without re-scraping.

Migration path

  • If a yt-dlp/youtube-dl binary exists today, do not rip it out. Define the interface first, implement AthlonDownloaderAdapter and keep the existing binary implementation as YtDlpAdapter. Route traffic by config flag and canary percentage. This gives a one-line rollback and turns the buy-vs-build question into a runtime decision.
  • Cache aggressively: googlevideo URLs carry short expiry, so store metadata longer than links and refresh only at download time.

Compatibility

  • Verify curl extensions and outbound TLS in the runtime image; the bundled client uses cURL directly, so any HTTP proxy or egress policy must be configured through Browser, not through Laravel's HTTP client config.
  • No database, queue, or cache assumptions in the package itself — it is stateless and horizon-agnostic, which keeps deployment simple.

Sequencing

  1. Spike (2–3 days): prove extraction works against 20–30 representative videos (public, age-restricted, long, region-restricted, live) in our actual network egress. Measure success rate and latency before committing.
  2. Contract: define the interface, DTOs, and exception taxonomy; wire the service provider and config.
  3. Async path: queued job with timeouts, retries, and rate limiting; per-video and global concurrency caps.
  4. Storage/serving: download-and-store or proxy-stream decision, with host allowlisting.
  5. Observability: success/failure metrics, breakage alerting on extraction failure rate.
  6. Fallback and rollout: adapter switch, canary, then default.

Operational Impact

Maintenance

  • Budget for reactive maintenance, not routine maintenance. Expect periodic emergency releases when YouTube changes its player payload; our upgrade cadence will be driven by upstream, and pinning versions is dangerous because pinning means staying broken. Recommend: unpinned minor range, a scheduled weekly upgrade check, and a smoke test in CI that extracts a real video.
  • Note the dataset lists a last release of 2026-06-01; verify actual cadence on Packagist/GitHub before relying on the "actively maintained" claim, since release-date metadata in this evaluation is unreliable.

Support

  • Support burden falls in two places: (a) end users reporting "this video doesn't work," which we cannot fix and must degrade gracefully on; (b) internal on-call triage distinguishing YouTube breakage from our own bugs. Build a diagnostic that logs the failure class (consent wall, 429, signature parse failure, unsupported format) so triage is minutes, not hours.
  • No commercial support, no vendor SLA. Support is community issues only.

Scaling

  • Every extraction is an outbound scrape tied to our egress IP. Scale is bounded by YouTube's tolerance, not by our CPU. Design for a shared extraction cache keyed by video ID to collapse duplicate work, and a global rate limiter to avoid self-inflicted 429s.
  • Bandwidth is the second ceiling: the documented ~100 kb/s throttle means proxy-streaming large files through PHP-FPM can pin workers. Prefer short-lived redirect to the CDN URL where policy allows, and use queue workers with generous timeouts where it does not.
  • Horizontal scale of the PHP tier does not solve IP reputation; that requires proxies or a sidecar, which is a cost line to model explicitly.

Failure modes

  • Silent partial failures: format list returned but only audio-only streams, or a stream URL that expires mid-download.
  • Consent-wall/region redirects producing empty or malformed responses.
  • Captcha/429 after a traffic spike — a self-reinforcing failure where retries make it worse.
  • Upstream parser breakage producing a hard 100% failure with no degradation path if we have no fallback adapter.
  • SSRF exposure if the streaming endpoint is ever fed user-supplied URLs.

Ramp-up

  • Learning curve for our engineers is shallow — a small, typed API and a clear README, roughly one developer-day to a working integration, two to a production-grade queued one.
  • The domain knowledge is the opposite: signature ciphers, player-response parsing, and YouTube bot detection are deep and are not transferable to us at reasonable cost. Plan to consume upstream fixes rather than produce them; retain the ability to file and test PRs, but do not staff for it.
  • Recommended posture: adopt as a reversible dependency behind our own abstraction, with legal sign-off and a named fallback extractor as explicit exit criteria — not as a load-bearing, single-source component of a revenue path.
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.
steadrun/laravel-monitor
labyrinthe/connect-laravel
elmogy/layan
drewdan/sentinel-client
dskripchenko/laravel-llm
fatryst/nuonuo
stevenay/myanfont
gmostafa/php-graphql-client
xeviant/paystack
snowsoft/faker
meditationsteps/blogetc
animalyoung/laravel-influxdb
onix-solutions/sms-telera
lonely-lights/prosetta
oxygen/data
oxygen/core
jengo/base
xiloryx/log-collector
a21ns1g4ts/filament-stripe
la-php/laravel-admin