Skip to content

[ERR_NO_RESULT] Could not extract stream due to YouTube restrictions #349

@linlin0417

Description

@linlin0417

Title: [ERR_NO_RESULT] Could not extract stream due to YouTube restrictions

Description

I encountered an issue when trying to play YouTube videos using discord-player-youtubei. The error occurs when attempting to extract the stream from certain videos, and it appears to be caused by YouTube restrictions.

Steps to Reproduce

  1. Install the latest version of discord-player-youtubei and youtubei.js
  2. Attempt to play a YouTube video using discord-player
  3. The following error is emitted:
[ERR_NO_RESULT] Could not extract stream for this track
Error: This video is unavailable
    at new MediaInfo (/home/container/node_modules/youtubei.js/src/core/mixins/MediaInfo.ts:59:13)
    at new VideoInfo (/home/container/node_modules/youtubei.js/src/parser/youtube/VideoInfo.ts:52:5)
    at Innertube.getBasicInfo (/home/container/node_modules/youtubei.js/src/Innertube.ts:143:12)
    at async streamFromYT (/home/container/node_modules/discord-player-youtubei/dist/index.js:189:21)

Expected Behavior

The video should play normally, as it is publicly available on YouTube and works when accessed directly in a web browser.

Actual Behavior

  • The video fails to play, with ERR_NO_RESULT indicating that the stream could not be extracted.
  • The error suggests that YouTube may be blocking or restricting access to video streams.
  • Some videos work fine, while others consistently fail.

Additional Information

  • Node.js Version: 18.x.x
  • discord-player Version: latest
  • youtubei.js Version: 13.0.0
  • Operating System: Ubuntu / Debian (Linux server)
  • Tested with ytdl-core: ❌ Failed – YouTube also blocked access
  • Tested with play-dl: ❌ Failed – Same issue, stream unavailable

It seems that YouTube has changed its restrictions, preventing certain videos from being accessed via third-party libraries. This issue likely requires an update to the YouTube parser.

Possible Solutions

  • Updating youtubei.js to handle the new restrictions
  • Implementing alternative extraction methods
  • Checking if YouTube requires additional authentication or bypass methods

Please let me know if any further details are needed! 🚀
This translation was provided by "chatgpt"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions