Skip to content

download youtube videos in your laravel applications (for personal and educational purposes of course)

License

Notifications You must be signed in to change notification settings

mokhosh/laravel-youtube-downloader

Repository files navigation

download youtube videos in your laravel applications (for personal and educational purposes of course)

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

Installation

You can install the package via composer:

composer require mokhosh/laravel-youtube-downloader

Usage

use Mokhosh\Facades\LaravelYoutubeDownloader;

$videoId = LaravelYoutubeDownloader::getVideoIdFromUrl($youtubeUrl);
$video = LaravelYoutubeDownloader::getYoutubeVideoMeta($videoId);

$formats = $video->streamingData->formats;
$adaptiveFormats = $video->streamingData->adaptiveFormats;

$title = $video->videoDetails->title;
$short_description = $video->videoDetails->shortDescription;
$thumbnails = $video->videoDetails->thumbnail->thumbnails;
$thumbnail = end($thumbnails)->url;
$channel_id = $video->videoDetails->channelId;
$channel_name = $video->videoDetails->author;
$views = $video->videoDetails->viewCount;
$video_duration_in_seconds = $video->videoDetails->lengthSeconds;

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.

About

download youtube videos in your laravel applications (for personal and educational purposes of course)

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages