Maximum call stack size exceeded
Closed this issue · 13 comments
Hello, I am also getting this Maximum call stack size exceeded Error, even doe I followed the solutions of all the other issues to this error.
ytdl-core version is on 1.0.5, so I think this should not be the problem, right?
Does anyone know how to fix this?
Thanks
Error Message:
events.js:1
(function (exports, require, module, process, internalBinding) {// Copyright Joyent, Inc. and other Node contributors.
^
RangeError: Maximum call stack size exceeded
at PassThrough.emit (events.js:1:1)
at PassThrough.output.on.error (/home/gabrielaigner/Documents/personal/projects/temp/yas-demo/node_modules/youtube-audio-stream/index.js:39:14)
at PassThrough.emit (events.js:198:13)
at PassThrough.output.on.error (/home/gabrielaigner/Documents/personal/projects/temp/yas-demo/node_modules/youtube-audio-stream/index.js:39:14)
at PassThrough.emit (events.js:198:13)
at PassThrough.output.on.error (/home/gabrielaigner/Documents/personal/projects/temp/yas-demo/node_modules/youtube-audio-stream/index.js:39:14)
at PassThrough.emit (events.js:198:13)
at PassThrough.output.on.error (/home/gabrielaigner/Documents/personal/projects/temp/yas-demo/node_modules/youtube-audio-stream/index.js:39:14)
at PassThrough.emit (events.js:198:13)
at PassThrough.output.on.error (/home/gabrielaigner/Documents/personal/projects/temp/yas-demo/node_modules/youtube-audio-stream/index.js:39:14)
I have the same error from the example code
Does running the test npm t
work for you?
Have you installed ffmpeg?
@stramanu As an npm package?
No, as a system library.
You will need to have ffmpeg and the necessary encoding libraries installed, as well as in your PATH. If you're on OSX, this can be handled easily using Homebrew (brew install ffmpeg).
it depends on what operating system you have
- For Windows and OSX you can download the FFmpeg builds here
- If you're running a linux distro you'll find it in your package manager
Hello! I am with the same problem, and I already have a version of ffmpeg in my OSX... But if I run the container it works, what can I do?
Yep, the same. Just tried speaker streaming example on node@14 / windows with the mentioned ffmpeg build.
const stream = require('youtube-audio-stream')
const url = 'http://youtube.com/watch?v=9HinHSUrZ7o'
const decoder = require('@suldashi/lame').Decoder
const Speaker = require('speaker')
stream(url)
.pipe(decoder())
.pipe(new Speaker())
PS C:\projects\youtube-play> node .\index.js
Could not extract html5player key: https://www.youtube.com/s/player/c31b936c/player_ias.vflset/en_US/base.js
events.js:263
...
Need to bump ytdl-core fent/node-ytdl-core#602
Oh ugh. @JamesKyburz do you have any idea why https://unpkg.com/browse/youtube-audio-stream@0.3.5/package.json has ytdl-core@1.0.5 dependency, whereas the github repo has ytdl-core@2.1.0?
Can you possibly publish that over? Greatly appreciate.
Maybe this is a limitation/restriction added by youtube due to copy right issues? The example video in the test file works for me, but consistently seeing this error for videos behind ad walls.
@dy the package.json was modified post npm publish, I have published a new version 0.3.6 with the latest ytdl-core.
Then this issue should be fixed @gabrielaigner please have a look, it works well on my side.