Giter Site home page Giter Site logo

Comments (12)

norkunas avatar norkunas commented on May 30, 2024 1

Hello, are you sure that your downloadPath exists? Did you set it?

from youtube-dl-php.

garry911 avatar garry911 commented on May 30, 2024

Yes I set it now . I have used your example .
$yt->setBinPath('C:\xampp\htdocs\nork\usr\local\bin');
$yt->setDownloadPath('D:/');
$video = $yt->download('https://www.youtube.com/watch?v=C1Tcfn2ZEgg');

// The above video link is working using cmd .
// but here it is facing some error .

Fatal error: Uncaught Symfony\Component\Process\Exception\ProcessFailedException: The command ""/usr/bin/youtube-dl" "https://www.youtube.com/watch?v=C1Tcfn2ZEgg" --no-playlist --ignore-config --write-info-json" failed. Exit Code: 1(General error) Working directory: D:/ Output: ================ Error Output: ================ The system cannot find the path specified. in C:\xampp\htdocs\nork\vendor\symfony\process\Process.php:223 Stack trace: #0 C:\xampp\htdocs\nork\vendor\norkunas\youtube-dl-php\src\YoutubeDl.php(154): Symfony\Component\Process\Process->mustRun(Object(Closure)) #1 C:\xampp\htdocs\nork\index.php(13): YoutubeDl\YoutubeDl->download('https://www.you...') #2 {main} thrown in C:\xampp\htdocs\nork\vendor\symfony\process\Process.php on line 223

from youtube-dl-php.

garry911 avatar garry911 commented on May 30, 2024

and also can i get the subtitles of the videos using this library ?

from youtube-dl-php.

norkunas avatar norkunas commented on May 30, 2024

@garry911 your call to setBinPath should look like: $yt->setBinPath('C:/xampp/htdocs/nork/usr/local/bin/youtube-dl.exe'); if that's where you store your youtube-dl binary file.

from youtube-dl-php.

norkunas avatar norkunas commented on May 30, 2024

About subtitles, you can use these options:

'write-sub' => 'bool',
'write-auto-sub' => 'bool',
'all-subs' => 'bool',
'sub-format' => 'string',
'sub-lang' => 'string',

from youtube-dl-php.

garry911 avatar garry911 commented on May 30, 2024

Hi ,
Thanks for the help i can use getExtractorsList() , now .
👍

Thanks .

from youtube-dl-php.

garry911 avatar garry911 commented on May 30, 2024

Hi ,
when i use this command ( to extract subtitles ) i get the error .

Fatal error:
The command ""C:/xampp/htdocs/nork/usr/local/bin/youtube-dl.exe" --list-subs" failed. Exit Code: 2(Misuse of shell builtins) .

WARNING: Long argument string detected. Use -- to separate parameters and URLs, like this: youtube-dl -- --list-subs Usage: youtube-dl.exe [OPTIONS] URL [URL...] youtube-dl.exe: error: You must provide at least one URL. Type youtube-dl --help to see a list of all options. in

Thanks

from youtube-dl-php.

norkunas avatar norkunas commented on May 30, 2024

Hi, how did you write it? Because from what can I see you didn't provide the url from where extract subtitles

from youtube-dl-php.

garry911 avatar garry911 commented on May 30, 2024

I have made the correction now and calling download method with url .
i need to have subtitles with skip download option .
how can i speed up its performance while extracting all subs in srt format .

from youtube-dl-php.

norkunas avatar norkunas commented on May 30, 2024

Did you try to instantiate it like?:

$dl = new YoutubeDl([
    'skip-download' => true,
    'all-subs' => true,
]);

I don't know if youtube-dl itself supports download subtitles without video, but still worth to try :)

from youtube-dl-php.

garry911 avatar garry911 commented on May 30, 2024

Thanks for the help .
its working fast on my localhost .
👍
thanks

from youtube-dl-php.

garry911 avatar garry911 commented on May 30, 2024

Hello .

the script runs fine on localhost .
Fatal error on server .
Fatal error: in /var/www/html/apps/subs/vendor/symfony/process/Process.php on line 223

can you please help me out :)

Thanks .

from youtube-dl-php.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.