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.
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
Comments
|
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. |
|
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! |
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