Comments (4)
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
:
YoutubeExplode/YoutubeExplode/Videos/Streams/StreamClient.cs
Lines 85 to 87 in 49ce828
Instead, what actually happens is that the stream initially serves data, up to a certain point:
Then, at some point, the underlying ContentLengthReadStream
class throws an exception, indicating that the stream has mismatched content length:
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:
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.
Looks like I found a way to filter them out. I'll release a new update on Thursday.
from youtubeexplode.
You're a star, thank you.
from youtubeexplode.
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)
- Cannot get stream manifest of a video that is still being processed HOT 8
- Search feature crashes on mobile devices HOT 1
- Audio files are downloaded as WebM, Mp3 does not work HOT 3
- Using a live video URL throws an exception
- 403 (Forbidden) HOT 1
- Occasionally streams just dies HOT 13
- Streams are sometimes unstable
- Exception "Could not extract video upload date" with specific video
- GetVideosAsync does not return all videos of a playlist
- GetManifestAsync silent crash on Android HOT 9
- YoutubeExplode failed to fetch video HOT 1
- Closed captions that erroneously contain valid SRT segments within them break when processing with FFmpeg HOT 1
- Closed captions that contain invalid offsets and/or durations break when processing with FFmpeg
- Getting `System.Net.CookieException` on some requests HOT 6
- Invalid Youtube Video ID or URL error
- Searching fails when encountering pay-to-watch videos HOT 4
- Video downloads, but only audio, no video HOT 30
- Download private video by passing list of cookies, bit got 401
- 500 error when calling GetManifestAsync HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from youtubeexplode.