Why would anyone need machine learning to edit a video? There are dozens or hundreds of free open source video editing programs. Only one person needs to edit the ads out.
Or maybe you still think we're in the 1950s when there were explicit ad breaks? In modern works ads are injected into the storyline. You can't just start dropping frames at random if you want to preserve the performance in its entirety.
There are absolutely hard breaks before and after ads. Sounds like you might be talking about product placement, which to be clear, no one anywhere else in this thread is talking about.
That's fine. We can't all know everything. But why are you trying to participate in a discussion, by your own admission, you don't understand?