Track Record
Rendering
To render your project, add a Write node (right-click, and then Image | Write) and plug the ChromaKeyer node in to it, as shown in Figure 8.
Create a new directory and pick a name for your frames. Something like transition####.jpg will work. Thanks to the #### part of the name, Natron can generate names for your files, such as transition0000.jpg
, transition0001.jpg
, transition0002.jpg
, etc.
Although most of the Write node's values are okay, you may want to change the Frame Range to Manual and then set the first and last frame to render. You should also change the Input Premult value to Opaque, or the chroma part of your animation sequence will show up white or black instead of transparent, depending on the output format you choose.
Tracking
Tracking is one of the more interesting and useful things Natron does quite well. A tracker automatically follows a portion of an image from frame to frame in a video clip.
Say you place a tracker on your main character's motorbike. If the tracking is done correctly, you can have Natron follow the motorbike all through a scene. You can use tracking data to stabilize a shot around the object: Although the motorbike is moving in the original clip, in the modified clip using trackers, you could make the whole environment move around the motorbike, giving your clip a dreamy, giddy feel.
How successfully Natron manages to track something will depend on the clip's quality. A high number of frames per second, a high definition, and a high contrast of the object you want to track with regard to the background is what is going to make tracking easier.
Tracking works on the principle that two consecutive frames within the same sequence (i.e., with no cuts between them) will be similar to each other. If you have someone riding the motorbike from left to right in frame 1, frame 2 will show something very similar, with that same someone, on the same motorbike, riding in the same direction. The only difference will be that the rider and their bike will have moved ever so slightly to the right of the frame. A program can track those slight changes, comparing frame 1 to frame 2, and keep a register of what has changed by inputting data into an array. If you wanted to track the position of the motorbike's back wheel, for example, Natron can create an array with the relative x and y position of said wheel throughout the whole sequence.
That, at least, is the theory. In real life, videos are wobbly, making frames blurry, and changes in light often throw the tracker … well, off track. This means the tracker needs some human assistance.
Load the clip you want to track. I used some stock footage of a motorcycle stunt [7] I found on Pixabay. Bring out a Tracker node (right-click, and then Transform | Tracker), and place it between your clip's Read node and the Viewer node.
Move to the first frame in your clip and double-click on the Tracker node to bring up its properties box to the top of the stack on the right. In your Tracker node's properties box, make sure you are on the Tracking tab and locate the largish text box at the bottom. Add a new tracker by clicking on the + at the bottom of text box (Figure 9). A new tracker will appear in the viewport showing the preview. It looks like a square bullseye and appears in the center of the viewport.
By clicking and dragging on the tracker's central point, you can drag the tracker onto the element you want to track. In the motorbike stunt video, I picked the nearest bike's back wheel. I placed the tracker's central point over the wheel's axle. You can push and pull on the tracker's handles so that it roughly covers the shape of the element you want to track (Figure 10).
With the tracker in place, theoretically you could just press the button with the right-pointing blue arrow in the upper left-hand corner of the preview pane and hope for the best. But the tracker is guaranteed to get lost. The correct thing to do is to place keyframes along the timeline so that the tracker only has to track for short stretches of frames.
The clip of the stunt is only 112 frames long, so you can place a keyframe every 10 frames. To do that, select the track you are going to work with by clicking on it in the property box (in Figure 10, the track1 track is selected), and then make sure you are on the first frame of the segment you want to track and that the tracker is covering the element you want to track. Move to frame 10 and move the tracker by hand (click on the tracker's central point and drag it) to the new position of the element. In the case of the motorbike stunt video, you move the tracker to every new position of the motorcycle's wheel.
Proceed through the clip, relocating the tracker every 10 frames. Each time you change the tracker's position, Natron will insert a new keyframe automatically into your timeline. Keyframes show up like little hourglasses in the timeline, and the Track keyframe value in the Tracking property box will have a dark blue background for keyframes and a light blue background for normal frames.
Once you have inserted all the keyframes, go back to the first frame and click on the right-pointing blue arrow button and hopefully the tracker will run from keyframe to keyframe, inserting all intermediate tracking data.
This is unlikely to happen, however. If the tracker gets confused and loses the thing it is tracking, it will stop on the frame that is causing problems. You then have to reposition the tracker by hand (which will insert a new keyframe) and start tracking from that point onward again.
To locate problematic stretches on a track, you may also want to toggle the showError button located over the preview. This button is located third from the right on the tracker toolbar, and its icon looks like a triangle with cut off vertices. Once toggled, Natron will color each point on the track in a different color: Green means the tracker had no problem at that point of the track, Orange indicates that there was some confusion, and Red shows that the tracker is probably completely lost. It is a good idea to scroll back to the red points, readjust the tracker by hand, and start it off again from that point onward.
Stable Genius
Once Natron has tracked until the end of the clip, you can stabilize the video. In the Tracking properties box, click on the Transform tab and choose Stabilize from the Motion Type drop-down list. And that is all there is to it: When you run through the video, the object you were tracking will remain in the same position relative to the sides of the viewing port, while the rest of the frame moves around it.
Things get wild when you track two points, like both wheels on the motorbike. Then the frame doesn't only move up and down but also revolves around the tracking point (Figure 11), as one tracking point revolves around the other. The effect is quite striking, if not a little dizzying.
You can see an example of tracking and stabilization, revolving frames and all, online [8].
« Previous 1 2 3 Next »
Buy this article as PDF
(incl. VAT)
Buy Linux Magazine
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters
Support Our Work
Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.
News
-
Gnome 48 Debuts New Audio Player
To date, the audio player found within the Gnome desktop has been meh at best, but with the upcoming release that all changes.
-
Plasma 6.3 Ready for Public Beta Testing
Plasma 6.3 will ship with KDE Gear 24.12.1 and KDE Frameworks 6.10, along with some new and exciting features.
-
Budgie 10.10 Scheduled for Q1 2025 with a Surprising Desktop Update
If Budgie is your desktop environment of choice, 2025 is going to be a great year for you.
-
Firefox 134 Offers Improvements for Linux Version
Fans of Linux and Firefox rejoice, as there's a new version available that includes some handy updates.
-
Serpent OS Arrives with a New Alpha Release
After months of silence, Ikey Doherty has released a new alpha for his Serpent OS.
-
HashiCorp Cofounder Unveils Ghostty, a Linux Terminal App
Ghostty is a new Linux terminal app that's fast, feature-rich, and offers a platform-native GUI while remaining cross-platform.
-
Fedora Asahi Remix 41 Available for Apple Silicon
If you have an Apple Silicon Mac and you're hoping to install Fedora, you're in luck because the latest release supports the M1 and M2 chips.
-
Systemd Fixes Bug While Facing New Challenger in GNU Shepherd
The systemd developers have fixed a really nasty bug amid the release of the new GNU Shepherd init system.
-
AlmaLinux 10.0 Beta Released
The AlmaLinux OS Foundation has announced the availability of AlmaLinux 10.0 Beta ("Purple Lion") for all supported devices with significant changes.
-
Gnome 47.2 Now Available
Gnome 47.2 is now available for general use but don't expect much in the way of newness, as this is all about improvements and bug fixes.