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 able to download from youtube, while I can download from soundcloud #11627

Closed
ghost opened this issue Jan 6, 2017 · 4 comments
Closed

Not able to download from youtube, while I can download from soundcloud #11627

ghost opened this issue Jan 6, 2017 · 4 comments

Comments

@ghost
Copy link

@ghost ghost commented Jan 6, 2017

Please follow the guide below

  • You will be asked some questions and requested to provide some information, please read them carefully and answer honestly
  • Put an x into all the boxes [ ] relevant to your issue (like that [x])
  • Use Preview tab to see how your issue will actually look like

Make sure you are using the latest version: run youtube-dl --version and ensure your version is 2017.01.05. If it's not read this FAQ entry and update. Issues with outdated version will be rejected.

  • I've verified and I assure that I'm running youtube-dl 2017.01.05

Before submitting an issue make sure you have:

  • At least skimmed through README and most notably FAQ and BUGS sections
  • Searched the bugtracker for similar issues including closed ones

What is the purpose of your issue?

  • Bug report (encountered problems with youtube-dl)
  • Site support request (request for adding support for a new site)
  • Feature request (request for a new functionality)
  • Question
  • Other

Description of your issue, suggested solution and other information

I have created my own locally hosted site to download audio from youtube and soundcloud using youtube-dl. Yesterday I updated my youtube-dl to the latest version and since the update I'm just not able to download content from youtube (BUT I can download audio from soundcloud with no problems at all) using my site. This is the code that is executed to download audio.

exec("C:/Users/myuser/Desktop/yt/bins/youtube-dl.exe --extract-audio --audio-format mp3 \"".$url."\" -o \"C:/Users/myuser/ytmp3tmp/testaudio.%(ext)s\"");

Song will fail to download when this command is executed ON MY PHP FILE:

exec("C:/Users/myuser/Desktop/yt/bins/youtube-dl.exe --extract-audio --audio-format mp3 \"https://www.youtube.com/watch?v=5A4lnRSR-XY\" -o \"C:/Users/myuser/ytmp3tmp/testaudio.%(ext)s\"");

Although, song will download just fine when this command is executed ON MY PHP FILE:

exec("C:/Users/myuser/Desktop/yt/bins/youtube-dl.exe --extract-audio --audio-format mp3 \"https://soundcloud.com/shadowanthem/maroon-5-dont-wanna-know\" -o \"C:/Users/myuser/ytmp3tmp/testaudio.%(ext)s\"");

Long story short: any youtube video will fail to download when the code above is executed, but all soundcloud songs will be downloaded just fine. Both youtube and soundcloud content will be downloaded with no problems when I execute the command in cmd by myself.

I have also tried to use an older version of youtube-dl. It did not work.


Some logs

This is the var_dump for the exec output when trying to download the youtube video.

array(1) {
[0]=>
string(42) "[youtube] 5A4lnRSR-XY: Downloading webpage"
}

And that's when trying to download the soundcloud song.

array(8) {
[0]=>
string(64) "[soundcloud] shadowanthem/maroon-5-dont-wanna-know: Resolving id"
[1]=>
string(73) "[soundcloud] shadowanthem/maroon-5-dont-wanna-know: Downloading info JSON"
[2]=>
string(45) "[soundcloud] 299911659: Downloading track url"
[3]=>
string(58) "[soundcloud] 299911659: Checking fallback video format URL"
[4]=>
string(66) "[soundcloud] 299911659: Checking http_mp3_128_url video format URL"
[5]=>
string(87) "[download] Destination: C:\Users\myuser\ytmp3tmp\testaudio.mp3"
[6]=>
string(735) "
[download] 0.0% of 3.44MiB at 10.30KiB/s ETA 05:42
[download] 0.1% of 3.44MiB at 30.74KiB/s ETA 01:54
[download] 0.2% of 3.44MiB at 71.74KiB/s ETA 00:49
[download] 0.4% of 3.44MiB at 152.96KiB/s ETA 00:22
[download] 0.9% of 3.44MiB at 162.93KiB/s ETA 00:21
[download] 1.8% of 3.44MiB at 217.44KiB/s ETA 00:15
[download] 3.6% of 3.44MiB at 233.04KiB/s ETA 00:14
[download] 7.2% of 3.44MiB at 342.20KiB/s ETA 00:09
[download] 14.5% of 3.44MiB at 469.32KiB/s ETA 00:06
[download] 29.0% of 3.44MiB at 693.61KiB/s ETA 00:03
[download] 58.0% of 3.44MiB at 894.06KiB/s ETA 00:01
[download] 93.7% of 3.44MiB at 1.09MiB/s ETA 00:00
[download] 100.0% of 3.44MiB at 1.12MiB/s ETA 00:00
[download] 100% of 3.44MiB in 00:03"
[7]=>
string(107) "[ffmpeg] Post-process file C:\Users\myuser\ytmp3tmp\testaudio.mp3 exists, skipping"
}


If anything more is needed that I might have forgotten right now, you could ask me about it.

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Jan 6, 2017

Add --force-ipv4.

@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Jan 7, 2017

Seems exec does not capture STDERR? You may want to add 2>&1 for error messages.

@ghost
Copy link
Author

@ghost ghost commented Jan 7, 2017

@dstftw Adding --force-ipv4 did not make a difference.

@yan12125 This is the output:

array(2) {
[0]=>
string(42) "[youtube] 6nkj65NwpKg: Downloading webpage"
[1]=>
string(232) "ERROR: Unable to download webpage: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:600)> (caused by URLError(SSLError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:600)'),))"
}

@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Jan 7, 2017

Most likely you're another victim of 2017. See #11573 (comment) for solutions.

Feel free to leave comments if it doesn't solve the problem.

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.