A Closer Look at Slow Motion Video on the iPhone 6

How does the iPhone handle this transition from real speed to slow motion speed? In other words, what is the time rate of change of the frame rate during the transition.

I love the slow motion video on the iPhone 6. Not only does it record 720p video at 240 fps, it also let's you instantly adjust what part of video is in slow motion and what part is in real time. I can't stop making slow motion videos. Help me.

But there is something interesting. How does the iPhone handle this transition from real speed to slow motion speed? In other words, what is the time rate of change of the frame rate during the transition. Let's find out.

A Sample Video

We need a video that shows something we already know the answer to. How about projectile motion? Here is a sample video recorded with the iPhone 6. It has normal speed video at the beginning and end with slow motion in the middle.

Typically, I would create a plot of both the vertical and horizontal motion but in this case just the horizontal will work. Using Tracker Video Analysis and that meter stick on the window for scale, I get the following plot.

Just a quick note. Yes, you can make plots with Tracker Video Analysis. However, I find it easier to fit multiple functions to the same set of data with Plotly.

But what does this all mean? Here is a ball after it has been thrown (ignoring air resistance).

sketches_fall_14_key13

Since there is only a force in the vertical direction, I can write the following two equations for the acceleration of the ball.

La te xi t 1

Since the acceleration in the x-direction (horizontal direction) is zero, the velocity in the x-direction should be constant. A plot of the x-position vs. time should be a straight linear function with a slope that is equal to the horizontal velocity of the ball.

You can see in the plot that the x position of the ball does NOT look like a constant velocity. Of course the reason for the non-constant slope is due to the effects from the iPhone 6 slow motion thingy (maybe it has a technical name). Notice that the slope of the line before and after the slow motion has about the same value at around 8 to 7 m/s. Yes, these should be exactly the same. I suspect the problem is that I don't have much data for "after" the slow motion to get a good fit. I am going to go with the constant velocity of 8.07 m/s.

Dealing With Changing Frame Rates

The normal speed part of the iPhone video plays at 30 frames per second (fps). This means that from one frame to the next is a time interval of 0.033 seconds both in real life and in the video. During the slow motion part of the video, it is recorded at 240 fps which would mean there are 0.0042 seconds for each frame interval. However, the iPhone plays this back at 30 frames per second to give it that "slow motion look".

Let me write the two horizontal velocities (before and during the slow motion) as:

La te xi t 1

Here I am using the time unit of s' to represent the time during the slow motion part of the video. Since the two velocities are actually the same (in real life), I can set them equal to each other with some "rate factor" multiplied by the slow motion part.

La te xi t 1

This "a" factor tells us how slow the frame rate is compared to real life.

But what about the transition? The speed factor goes from a value of 1 to a value of 9.72 in a few frames. What is the rate of change for this a factor? Here is the same data as before. However, instead of fitting a linear function to the data I am fitting a quadratic function to the parts of the data where the video is in a transition from real speed to slow motion.

For both of these "time acceleration" phases, I have a time acceleration of about 16.6 s'/s2. In the first transition, this is a "negative time acceleration" and then a "positive time acceleration" to go back to normal time. I am beginning to hate this post because of my confusing phrases - it's not just you, it's me too.

You Don't Understand Something Until You Model It

Forget all this stuff about changing time rates. If I can make a model that shows the motion of the ball that looks JUST LIKE the video, I win. That's the rules of the game.

Just looking at the plot of the ball's horizontal position, it looks like it moves at a constant speed, then at some point accelerates to a lower speed and finally accelerates back to the original speed.

Here is my basic model.

  • Start with some initial velocity (similar to the values in the video).
  • Use a vertical acceleration of -9.8 m/s2 and a horizontal acceleration of 0 m/s2.
  • Use this acceleration to calculate the new velocity after a short time interval.
  • Use the velocity to calculate the new position after the same short time interval.
  • If the time is in the range of the first slow down, give the ball a negative horizontal acceleration of -16.6 m/s2. If the time is in the speed up range, put the acceleration at 16.6 m/s2. Do the same thing in the vertical direction.
  • Repeat.

That's it. Here is the model I get using GlowScript:

It's not perfect, but it's close enough. You can see that it has the same basic shape as the data from the actual video. I suspect that if I play around with the acceleration times, I can get a near perfect match. I'm happy.

Homework

There are still some questions that remain. I will leave them as a homework assignment for you.

  • What about the vertical motion? Can you just use the same idea for the vertical motion? Can I give it an acceleration to make a model work like the slow motion video?
  • Is the horizontal velocity in my video really constant? Should it be constant? Estimate the air resistance on a tennis ball moving around these speeds.
  • It seems that the slow motion transition takes about 12 frames. What if I make my slow motion part of the video only 10 frames long so that the slowing down transition and the speeding up transition overlap (you might need an iPhone 6 of your own to answer this question).

The more I think about it, the more I don't have a firm grasp of what's happening in the y-direction. Check out this plot of the vertical motion of the same ball.

slowmotioniphoneverticaly

This looks weird. It looks like during the slow motion part of the video the ball has a constant vertical velocity. However, I think this is just an illusion. If a tossed ball has a vertical acceleration of -9. m/s2 and then you slow the video time down by a factor of around 10 the apparent vertical acceleration would be very close to zero. Maybe I understand the vertical motion a little bit better than I thought.