Shotcut tutorial · companion page
One filter follows the basketball and records where it went. A second filter borrows those keyframes and pushes the whole picture the opposite way, so the ball stays put and the gym slides around behind it. A third zooms in far enough that you never see the edges.
Reading in another language? Use the translate picker in the header, or your browser’s own translate command — the Shotcut filter, control and value names are marked to stay in English so they still match what is on your screen.
No preset and no plugin. One clip, on one track, carrying three filters — a tracker that watches a moving object, a filter that inherits the tracker’s keyframes and shifts the picture by the inverse of that movement, and a second copy of the same filter doing nothing but zooming in to cover the damage.
The Motion Tracker filter is given a rectangle to watch and an algorithm to watch it with. Pressing Analyze runs it over the clip as a background job.
The tracker produces nothing you can see. What it produces is a keyframe per frame describing where the region went — data waiting for another filter to consume it.
Size, Position & Rotate imports those keyframes with Adjust set to Offset Position, so the frame travels opposite the subject and the subject appears nailed down.
Shifting the picture drags its edges into shot. A second, un-keyframed copy of the same filter scales up until the black slabs are gone — here to 192.8%.
[ what it did was recorded the tracking on keyframes, and once you recorded the keyframes you then have the ability to share that keyframe information with another filter ]
Ben Espanto · 7:26
This video carries no chapter list of its own, so the sections below were worked out by reading the video’s frames end to end. Each stop is anchored to the exact second of the frame shown with it, which is why the timestamps land on ten-second marks. Click any screencap or timestamp to play that section from that second, right here in the card. Quotes are transcribed verbatim from the audio.
Every number below was read off the screen in the video. Nothing here is a recommended-sounding guess — if a value is not stated, it is because it was never shown.
The Motion Tracker filter does not exist in older builds. Open Help → About Shotcut and confirm you are on a release that has it. The video was recorded on 23.05.14.
One clip, one video track. Nothing about this technique needs a second track — every filter goes on the same clip.
Select the clip, open Filters, press + and search motion. The filter arrives with a small default region — Position 864, 486, Size 192 × 108 — which you drag and stretch onto the thing you want to follow.
Contain the subject fully, but do not be generous with the margin. Background caught inside the box is what the tracker will drift onto.
The default is CSRT: Channel and Spatial Reliability and it is used unchanged in the video. If a track drifts, the fix is a different algorithm and a re-run of Analyze — not a smaller box.
Type something meaningful into Name — here Basketball. Left blank, Shotcut supplies Tracker 1, and that is the label you will be picking from a dropdown later with no other clue as to what it followed.
The analysis runs in the Jobs panel with a percentage and an estimated time, not inside the filter panel. When it is done the text beside the button changes from “Click “Analyze” to use this filter.” to “Analysis complete.”
Play the clip back with Show preview still on and watch the green box. This is the only point where a bad track is cheap to fix.
That green rectangle is not an editor-only overlay. Leave it checked and it renders into the exported file. Toggle it while you are judging the track, then turn it off and leave it off.
The colour swatch next to the checkbox only sets the box colour. It has no effect on tracking.
Press + again on the same clip and add Size, Position & Rotate. Leave every field at its default. This filter exists purely to receive the tracker’s keyframes.
Click Load Keyframes from Motion Tracker. Pick your tracker by name, choose From start so you get the whole run, set Adjust to Offset Position, and press Apply.
After Apply there is no progress bar of any kind and the window can look frozen. The only signal it worked is keyframes appearing in the Keyframes panel and the stopwatch beside Size lighting up.
Play it back and you will see black slabs at the edges wherever the source no longer covers the canvas. Add another Size, Position & Rotate — a separate one, so the keyframed filter above it stays untouched — and raise Zoom until the worst moment in the clip is clean.
The player’s grid overlay helps you nudge the subject toward centre; Settings → Preview Scaling makes the playback smooth enough to judge. Neither changes the export.
Read directly off the frames of the video. Where a value changed on screen, the tuning path is shown separately below.
| Setting | Value | Where it lives |
|---|---|---|
| Shotcut version | 23.05.14 | Help → About Shotcut |
| Source clip | basketball.mp4 | Playlist, then Timeline |
| Clip duration | 00:00:08:19 | Player, Project tab |
| Track stack | V1 only, one clip, no duplicates | Timeline |
| Filter 1 | Motion Tracker | On the clip |
| Name | Basketball (blank gives Tracker 1) | Motion Tracker |
| Region To Track, at Analyze | 883, 619 · 358 × 353 | Motion Tracker |
| Algorithm | CSRT: Channel and Spatial Reliability | Motion Tracker |
| Show preview | Checked while tuning, unchecked before export | Motion Tracker |
| Analysis job | Analyze basketball.mp4 · 13% (00:01:01) mid-run | Jobs panel |
| Filter 2 | Size, Position & Rotate | Same clip, carries the keyframes |
| Filter 2 values | 0, 34 · 1,920 × 1,013 · 100.0% · Fill / Center / Middle · 0.0 deg | Left at defaults, never edited |
| Load Keyframes from Motion Tracker | Motion tracker Basketball · From start · Adjust Offset Position | Dialog, from Filter 2 |
| Filter 3 | Size, Position & Rotate | Same clip, framing only, no keyframes |
| Filter 3, final | −1,122, −864 · 3,702 × 1,952 · 192.8% | Size, Position & Rotate |
| Playback aids | Grid overlay · Settings → Preview Scaling | Player, Settings menu |
| Stage | Position | Size | Seen at |
|---|---|---|---|
| Filter added, untouched | 864, 486 | 192 × 108 | 3:00 |
| Dragged onto the ball | 948, 619 | 192 × 108 | 3:10 |
| Handles pulled out | 903, 619 | 339 × 367 | 3:20 |
| Fitted to the ball | 890, 619 | 351 × 369 | 3:30 |
| Widened slightly | 890, 619 | 357 × 369 | 4:00 |
| As it stood when Analyze was pressed | 883, 619 | 358 × 353 | 5:00 |
From 7:20 to 8:00 the same panel reads 890, 619 · 357 × 369 with the Name box back on the default Tracker 1. The video is assembled from more than one recording pass, so the panel values step between takes rather than progressing in one line. Both readings are shown here rather than picking the tidier one.
| Stage | Position | Size | Zoom | Seen at |
|---|---|---|---|---|
| Added, untouched | 0, 34 | 1,920 × 1,013 | 100.0 % | 11:00 |
| First zoom in | −480, −219 | 2,880 × 1,519 | 150.0 % | 12:00 |
| Backed off | −372, −162 | 2,665 × 1,405 | 138.8 % | 12:20 |
| Nudged back in | −411, −184 | 2,742 × 1,446 | 142.8 % | 13:00 |
| More bars found | −603, −285 | 3,126 × 1,648 | 162.8 % | 13:20 |
| Zoom settles | −891, −437 | 3,702 × 1,952 | 192.8 % | 13:40 |
| Final framing | −1,122, −864 | 3,702 × 1,952 | 192.8 % | 15:20 |
Once the zoom reaches 192.8% the Size figures stop changing and only Position moves — that last stretch is recentring the ball, not scaling further. How far you have to zoom is set entirely by how much your subject travels: a calmer shot needs less, and keeps more of its resolution.
Machine transcribed from the video audio. Spoken phrasing is left as-is; only the product and filter names Whisper mangled have been corrected. Every timestamp plays the video in the hero from that second.
In this tutorial I want to show you how to do this locked on tracking effect on
Shotcut using the new motion tracking filter. So stay tuned. I'm just a normal
person with no video editing background. I wanted to start making YouTube videos
and maybe cool transitions and effects. I don't really plan on being a
professional video editor so I was looking for a free easy-to-learn video
editing software. Luckily I stumbled on Shotcut, a free open-source video
editing program that can do many of the tricks you can do on more enterprise
video editors like Adobe Premiere or DaVinci Resolve, but with a much simpler
and leaner interface thus dramatically shortening the learning curve. It just
takes using your imagination. So let's learn together.
This tutorial will be done on Shotcut version 23.05.14. You won't see the
motion tracking filter if you have an earlier version. In my previous tutorial
I showed you how to use the motion tracker with the simple text filter. If you
didn't get a chance to see that I'll have a link in the description. This
time we're going to lock on to a moving subject and keep them relatively
still while the background moves. I'm sure you've seen this effect in music
videos and commercials for products like Beats by Dre. This effect is called
locked-on tracking. Because of this recent release you can now do it on Shotcut as
well and I'm going to show you how. Okay to execute the locked-on tracking
technique I'm going to use this video which is a video of a young woman playing
with a basketball but instead of tracking the female what I'm going to do
is I'm actually going to track the basketball and so what's going to happen
is I'm going to try to have the focus on the basketball and try to keep that
centered at all times and have the background move with respect to the
movement of basketball. So to get started I've already taken the liberty
of dragging the basketball file on my playlist and so from my playlist I'm
going to go ahead and drag it into my timeline. So let's just give it a minute
for it to think and there it is. As you can see it's on the timeline. I'm just
going to expand it a little bit make it bigger so that you can see. So once
again this is the video so I'm going to go to the very beginning of this
video and then I'm going to go into the filters tab right here and then I'm going
to click the plus button to add a filter and I'm going to look for motion
tracker and there it is. The minute you choose motion tracker you're going to
see this box here which is a rectangle with green background around it a green
border around it and so the green border represents what is being tracked and so in
this instance I'm going to track the basketball so I want to encompass the
basketball inside the green border and so you can grab the handles and you can
make the rectangle or square as big or small as you want. So now that I've
encompassed the basketball fully within again the green border I'm going to go
back into the motion tracker filter and I'm going to choose analyze. Now in
many instances once you click analyze the tracking may not work perfectly the
first time around. In this instance as you can see I just skipped over the
algorithm dropdown and I'm just choosing the default which is the CSRT
algorithm but if you find that when you click analyze it's not tracking your
object as closely as you want it to be go ahead and choose one of the other
algorithms here and then click analyze again. So before I allow the motion
tracker to analyze the movement of the basketball what I want to do is I want
to name this file or a dissection and so I'm just going to name it basketball
but if you leave that blank what happens is the motion tracker filter is just
going to assign a name to it odds are it's going to name it tracker one in this
instance I just want to name it basketball so that it's explicit and I
know what to look for when I begin utilizing it with other filters. So it's
named basketball now I'm going to click analyze and now a new line item in the
jobs window is going to show up and so there's going to be here a little status
bar let's just wait until this thing finishes the last time I did this it
took about a minute and a half okay it just finished analyzing so once the
filter finishes analyzing you can test how well the tracker track your subject
in this instance the basketball by just pressing play and you're going to see how
well the green border the box with the green border tracks the basketball as
you can see here it did a pretty good job on the first try I don't have to
worry about that anymore it did a great job tracking now before I move on to
the next step there's one thing I want to show you so as you've seen from the
beginning of these steps the box with the green border is around and what that's
meant to do is to show you how well the filter is tracking your subject the
problem is if you leave this preview checked this green box is going to show
up after you've rendered your video and so if you don't want to see the green
box anymore I suggest you click this checkbox that says show preview and so
you can toggle it on and off to see how well the tracking works but
ultimately you're going to need to uncheck that and so I'm already going to
uncheck that now so that I don't have to worry about it I already know that it's
tracking the basketball pretty well one more thing I just want to explain to
you what the filter just did so when I clicked analyze what it did is it tried
to follow the ball as closely as possible but more importantly what it
did was recorded the tracking on keyframes and once you recorded the keyframes you
then have the ability to share that keyframe or the keyframe information
with another filter another appropriate filter whatever whatever currently works
with motion tracker in this instance I want to share the keyframe information
from the motion tracker filter with the size position and rotate filter and so
that's my next step I'm going to go ahead and click the plus button again
and I'm going to choose size position and rotate now I'm going to leave this
alone and what I'm going to do is I want the size position and rotate to
use the saved keyframes that was generated by the motion tracker and to do
that you go to this button here that says load keyframes from motion tracker a new
window pops up and it's going to ask you which motion tracker do you want to
use so as you remember while I was in the motion tracker filter I saved the
motion tracker file as basketball the other thing is it's going to ask you
whether or not you want the keyframes or the motion tracking from the beginning
of the file or just where your current position is if I happen if my cursor
happened to be in the middle of the of the video I typically usually select
from the start so that I have all the motion tracking keyframes and I can always
edit that later and then lastly for the effect that we're going for I want to
choose offset position once I've chosen all the settings and it's all correct
I'm going to click apply once you click apply shotcut is going to think for a
little bit it's going to seem like it crashed or it froze but really what it's
doing is it's thinking the difficult thing about it is there really isn't a
timer or an indicator most of the time that tells you that it's processing the
only indicator that you're going to have is once you go to the keyframe all
of a sudden keyframes are going to show up that didn't used to be there so now that
it's there and you can see all the keyframes I'm going to go back to the
timeline and I'm going to press play and you're going to see the effect of
what sharing the keyframes with the size position and rotate did to the video
as you can see it tries to keep the basketball around the same place and to
do that it's moving the entire video around to compensate for it so of
course leaving it at the setting is not going to make sense you're going to see
a lot of black bars a lot of black areas around so the last thing that
you want to do is you want to go to the plus button and what I'm going to do is
I want to add another size and position and rotate filter I'm not going to make
these settings in the previous size position and rotate because that that one
is for the keyframes that is for tracking the basketball now the other
size position and rotate filter that one for me is meant to change the size of the
video itself so that we can eliminate all the black bars so what I'm going to do is
I'm going to play it again and I'm going to look for a part of the video that
has the most black bars and what I'm going to try to do is I'm going to try
to zoom into this video to compensate for that so what I'm going to do is I'm going
to zoom into it so that there are no longer any black bars the way I'm doing
it here is I'm just using the the scroller on the mouse you can also go
over here and also use the scroller on on your mouse here so that you can
zoom in or zoom out in smaller increments so as you can see the black bars are
starting to show up at the very top so I need to zoom back out a little bit and
just play around you can also change the settings here under size so let me
just let me just go back in here and let me just zoom in a little bit more
just to eliminate any of the black bars and so now I'm going to play the video
again and look for places just like that where there are still black bars
exposed which tells me I still need to zoom in even more so I'm going to zoom
into this video here I'm in the wrong the wrong area here okay so I'm going to play
some more to see if I can find any more black up there was one so I'm going to
backspace it a little bit just to see where that was right here again more
zoom hopefully that's it because I'm kind of running out of real estate here
okay so there's no more black bars so what I'm going to try to attempt is move
the basketball a little closer to center hoping that when I play it it's not
going to expose any black bars from the bottom which is the case right there
so if you notice that my video is a little jittery that's because I'm playing it at
full resolution let me see if I can use preview scaling it's going to be a
little bit more pixelated but at least it's going to move a little bit smoother
so now you can see the ball has kept has been kept a little bit more
center in the video now I'm going to take a risk here and see if I can actually
move the ball up even more hoping that it doesn't expose any more black bars as
it moves up and down okay so that's pretty good now if you really want to be
OCD you can always activate the grids and so that you can ensure that the ball is
centered exactly in the middle of your video but then you run like I'm moving
around and I run the risk of exposing some black areas let's see here no it
seems like it did the job so so I am now going to uncheck the grids icon and I
think it did a pretty good job and so the last thing I'm going to do is I'm
just going to export so let's just go into export and I'm just going to export
the file so once it finishes exporting this is what this video looks like and this
technique is called locked on motion tracking so what do you think have you
seen this effect before in other videos can you think of other use cases that
you would use this for if you do have some other use cases please go ahead and
share with me on on the comments in any case this is a pretty simple technique very
useful you might you might even be able to use this to further stabilize your
video if you have a video that's jittery you can lock on you can lock on to
something and you know maybe reduce some of the vibration so I hope you like
this video I just wanted to remind you that if you haven't yet go visit my
channel I'm sure you'll find tons of Shotcut related videos and don't forget to
subscribe so that you know when I drop a new Shotcut related tutorial every video
on my channel was done on Shotcut so aside from examples of what Shotcut
can do you can also visit my playlist of tips and tutorials all geared toward the
beginner visit my Shotcut tips and tricks playlist and learn all the tips
and tricks I've learned during my journey toward video editing so once
again please subscribe and I'll see you next time
you