question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

error 500 when trying to download a specific video

See original GitHub issue

Hello there,

I am trying to move away from youtube-dl for a specific issue I found and also due to the author not actively maintaining the lib anymore.

I see your project is getting updated so i wanted to test it out.

Unfortunately I found out the same issue on your project which I invite you to try.

Try downloading http://www.youtube.com/watch?v=fxlbIS8CoW8 using best quality (by default)

const fs = require('fs');
const ytdl = require('ytdl-core');

ytdl('http://www.youtube.com/watch?v=fxlbIS8CoW8')
  .pipe(fs.createWriteStream('video.flv'));

This should suffice to break the library. for some unknown reasons this specific video and several others will not work.

I am downloading thousand of vidoes for a project and while this might happen rarely, it happens quite a lot for me.

Let me know if you need further details to reproduce the bug.

Hopefully you’ll find the reason, i wasn’t able to.

Best regards, Nikooo777

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:2
  • Comments:16 (8 by maintainers)

github_iconTop GitHub Comments

2reactions
fentcommented, Apr 7, 2020

I’ve been testing this, itag 22 is the only format returning a 500 error. All others work, at least for this video. https://github.com/fent/node-ytdl-core/issues/212 is similar, that itag 22 errors, but the error is different.

a possible workaround could be having a format fallback option that would try other formats if the first choice failed. it wouldn’t fix the issue that itag 22 is having, but would circumvent it.

I’m thinking making the syntax like

formatFallback: false | 'all' | filtered

  • false - turned off, would not try other formats
  • 'filtered' - would try other formats that have been filtered. that is, if the user used filter: 'audioonly' for example, it would try the 2nd choice of audioonly formats if the 1st choice fails.
  • 'all' - would try the next best choice regardless of filter

it might also be worth it to have a formatFallbackMax: 3 for maximum formats to fallback on

2reactions
cacheflowcommented, May 25, 2017

Found the issue and patched it. Some of the highest quality video URLs are sometimes not accessible for whatever reason on Youtube. It even happened with my own parser that I tested. Made a PR that checks the request and downloads the baseline video if the highest quality fails to download.

https://github.com/fent/node-ytdl-core/pull/164

Read more comments on GitHub >

github_iconTop Results From Across the Web

[Easily Solved] How to Fix YouTube Error 500
Read this post, you'll get the tips to help you fix YouTube error 500 easily, and also the simple method to download YouTube...
Read more >
How to Fix YouTube 500 Internal Server Error: 7 Solutions
In this article, we will list 7 solutions to fix YouTube 500 internal server error, and recommend a YouTube video downloader for you...
Read more >
Easy Solutions to YouTube 500 Internal Server Error
1. Reload the YouTube page ... This is the easiest and the fastest solution and it is the first reaction of the user...
Read more >
Can't download any of my videos internal service error
It's not a general issue. Downloading works here as usual. There is a limit of 500 selected items, but I get a message...
Read more >
What is a 500 Internal Server Error?
A 500 Internal Server Error is an umbrella term for several issues often involving the server of the website you're trying to reach....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found