node-ytdl-core icon indicating copy to clipboard operation
node-ytdl-core copied to clipboard

HTTP error 503 Service Unavailable

Open richardabear opened this issue 2 years ago • 3 comments

I am getting a very strange error that i cant seem to trap.

I am following this code from examples: https://github.com/fent/node-ytdl-core/blob/master/example/ffmpeg.js

I am testing it out with this video: https://www.youtube.com/watch?v=3CMp3iu7jGQ

The response i am getting from ffmpeg log:

0|npm      | [https @ 0x55fec65df540] HTTP error 503 Service Unavailable
0|npm      | https://rr2---sn-5uaezny6.googlevideo.com/videoplayback?expire=1669721394&ei=0ZiFY7DBNcyp8wTM07LYCA&ip=69.164.221.14&id=o-AEcpiIpy2f8CJMeQIn4MS6fbNa4OFKfJSqKP14v-JBqM&itag=244&aitags=133%2C134%2C135%2C160%2C242%2C243%2C244%2C278&source=yt_otf&requiressl=yes&mh=PV&mm=31%2C29&mn=sn-5uaezny6%2Csn-5uaezn6d&ms=au%2Crdu&mv=m&mvi=2&pl=24&initcwndbps=77500&vprv=1&mime=video%2Fwebm&ns=H69WeBU3-AyY7eTWhruQzAoJ&otf=1&otfp=1&dur=0.000&lmt=1669575792287325&mt=1669699530&fvip=2&keepalive=yes&fexp=24001373%2C24007246&c=WEB&txp=6210224&n=XuDtd_sVuoeUVw&sparams=expire%2Cei%2Cip%2Cid%2Caitags%2Csource%2Crequiressl%2Cvprv%2Cmime%2Cns%2Cotf%2Cotfp%2Cdur%2Clmt&sig=AOq0QJ8wRQIgQI5O5vUB3m0ym6Lo2RmqQ3VZITveC_HOGuHu5tojrg8CIQCrs87eUv-iEv3DKRP9jxZWZmFbrQD1SWnmH_o3UDwBag%3D%3D&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AG3C_xAwRQIgZMnl7gWtlri1kwU8P6JbYkSPolLgpbsVMSVUuTfS_uMCIQCR6HgrVF-_qnIRjC4DmvpWCkVRtaod9AnrBZnJ2kis5Q%3D%3D: Server returned 5XX Server Error reply
0|npm      |
0|npm      |     at ChildProcess.exithandler (node:child_process:399:12)
0|npm      |     at ChildProcess.emit (node:events:526:28)
0|npm      |     at maybeClose (node:internal/child_process:1092:16)
0|npm      |     at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5)

richardabear avatar Nov 29 '22 05:11 richardabear

UPDATE:

This is actually an issue with the "quality" preset

commenting out

 const video = ytdl(url, {
        filter: 'videoonly',
        // quality: 'highest',
        requestOptions: { agent },
      })

Fixes it but now im stuck with low quality videos which is not really good for my use case.

richardabear avatar Nov 29 '22 06:11 richardabear

Another update

if using an itag range instead of 'highest' or 'highestvideo' it works

richardabear avatar Nov 29 '22 08:11 richardabear

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Jun 18 '23 13:06 stale[bot]