Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
youtube-dl in with PHP script #1925
Comments
|
My PHP knowledge is really really limited but it seems that you're missing the leading |
|
--' (shame) |
|
Apart from the missing quote, you need to use percent, not dollar signs in the filename format. You may also want to escape the pattern, as in
|
With this code I also get this : |
|
Can you post the stderr output that you get? Simply end cmd with |
|
Maybe but I don't know how to use proc_open and if I look to the PHP doc for this that seems complicated to use just for a little script that download youtube videos. And with 2&>1 nothing new append. |
|
Not receiving anything on stderr is highly suspicious, there seems to be something fundamental wrong there. Just to verify, what output do you get for
Also, can you post the entire code you're using somewhere, if possible reduced to a directly runable example? The following code works fine for me and will always output something, even if youtube-dl is changed to fail horribly:
|
|
I get this : Entire code
|
|
There is a typo in the commented youtube-dl line. It should end in Sorry, that was my mistake in the original post. |
|
Answer : |
|
Thanks, that clears up a lot. Your URL is invalid. You can add the Also, you want to define an LC_ALL environment variable. Without it, youtube-dl cannot know the filesystem charset and will use a very limited character set. Simply start $cmd with |
|
Thanks, PEBKAC for me --' |
Hi, I'm creating a PHP script that use youtube-dl
But I always get this
output: array ( ) ret: 1Permission are normaly correct