Apply time remapping.
Set keyframes at the appropriate points in the footage.
Highlight the keyframes and switch to graph view.
Adjust the bezier curves of the graph until you get the speed ramp you desire. You'll probably need to move your end keyframe further down in time to allow for the slow down in speed.
I have a clip 100 frames long. I want frames 1 through 50 to play at full speed. I want playback to stop on frame 75 for the duration. I want a smooth, gradual slow down between frames 50 and 75.
I want to set a keyframe at 50, and one at 75. I want to set the speed at frame 50 to 100% and the speed at frame 75 to 0%, and have AE gradually slow things down in between. I want the keyframe at frame 75 to always show frame 75, no matter what I do.
You have to think of editing time differently than you think of editing pixels. I'm a little confused by your explanation so here goes an attempt to explain how time remapping works.
When you enable time remapping on a clip you'll get a time keyframe at the head and tail of the shot. In your case that would be a keyframe at 0 frames and a keyframe at 100. If you open up the graph editor and take a look you'll see a straight diagonal line.
Here's where the thinking gets a little confusing. You say you want to plan from 1 to 50 in real time. If so, then you have to set a new keyframe at 50 frames. You now have 3 keyframes in your timeline. You also say that you want the video to stop planing on frame 75. This means you'll have to go to frame 75 and set another keyframe. Now there are 4 keyframes. KF#1 at 0, KF#2 at 50, KF#3 at 75, and KF#4 at 100.
So far, nothing about the playback has changed. If you delete KF#4 then the clip will play at normal speed until it gets to frame 75 then frame 75 will be repeated until you reach the outpoint of the footage. Here comes the tricky part. If you grab all of these keyframes and slide them up and down the timeline you'll be changing when the clip starts playing and when it freezes, but you'll not be changing the speed of the playback between the keyframes.
Did you follow that? It might be easier if we talk about time and frames. Let's assume that your project is 25 fps. That means the total time of the clip is 4 seconds.
In order to slow down the playback between frame 50 and frame 75 you must increase the distance, which increases the time between KF#2 and KF#3. If the distance or time between KF#2 and KF#3 is twice as much as the original distance between the keyframes the speed between 2 and 3 will be half as fast but it must necessarily take twice as long. If you leave KF 1, and 2 in their original positions and drag KF3 to frame 100 in the timeline and you open up the Graph editor you'll see that the ramp between 2 and 3 is half as steep as the ramp between 1 and 2.
Now your clip will play at normal speed for the first 2 seconds, then at half speed for the next two seconds. You'll be able to drag out point to say 8 seconds. The tricky part comes when you try to ease the playback from full speed to the freeze frame. This can only be accomplished in the graph editor. You have to match the angle of the graph for the first 2 seconds (between KF1 and KF2) and then gradually taper it off to the flat that starts at 4 seconds where you've moved KF3. You do this by editing the bezier handle on KF3. To edit the speed graph press the G key to bring up the Pen tool, then hold down the Alt/Option key to bring up the convert point tool (looks like a v) and click on KF3 and drag straight out to the left.
Here's the catch. If you want to slow down playback you have to increase the time between keyframes. If you wish to speed up the playback you need to decrease the time between keyframes. This means that you cannot change the speed of playback without changing the length of the clip.
I hope this helps. At first reading of your question I thought you wanted to play in real time for the first 2 seconds then gradually slow down between frame for the next second, then freeze from the third second to the fourth second. This cannot be done. You can, as I explained above, Play at normal speed for the first 2 seconds, then gradually slow down playback for the next two seconds, then freeze the video for the next two or ten or however many seconds you want.
I hope this helps.
Here's three screenshots.
Adjust the bezier curves of the graph until you get the speed ramp you desire.
That's the part that is driving me mad. I can't get what I desire. I was hoping there would be a way for AE to provide that ramp automatically.
you'll be changing when the clip starts playing and when it freezes
That's the other part that's driving me mad. I need keyframes that stick to a frame, so that whatever happens to those keyframes, the same frame of video shows above. Seems that adjusting those Béziers changes the frame above keyframe #3.
At first reading of your question I thought you wanted to play in real time for the first 2 seconds then gradually slow down between frame for the next second, then freeze from the third second to the fourth second.
That is precisely what I want.
You can, as I explained above, Play at normal speed for the first 2 seconds, then gradually slow down playback for the next two seconds, then freeze the video for the next two or ten or however many seconds you want.
Looking only at the overall idea, and disregarding the specific times, I don't understand the difference. I want to play at normal speed, gradually slow down, and then freeze on a frame which is not the last frame of the clip.
I was hoping there would be a way for AE to provide that ramp automatically.
E.g., right-click on your keyframe at 50 frame -> Keyframe Assistant -> Easy Ease Out. Right-click on your keyframe at 70 frame -> Keyframe Assistant -> Easy Ease In...