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

youtube-dl's URL SOMETIMES returns 404 error when downloaded with FFmpeg #17903

Closed
JakubKoralewski opened this issue Oct 16, 2018 · 4 comments
Closed

Comments

@JakubKoralewski
Copy link

@JakubKoralewski JakubKoralewski commented Oct 16, 2018

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

  • [x] I've verified and I assure that I'm running youtube-dl 2018.10.05

Before submitting an issue make sure you have:

  • [x] At least skimmed through the README, most notably the FAQ and BUGS sections
  • [x] Searched the bugtracker for similar issues including closed ones
  • [x] Checked that provided video/audio/playlist URLs (if any) are alive and playable in a browser

What is the purpose of your issue?

  • [x] Question

Youtube-dl works OK. What I'm doing is using the URL provided by youtube-dl. It is fed to ffmpeg which spits out an error. I wouldn't have posted this here, but I don't know where else.

Here's my workflow:

  1. I get a url from youtube-dl.
    with ydl:
    info_dict = ydl.extract_info(youtubevideo, download=False)
    url= info_dict.get('url')
    duration = info_dict.get('duration')
  2. I parse it to ffmpy.
  3. Works most of the time (but my application of youtube-dl requires complete stability :/).
  4. When it doesn't:
    [https @ 000001f5c1f3cc40] HTTP error 404 Not Found VERY_LONG_VIDEO_URL: Server returned 404 Not Found
    ffmpy.FFRuntimeError: ffmpeg -y -i VERY_LONG_VIDEO_URL -ss 7.26 -vframes 1 -q:v 2 x.jpg exited with status 1

The 404 error happens only for some videos and I wasn't able to pinpoint the exact variable resulting in the error. At first I thought it was some sort of an IP-based limit system, but the error is thrown even after long breaks. I've checked; the issue happens with multiple different files. I've tried just getting the url again, using proxies to get the url again and try again. It's very frustrating and sneaky since it happens very rarely.

@dstftw dstftw closed this Oct 16, 2018
@dstftw
Copy link
Collaborator

@dstftw dstftw commented Oct 16, 2018

Also, it won't return direct download URL in cases when no such URL is available.

@JakubKoralewski
Copy link
Author

@JakubKoralewski JakubKoralewski commented Oct 16, 2018

Makes sense, but why then would this happen only sometimes, though? I think it's only happening to DASH files.

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Oct 16, 2018

It may happen for segmented DASH when the format you've selected happens to be segmented DASH.

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.