Embed Notice
HTML Code
Corresponding Notice
- Embed this notice@niconiconi >I bet YouTube found a way to concat two videos without re-encoding everything.
I reckon that really isn't hard to do provided the initial encoding is controlled and the video format allows keyframes to be inserted at any time.
If there were double keyframes inserted say every ½ or ¼ video, an advertising video in the same video format could be injected right after the keyframe without re-encoding and then the video would resume on the next.
I guess this would make the decoder complain about invalid blocks or something, but most decoders should be able to handle that seamlessly.
Alternately google could tear down the stream, send an ad stream and then send the stream again - which would add a slight delay - but really the delay of >1 minute of an ad being played would bother the viewer far more.
I reckon any of such shenanigans could be detected and bypassed by yt-dlp or invidious (google could go as far as making their server demand that all of the ad stream blocks are downloaded and add an ad time delay before the stream can be is resumed, but yt-dlp could just take those blocks and proceed to throw them away (and for real-time streaming in mpv, display a countdown before the stream resumes)), but of course such functionality isn't available for those running google's proprietary JavaScript player.