Skip to content

Laravel YouTube and Online Video viewing and download interface.

License

Notifications You must be signed in to change notification settings

moneya/devtube

 
 

Repository files navigation

Install DevTube Video Downloader

alt text

Install FFMPEG only if you want to convert videos to mp3 etc

Ubuntu:

sudo apt install ffmpeg

Install via composer

composer require devswebdev/devtube

When you install it as a dependency, there need to be a cache directory beside vendor and it should be writable (e.g. chmod 775).

Publish vendor assets

php artisan vendor:publish --provider="DevsWebDev\DevTube\DevTubeServiceProvider"

An Example

namespace App\Http\Controllers;
use DevsWebDev\DevTube\Download;

class YoutubeDownloadController extends Controller
{
    public function download(Request $r)
    {
        $dl = new Download($r->url, $format);

        //Saves the file to specified directory
        $dl->download();

        // Return as a download
        return response()->download($dl->savedPath);

    }
}

About

Laravel YouTube and Online Video viewing and download interface.

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 100.0%