Weave Code
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 Dl Bundle Laravel Package

das-l/youtube-dl-bundle

View on GitHub
Deep Wiki
Context7

youtube-dl bundle

Symfony bundle that provides service injection and config for norkunas/youtube-dl-php, a PHP wrapper for youtube-dl or yt-dlp.

Service config provided

services:
    # ...
    das_l_youtube_dl:
        class: YoutubeDl\YoutubeDl
        arguments:
            - '@das_l_youtube_dl.process_builder'
            - '@das_l_youtube_dl.metadata_reader'
            - '@filesystem'
        calls:
            - setBinPath: ['%das_l_youtube_dl.binPath%']
            - setPythonPath: ['%das_l_youtube_dl.pythonPath%']

    das_l_youtube_dl.process_builder:
        class: YoutubeDl\Process\DefaultProcessBuilder

    das_l_youtube_dl.metadata_reader:
        class: YoutubeDl\Metadata\DefaultMetadataReader

Service usage

Note: For more details on the usage of the library itself, check out the documentation provided by norkunas/youtube-dl-php.

services:
    # ...
    App\Foo\YouTubeFoo:
        arguments:
            - '@das_l_youtube_dl'
<?php

namespace App\Foo;

use YoutubeDl\Options;
use YoutubeDl\YoutubeDl;

class YouTubeFoo
{
    private $youtubeDl;

    public function __construct(YoutubeDl $youtubeDl)
    {
        $this->youtubeDl = $youtubeDl;
    }

    public function downloadVideo($downloadPath, $url)
    {
        $options = Options::create()
            ->downloadPath($downloadPath)
            ->url($url)
        ;

        $collection = $this->youtubeDl->download($options);

        // ...
    }
}

Config options

das_l_youtube_dl:
    binPath: '/your/custom/bin/path/youtube-dl'
    pythonPath: '/your/custom/path/for/python'
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.
cuci/prototurk-sdk-symfony
clementtalleu/easyadmin-markdown-bundle
codeflextech/permission-manager
karnoweb/livewire-datepicker
sayedenam/sayed-dashboard
milito/query-filter
apiboxsym/user-bundle
apiboxsym/health-check-bundle
jayeshmepani/jpl-moshier-ephemeris-php
elnasnato/laraliveui
labrodev/rest-sdk
sampaui/sampaui
babelqueue/php-sdk
facebook/capi-param-builder-php
babelqueue/symfony
hamzi/corewatch
minionfactory/raw-hydrator
hexters/coinpayment
rjcodes/rjcms
act-training/laravel-permissions-manager