←back to thread

990 points smitop | 1 comments | | HN request time: 0.208s | 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 #
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 #
1. 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.