Slow down video at a given moments

Hello, I have a video recorded at 100 fps

Original video

I’m looking to slow down in python 2 or 3 exact moments of the video when the children watch, for example moment 5 seconds and moment 10 seconds. When you slow down the first one the duration changes and the second point moves.

The video is recorded at 100 fps and plays at 100 fps, up to 2 seconds before the moment slow down to 25 fps after 2 seconds that recover the 100 fps (sin function)
The output video has to be at 25 fps and play at 25 fps

some help?

OpenCV is for computer vision, not for video editing. you should look into libraries for that specific purpose. or use a video editing program.

computers, calculation, 3d, graphics, post production is all the same I understand that open cv can do it you just need to know the exact functions. If I could use a program on a server I would but I can’t and I need to automate the process in the cloud.