4 ms·
Exactly, Google has that player, but to replicate the same effect for offline playing you would need to play a playlist or a DASH video and multiple fragments.
by _flux 6y ago
Exactly, Google has that player, but to replicate the same effect for offline playing you would need to play a playlist or a DASH video and multiple fragments.
But I grant it's technically possible to do with a single MPEG file, just not trivial. You would need to prepend the advertisement to the video bitstream (re-encoded with same parameters such as width, height, FPS, intra picture interval) and then do the same for audio, while ensuring the video/audio synchronization is kept intact (MPEG edit lists are not well-supported by players, such as by ffmpeg), while preferably not re-encoding the actual video. A bit more complicated to do the insertion in the middle of the file.
It's possible to do, but I don't think it's something that any off-the-shelf tools actually do.
- hnlmorg 6y agoYeah there are off the shelf tools available to the broadcasting industry. But these things are designed to tens of streams, not millions. As usual, it's a scale problem rather than a code problem.