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

Trying to convert a YT video to MP3, it works when using the command line in console, it "skips" the last step when using shell_exec() or something similar #3452

Closed
Alchemystic opened this issue Aug 5, 2014 · 2 comments

Comments

@Alchemystic
Copy link

@Alchemystic Alchemystic commented Aug 5, 2014

I end up with only a .m4a file in my /tmp/ folder when using shell_exec() from a .php file. When I use putty the .mp3 file is created too. I'm using CentOS 6.5

Command line I'm using:

youtube-dl -x --audio-format "mp3" --no-post-overwrites -o "/tmp/%(id)s.%(ext)s" https://www.youtube.com/watch?v=YVkUvmDQ3HY

When using the console:

[youtube] Setting language
[youtube] YVkUvmDQ3HY: Downloading webpage
[youtube] YVkUvmDQ3HY: Downloading video info webpage
[youtube] YVkUvmDQ3HY: Extracting video information
[youtube] YVkUvmDQ3HY: Encrypted signatures detected.
[youtube] YVkUvmDQ3HY: Downloading js player vflEyBLiy
[download] Destination: /tmp/YVkUvmDQ3HY.m4a
[download] 100% of 4.53MiB in 00:00
[ffmpeg] Destination: /tmp/YVkUvmDQ3HY.mp3

When using shell_exec in a PHP file:

[youtube] Setting language
[youtube] YVkUvmDQ3HY: Downloading webpage
[youtube] YVkUvmDQ3HY: Downloading video info webpage
[youtube] YVkUvmDQ3HY: Extracting video information
[youtube] YVkUvmDQ3HY: Encrypted signatures detected.
[youtube] YVkUvmDQ3HY: Downloading js player vflEyBLiy
[youtube] YVkUvmDQ3HY: Downloading js player vflEyBLiy
[download] Destination: /tmp/YVkUvmDQ3HY.m4a

[download] 0.0% of 4.53MiB at 964.43KiB/s ETA 00:04
[download] 0.1% of 4.53MiB at 2.36MiB/s ETA 00:01
[download] 0.2% of 4.53MiB at 4.77MiB/s ETA 00:00
[download] 0.3% of 4.53MiB at 8.92MiB/s ETA 00:00
[download] 0.7% of 4.53MiB at 14.63MiB/s ETA 00:00
[download] 1.4% of 4.53MiB at 16.06MiB/s ETA 00:00
[download] 2.7% of 4.53MiB at 17.09MiB/s ETA 00:00
[download] 5.5% of 4.53MiB at 18.45MiB/s ETA 00:00
[download] 11.0% of 4.53MiB at 21.12MiB/s ETA 00:00
[download] 22.0% of 4.53MiB at 26.07MiB/s ETA 00:00
[download] 44.1% of 4.53MiB at 35.24MiB/s ETA 00:00
[download] 88.2% of 4.53MiB at 42.27MiB/s ETA 00:00
[download] 100.0% of 4.53MiB at 44.54MiB/s ETA 00:00
[download] 100% of 4.53MiB in 00:00

@phihag
Copy link
Contributor

@phihag phihag commented Aug 6, 2014

Can you post a simple example php file that exhibits this error?

<?php
echo shell_exec('youtube-dl -x --audio-format "mp3" --no-post-overwrites -o "/tmp/%(id)s.%(ext)s" https://www.youtube.com/watch?v=YVkUvmDQ3HY 2>&1');

works fine for me.

@phihag
Copy link
Contributor

@phihag phihag commented Jan 23, 2015

I'm closing this issue now since I do not think we will be able to ever solve it without the requested sample php file. Feel free to provide that file and we will reopen this issue. Thanks!

@phihag phihag closed this Jan 23, 2015
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
2 participants
You can’t perform that action at this time.