Giter Club home page Giter Club logo

Comments (4)

Tyrrrz avatar Tyrrrz commented on May 23, 2024 1

A bit more detail into what's happening. The stream does not immediately return 404, which is why it's not filtered out by this check in the StreamClient:

// Stream cannot be accessed
if (contentLength <= 0)
continue;

Instead, what actually happens is that the stream initially serves data, up to a certain point:

image
image

Then, at some point, the underlying ContentLengthReadStream class throws an exception, indicating that the stream has mismatched content length:

image

After that, MediaStream attempts to re-initialize the last segment, on the off chance that this is a transient error. This time, the stream returns 404 instead, most likely because the new values of the range parameter are out of bounds.

Worth noting that even Chrome fails to read this stream, due to content length mismatch:

image

The bottom line is that this stream is broken, but it's currently not filtered out because the issue appears later on in the stream's lifecycle.

from youtubeexplode.

Tyrrrz avatar Tyrrrz commented on May 23, 2024 1

Looks like I found a way to filter them out. I'll release a new update on Thursday.

from youtubeexplode.

QINGCHARLES avatar QINGCHARLES commented on May 23, 2024 1

You're a star, thank you.

from youtubeexplode.

QINGCHARLES avatar QINGCHARLES commented on May 23, 2024

Wow, what a weird error. I can only guess YouTube's encoder failed for some reason and pushed out a broken file that none of their systems are set up to check for.

There is not much for you to do in your code. The best you could do is indicate to the user somehow that they should try the stream again but select a different stream type to download and it might work.

from youtubeexplode.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.