I'm hearing reports that many users of Android-based TV's and various other devices are having a horrible experience. Not sure if this is tied to this garbage YouTube is trying, with injecting ads into video streams, but it's causing video to lock up while the audio keeps going.
Brilliant.
It is possible to do stream insertion properly, however, to prevent bugs, most likely these parameters need to be met, otherwise, you need to modify the players to adapt, or as you stream, you need to decode and re-encode everything:
1. Insertion must be done on and between master key frames. (Note that with .h265 unlike .h264 has multiple key frames, so you need to be on a master all key frame replacement location for both video streams)
2. Source resolutions and pixel packing formats need to be identical.
3. The selection of CBR vs VBR encoding needs to match between the 2 streams.
4. Version of encoding codec needs to match between streams.
Note that some players, especially mostly software ones may be more resilient to variations of my 4 points above, however, small set-top-box TV players may be using mostly a hardware mpeg decoder meaning they might not have the processing gusto to add code to deal with randomly stitched together streams.
If TVs with built in YouTube players begin freezing all the time, like some from the big guys like Sony & LG keep on freezing, YouTube coders on their head end have a huge issue as they might forced into live transcoding (huge dedicated real-time processing for each video) for all their distributed videos for such TVs. Otherwise, massive freeze-ups, most likely which may cause memory leaks on such TV players, might begin bricking some TVs... Permanently...