Youtube-API
Youtube-API copied to clipboard
Can't get it to work
Hello, i installed and added to environment paths ffmpeg and yt-dlp but for some reasons this part of the code $dl->setBinPath($ytdlp);
breaks my php page showing a HTTP ERROR 500, without it says {"error":true,"message":"\"youtube-dl\" executable was not found. Did you forgot to configure it's binary path? ex.: $yt->setBinPath('\/usr\/bin\/youtube-dl') ?."}
I tried to configure it in my own way with $dl->setBinPath("C:\inetpub\wwwroot\yt_api\yt-dlp.exe");
but still doesn't works.
Yeah if you wonder i'm using windows, not linux
Never tested it on Windows so mhm
Did you try
$dl->setBinPath("C:\inetpub\wwwroot\yt_api");
or
$dl->setBinPath("C:\\inetpub\\wwwroot\\yt_api\\yt-dlp.exe");
Like only the folder or double quotes (not sure if that'll work)
Never tested it on Windows so mhm
Did you try
$dl->setBinPath("C:\inetpub\wwwroot\yt_api");
or
$dl->setBinPath("C:\\inetpub\\wwwroot\\yt_api\\yt-dlp.exe");
Like only the folder or double quotes (not sure if that'll work)
Yes i tried tho the bin path is already set on environment variables aswell, but when i use setBinPath i get a error 500... I'm actually sticking with yt-dlp without any kind of php api but this is nasty, it would be way better with your api, also some commands with exec won't work due to permissions so yeah, i'd def stick with your api if i found a way to make it work, i was using it in the past with a linux vps and i loved it but now i'm on a windows vps and i can't switch
Do you have yt-dlp folder added in PATH (, so you also can use it in CLI from anywhere) ?
If you have it in PATH, I don't think you need $dl->setBinPath
EDIT: you could also try forward slashes
$dl->setBinPath("C:/inetpub/wwwroot/yt_api/yt-dlp.exe");
Do you have yt-dlp folder added in PATH (, so you also can use it in CLI from anywhere) ? If you have it in PATH, I don't think you need
$dl->setBinPath
EDIT: you could also try forward slashes
$dl->setBinPath("C:/inetpub/wwwroot/yt_api/yt-dlp.exe");
I got it in my environment variables, i could use it from any directory by just typing "yt-dlp link" in cmd along with ffmpeg
If i get rid of setBinPath the problem seems to be on getVideos
If i get rid of setBinPath the problem seems to be on getVideos
What problem? I think that's progress, and that you don't ned setBinPath
I recommend that you look into running docker on your Windows host, and deploy using that, if possible :)
If i get rid of setBinPath the problem seems to be on getVideos
What problem? I think that's progress, and that you don't ned setBinPath
Notice: Undefined offset: 0 in C:\inetpub\wwwroot\yt_api\mic\convert.php on line 103
Fatal error: Uncaught Error: Call to a member function getError() on null in C:\inetpub\wwwroot\yt_api\mic\convert.php:105 Stack trace: #0 {main} thrown in C:\inetpub\wwwroot\yt_api\mic\convert.php on line 105
If i freeze getError the problem appears to be getVideos, so i guess the functions can't load properly for some reasons, i installed it through composer so i'm sure there's everything included
I recommend that you look into running docker on your Windows host, and deploy using that, if possible :)
Yeah i might eventually try it tho it would be my first time using docker
That looks like it did not find any video's? What video are you trying to convert
I tried with many different videos but everything gives the same, also not sure it's about the video since it cannot even reach getError
Yes, whenever i set the bin path the page returns a 500 error :(
From: Michael V. @.> Sent: Thursday, May 19, 2022 1:02:35 PM To: MichaelBelgium/Youtube-API @.> Cc: sFx @.>; Author @.> Subject: Re: [MichaelBelgium/Youtube-API] Can't get it to work (Issue #34)
Never tested it on Windows so mhm
Did you try
$dl->setBinPath("C:\inetpub\wwwroot\yt_api");
or
$dl->setBinPath("C:\inetpub\wwwroot\yt_api\yt-dlp.exe");
Like only the folder or double quotes (not sure if that'll work)
— Reply to this email directly, view it on GitHubhttps://github.com/MichaelBelgium/Youtube-API/issues/34#issuecomment-1131548301, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ANOMXENCXYWMP2QJS6AU63DVKYNUXANCNFSM5WFLRZRQ. You are receiving this because you authored the thread.Message ID: @.***>
This issue is stale because it has been open for 30 days with no activity.
This issue was closed because it has been inactive for 14 days since being marked as stale.