←back to thread

990 points smitop | 5 comments | | HN request time: 0.862s | source
Show context
ranger_danger ◴[] No.44330199[source]
I'm surprised they don't just inject the ads directly into the video stream, I think that would solve their issue overnight (not that I want any ads personally). You could also rate-limit it to the playback speed to prevent pre-downloading the stream easily. But now that everything uses HLS/DASH, it's easy to inject different content right in the middle of the stream without re-encoding anything.
replies(15): >>44330295 #>>44330306 #>>44330327 #>>44330366 #>>44332987 #>>44333096 #>>44333102 #>>44333133 #>>44333320 #>>44333605 #>>44333700 #>>44333858 #>>44334367 #>>44335037 #>>44335453 #
1. k12sosse ◴[] No.44332987[source]
How does Twitch do it? They're super aggressive and even using third party clients that do a good job and not displaying ads, you still get an occasional "commercial break" screen where they're not serving you the content, or the ad, just a "let's all go to the lobby" screen.
replies(2): >>44333401 #>>44333557 #
2. thaumasiotes ◴[] No.44333401[source]
Those clients could be doing a better job - when twitch starts playing an ad on the main stream, they also provide a secondary stream that shows the actual content.
replies(1): >>44334229 #
3. ekimekim ◴[] No.44333557[source]
Twitch puts the ads directly in the HLS stream, but as seperate segments from the content (a HLS stream is made of many small video files, on twitch they're about 2s long). They're trivial to recognize and filter out (they're actually explicitly tagged as ad segments) but it still won't serve you the actual stream you were trying to watch - the ad segments override it. The best you can do is just block until the first non-ad segment arrives.
4. plopz ◴[] No.44334229[source]
i believe that secondary stream is used for picture in picture so its lower quality, like 480p or something
replies(1): >>44334264 #
5. thaumasiotes ◴[] No.44334264{3}[source]
Maybe; I don't know anything about it. I will note that that belief could easily develop, true or not, if twitch streams start out in low resolution and increase as you buffer them.

A third-party client has room to make a dramatic improvement on the twitch experience by not dropping audio while you make the switch from the ad stream to the content stream.