First, shoot at a higher than normal frame rate. At least 60 (59.94) fps. Next import your footage into AE or Premiere Pro. Finally, adjust the speed of the playback.
For example, if you put the clip in After Effects you would go to file interpretation and change the interpretation of the footage from 60fps (59.94) to 29.97. This will make the footage play back at half speed. One second of real time will take two seconds of screen time. Then you would start a new composition that is 29.97 fps. Next you would enable time remapping. You will see two keyframes, one at the head and one at the tail of the shot. These keyframes represent time. Now you scrub through the shot and pick the points where you want the speed to change and add additional keyframes. Here comes the tricky part. Let's say you want the first two seconds of the shot to play in real time, then you want the next 2 seconds to play in slow motion, then the next 1 second in real time then the final segment of the shot to play in slow motion (half speed). You would set keyframe one at 2 seconds, Keyframe two at 4 seconds, and Keyframe three at 5 seconds and Keyframe 6 at the end of the clip. Now you position the CTI (current time indicator) at 1 second, grab all of the keyframes except the first and drag them to the CTI with the shift key held down so that the Keyframe 1 snaps to the CTI. You have now sped up the first two seconds of the footage so that it plays in real time. You now have keyframes at 0, 1, 3, and 4, seconds, and the last one second before the end of the clip. Next you move the CTI to the 3:15 (three and a half seconds) mark, select the last two keyframes and do the shift drag trick again to compress the time between Keyframe four and Keyframe 5 to a half second. That will do it.
The speed graph looks like this:
The steeper the angle the faster the clip plays back.
An easier way to do this may be to split the clip every time you want to make a speed change.
You can also do this in Premiere Pro by simply cutting the clip into pieces and adjusting the speed of the playback of each segment. This isn't hard, but it's very difficult to make it look really good unless you shoot at a higher frame rate than you use for your project.
Thank you so much! I'll definitely try it out. Much appreciated