codealchemist / youtube-audio-server

Easily stream and download audio from YouTube.
74 stars 31 forks source link

Longer audio return error #22

Open stephane-r opened 5 years ago

stephane-r commented 5 years ago

Hi @codealchemist :)

Thank again for your great module. I use your module on React-Native app, but it look like longer audio return No video id found: robots.txt after about 10 minutes.

I've try with this youtube id : 1czLxRs6YvU

In my case, the audio stream stop after 6:45 with /:videoId API.

Are you able to reproduce the problem ?

Thank you !

stephane-r commented 4 years ago

Up :) If you have any idea for this problem :muscle:

DavidBerdik commented 2 years ago

The current release of YouTube Audio Server seems is broken for longer videos, but my fixed version (in PR https://github.com/codealchemist/youtube-audio-server/pull/47) still seems to suffer from this bug.

Attempting to stream https://www.youtube.com/watch?v=awjBLm41xJI consistently stops working at the 7:48 mark and the server crashes with the following output:

node:events:505
      throw er; // Unhandled 'error' event
      ^

Error: Input stream error: aborted
    at PassThrough.<anonymous> (C:\youtube-audio-server\node_modules\fluent-ffmpeg\lib\processor.js:452:34)
    at PassThrough.emit (node:events:539:35)
    at PassThrough.emit (node:events:539:35)
    at IncomingMessage.onError (C:\youtube-audio-server\node_modules\miniget\dist\index.js:148:24)
    at IncomingMessage.emit (node:events:527:28)
    at emitErrorNT (node:internal/streams/destroy:157:8)
    at emitErrorCloseNT (node:internal/streams/destroy:122:3)
    at processTicksAndRejections (node:internal/process/task_queues:83:21)
Emitted 'error' event on FfmpegCommand instance at:
    at emitEnd (C:\youtube-audio-server\node_modules\fluent-ffmpeg\lib\processor.js:424:16)
    at PassThrough.<anonymous> (C:\youtube-audio-server\node_modules\fluent-ffmpeg\lib\processor.js:454:15)
    at PassThrough.emit (node:events:539:35)
    [... lines matching original stack trace ...]
    at processTicksAndRejections (node:internal/process/task_queues:83:21) {
  inputStreamError: Error: aborted
      at connResetException (node:internal/errors:692:14)
      at TLSSocket.socketCloseListener (node:_http_client:414:19)
      at TLSSocket.emit (node:events:539:35)
      at node:net:709:12
      at TCP.done (node:_tls_wrap:582:7) {
    code: 'ECONNRESET'
  }
}
DavidBerdik commented 2 years ago

The entire audio stream seems to get downloaded properly if the chunking endpoint is used, but unfortunately, the chunking endpoint is very broken right now. - https://github.com/codealchemist/youtube-audio-server/issues/48