Download the PHP package devswebdev/devtube without Composer
On this page you can find all versions of the php package devswebdev/devtube. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download devswebdev/devtube
More information about devswebdev/devtube
Files in devswebdev/devtube
Package devtube
Short Description A Laravel package for downloading videos from the net by simply passing a URL
License MIT
Informations about the package devtube
DevTube
A Laravel package for downloading videos (and extracting audio) from the web by passing a URL. DevTube is a thin, modern wrapper around the yt-dlp binary via norkunas/youtube-dl-php.
Requirements
- PHP 8.3+
- Laravel 12 or 13
- The
yt-dlpbinary available on your server ffmpeg(only required for audio extraction, e.g. converting tomp3)
Installing the binaries
Confirm the binary location so it matches your config:
Installation
The package registers itself automatically (service provider + DevTube facade alias) via Laravel package discovery.
Publish the config file:
This publishes config/devtube.php.
Configuration
Set the binary path via .env if needed:
Usage
download() returns an Illuminate\Support\Collection of DevsWebDev\DevTube\MediaFile objects. Each MediaFile exposes:
| Member | Type | Description |
|---|---|---|
$media->title |
?string |
The resolved title (null on failure) |
$media->file |
?SplFileInfo |
The downloaded file (null on failure) |
$media->error |
?string |
Error message for this item, or null |
$media->path() |
?string |
Absolute path to the file, or null |
$media->wasSuccessful() |
bool |
Whether this item downloaded successfully |
Using the facade
Using the Download class
The third argument is an absolute download directory override. When omitted, files are saved under storage_path(config('devtube.download_path')), creating the directory if needed:
Using the Artisan command
The command prints a table of results and exits non-zero if any item failed.
Error handling
- Per-video problems (e.g. an unavailable video in a playlist) surface as a
MediaFilewith a non-nullerrorandwasSuccessful() === false. Always checkwasSuccessful()before usingpath(). - Hard failures (missing binary, unwritable directory, or a failed
yt-dlpprocess) throwDevsWebDev\DevTube\Exceptions\DownloadException.
Upgrading from 2.x to 3.0
3.0 is a breaking release that replaces the old, unmaintained download engines with a single yt-dlp-based engine.
Requirements
- PHP 8.3+ and Laravel 12/13 are now required.
- Install the
yt-dlpbinary (replacingyoutube-dl). Pointbin_pathat it. If you still useyoutube-dl, setbin_pathto that binary — butyt-dlpis recommended.
Removed
- The
masih/youtubedownloaderandathlon1600/youtube-downloaderdependencies, the custom cURL scraper, and the internal classesMediaDownload,DownloadConfig, andHelperTrait.
Results are objects, not arrays
download()now returns aCollectionofMediaFileobjects. Replace array access with object access:
Config file changed
config/devtube.phpwas rewritten with new keys (bin_path,download_path,default_format,output_template,formats). Old keys were removed. Re-publish the config and re-apply your settings:
New entry points
- A
DevTubefacade and adevtube:downloadArtisan command were added. TheDownloadclass and its->download()method are still available.
Testing
License
The MIT License (MIT). Please see the License File for more information.
All versions of devtube with dependencies
illuminate/console Version ^12.0|^13.0
illuminate/support Version ^12.0|^13.0
norkunas/youtube-dl-php Version ^2.0