Skip to content

essencevsyoutube-dl

BSD-2-Clause 24 2 769
123 (month) Mar 02 2013 3.5.4(3 years ago)
131,198 30 4199 Unlicense
Feb 22 2012 445.3 thousand (month) 2021.12.17(2 years ago)

Essence is a simple PHP library to extract media information from websites, like youtube videos, twitter statuses or blog articles.

youtube-dl is a command-line utility and a library for downloading multimedia content from various websites, including YouTube, Vimeo, TikTok, and many others. It supports a wide range of video and audio formats, and can be used to download both live streams and on-demand videos. The library is written in Python and can be easily integrated into other Python projects. Youtube-dl contains open-source scrapers for hundreds of websites and is a great educational source for understanding how to scrape many popular websites.

Highlights


popularcomplex

Example Use


<?php
$Essence = new Essence\Essence();
$Media = $Essence->extract('http://www.youtube.com/watch?v=39e3KYAmXK4');

var_dump($Media);
// will result in array of values:
// type
// version
// url
// title
// description
// authorName
// authorUrl
// providerName
// providerUrl
// cacheAge
// thumbnailUrl
// thumbnailWidth
// thumbnailHeight
// html
// width
// height
CLI:
$ youtube-dl 'https://www.youtube.com/watch?t=4&v=BaW_jenozKc'
Library:
import youtube_dl

# define the download options
options = {
    'outtmpl': '%(title)s.%(ext)s',
    'format': 'best',
    'postprocessors': [{
        'key': 'FFmpegExtractAudio',
        'preferredcodec': 'mp3',
        'preferredquality': '192',
    }]
}

# download the video
with youtube_dl.YoutubeDL(options) as ydl:
    ydl.download(['https://www.youtube.com/watch?v=dQw4w9WgXcQ'])

Alternatives / Similar


Was this page helpful?