Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not downloading when executed via PHP #3131

Closed
evolucja opened this issue Jun 21, 2014 · 0 comments
Closed

Not downloading when executed via PHP #3131

evolucja opened this issue Jun 21, 2014 · 0 comments

Comments

@evolucja
Copy link

@evolucja evolucja commented Jun 21, 2014

When I run test.php:

$cmd = "youtube-dl https://www.youtube.com/watch?v=zyqRNn1ouMU -f 137+bestaudio -    o '/var/zpanel/hostdata/zadmin/public_html/evolucjaeu/d/test.mp4' -v";
exec($cmd ,$op);
print_r($op);

i'm getting:

Array
(
    [0] => [youtube] Setting language
    [1] => [youtube] zyqRNn1ouMU: Downloading webpage
    [2] => [youtube] zyqRNn1ouMU: Downloading video info webpage
[3] => [youtube] zyqRNn1ouMU: Extracting video information
)
0

However when I run the same command via SSH - it works perfectly and downloads the files, then merges it. What can be wrong about it?

This is the output from test.php after running the same command via SSH:

Array
(
    [0] => [youtube] Setting language
    [1] => [youtube] zyqRNn1ouMU: Downloading webpage
    [2] => [youtube] zyqRNn1ouMU: Downloading video info webpage
    [3] => [youtube] zyqRNn1ouMU: Extracting video information
    [4] => [download] /var/zpanel/hostdata/zadmin/public_html/evolucjaeu/d/test.f137.mp4 has already been downloaded
    [5] => [download] /var/zpanel/hostdata/zadmin/public_html/evolucjaeu/d/test.f140.mp4 has already been downloaded
    [6] => [ffmpeg] Merging formats into "/var/zpanel/hostdata/zadmin/public_html/zgrajto_pl/d/test.mp4"
    [7] => [debug] ffmpeg command line: avconv -y -i /var/zpanel/hostdata/zadmin/public_html/evolucjaeu/d/test.f137.mp4 -i /var/zpanel/hostdata/zadmin/public_html/evolucjaeu/d/test.f140.mp4 -c copy /var/zpanel/hostdata/zadmin/public_html/evolucjaeu/d/test.mp4
)

@edit
Okay, solved it - the problem was the folder writing permission.

@evolucja evolucja closed this Jun 21, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.