I have some raw footage from a lacrosse game that I filmed and the coach told me to make a video for a collage about a player. Is there a way to crop a video relative to a motion track.
I would want to track the player and crop the video so the player stays in the center of the frame rather than giving the coach general footage with the player in it. I understand that I will be giving up a lot of quality cropping the video to a small size but just having the ability of doing such a thing would be nice.
Programs to use:
- After Effects CC
- Premiere Pro CC
- Any of the programs in Adobe CC
Here's one way to do it. I'll assume you have basic motion tracking knowledge already for the sake of brevity.
Turn on 3D space for your footage layer.
Track the player in your footage. I'm going to guess that you'll have to do a lot of this by hand, but there's not really a faster way to track a player like this.
Apply the track to a Null, including both X + Y values of course. Turn on 3D space for the null as well.
Create a Camera. Default values are fine. They will match your footage, so you initially won't see any change.
Select the Null and press P to open the position parameter.
Here's the tricky part. Alt+Click on the Position stopwatch for your Camera. This will turn the position numbers red, open up an Expression text box, and reveal some new buttons. Click and drag the Pickwhip onto the Null's position parameter.
Your comp should go black. Good, it's working!
Open up the Position twirly for your footage layer (in my comp it's A037C006_160309CZ.MXF). The third value is the Z-depth. Adjust this to taste - the larger the number, the larger the resulting "crop" of your footage. Here I've set it to 1700 for a pretty extreme crop (and this is also 4K footage) - a more reasonable look, in my case, might be more like 2500. For you it will vary depending on the footage.
As you scrub through the timeline you should be perfectly locked onto the player. Unfortunately, depending on how close they get to the edge of the shot, you may see black appearing at the edge. This means you've "cropped" in far enough that you've hit the edge of the frame. You can reduce the crop (move the footage layer closer to the camera, a smaller number) as necessary to fix this.
You may find that your track is a bit choppy. You can smooth it out a bit non-destructively using some of the techniques detailed here.