Censoring a Person or Object
December 2nd, 2008 by Rob Strobbe | Filed under Tutorials.Someone in your documentary is wearing a t-shirt with a logo for a product you don’t really feel comfortable advertising. Or some random person walked into your shot but won’t sign a release form for you to use their likeness. Or maybe you just want to obscure a rude gesture.
Blur it. Or pixelate it. Easy enough, but how do you censor just part of a video in Sony Vegas while leaving the rest of it clear as day? Let’s find out.
The Pixelate FX is a good candidate for this trick, but like the rest of the effects, it doesn’t have an option to only affect one area of the screen. The trick is to add your media twice, one instance above the other, apply the effect to one instance, and then use masking to make sure only part of one those tracks is visible.
For this example, I’m using stock footage of a horse drawn carriage from Stock Footage for Free. If you want to follow along exactly, download the clip from them (registration is required but free). Alternatively, use your own footage and adjust your settings accordingly. I’ll be demonstrating how to censor an object that moves within the frame, so it would be helpful if you have something similar.
Once you’ve chosen a video to censor, drag it onto a Vegas timeline. If you don’t already have a video track where you drop the video, Vegas will create one for it. If you need to crop it, add any other effects, or adjustments, do so now. Once you have it generally looking the way you want, we’re going to create a copy on the track below. Do this by holding down Ctrl on the keyboard, clicking the event with your video, and dragging it to an empty area below the track you already have. You’ll end up with two duplicate tracks. (In fact, you will get the same result if you right-click the track header and choose Duplicate Track.)
The first thing I’m going to do is apply the “censoring” effect to the copy on the upper track. Go to the Video FX window, select Pixelate from the list, and drag the Medium preset onto the event. You can see in the Preview window that the entire frame looks blocky. Adjust the settings in the Video Event FX window to make the image as pixelated as you like (scrub through the timeline so you can see how it looks throughout the whole video) and close the Video FX window.
Now we’ll isolate only the area we want censored. There are a few ways to mask out areas in Vegas. The driver’s face is a pretty basic shape, so the quickest way is to use the Cookie Cutter FX. Go to the Video FX window, select Cookie Cutter, and drag the Circle Center preset onto the event on the upper track. This preset cuts away everything from this event (which, remember, has the Pixelate FX applied to it) except for a large circle in the center. For the rest of the frame, this FX reveals our unpixelated event below. This puts on the road to what we really want: a circle that is about the size of the driver’s head and that moves along with his head throughout the video.
I want the difference between my censored and uncensored areas to be more obvious while I work, so I’m going to temporarily add another effect. If you think this will help you as well, select Color Curves in the Video FX window and drag the Night preset onto the event on the upper track. To return to editing the Cookie Cutter FX, click the “Cookie Cutter” button in the FX chain at the top of the Video Event FX window. (Be sure that you don’t deselect its check box, though, or you won’t see the effect any longer.)
Now, let’s get down to business. As mentioned above, we have a circle where the upper event is pixelated. It’s too big and in the wrong place. On the left of the Video Event FX window is a box with a square inside it. By dragging that square around, you can move the center of the circle around the frame. You can also type the X and Y coordinates for the center in the appropriate textboxes on the right. Try to center the circle around the driver’s head if you’re following along with my example. Then adjust the Size of the circle so that it covers his head but not a whole lot more. After some work, I’ve found that the following settings work well for the first frame of this video:
- Size: 0.010
- Center X: 0.650
- Center Y: 0.470
There, that censors the driver’s face in the very first frame. Of course, if you play the video, that pixelated circle stays the same size and position the whole time — it doesn’t follow the driver, who is going to be very upset that we only hid his face very briefly. Luckily, Vegas makes it relatively easy to change a Video FX’s settings over time through the use of keyframes. Every “animation” requires at least two keyframes — one with one collection of settings and a later one with a different settings. Vegas then interpolates the frames between and “animates” what it can in order to get from one state to the other. You could go through the video frame by frame and add a keyframe for each state you need, but it’s less work if you start out by putting keyframes in the places you are absolutely sure will be different. Then check the frames in between to see where you may need to fine tune.
By changing the size and position above, we’ve edited the first keyframe that Vegas includes by default. Now, below the keyframe timeline at the bottom of the Video Event FX window, click the Last Keyframe button. This puts the cursor at the very end of the keyframe timeline and, in the Preview window, displays the very end of the event. By using the left and right arrow keys on the keyboard or hunting and pecking with your mouse, find the frame just before the driver’s head leaves the screen. Around 00:00:09:04 is good. (That’s nine seconds and four frames into the event.) Below the keyframe timeline, click the Create Keyframe button — it’s a diamond with a plus sign in it. Now, adjust the size and postion of the circle to again cover the driver’s head. These settings should work well for the frame I indicated above:
- Size: 0.045
- Center X: 0.000
- Center Y: 0.210
If you preview the video, you’ll see that Vegas “fills in” between the two keyframes. The pixelated circle moves from one place to the other and increases in size. But the driver must not be moving at an entirely steady pace — because the circle gets ahead of him at first, and then he catches up by the end. We’ll need more keyframes to keep them in sync. When it comes to adjustments like this, I like to divide in conquer. I’ll first find a spot around the middle of the video, create a keyframe, and adjust the size and position of the circle. Notice that when you create a keyframe, it defaults to keeping whatever settings Vegas interpolated for that moment in time, so you should only need to tweak each one a little rather than having to start from scratch. To fine tune this, I’ll preview the video and, for each area where the pixelated circle drifts off of the driver’s head, I’ll put a new keyframe halfway between two adjacent ones and make any adjustments I need to the Size and Position of the circle. I ended up with seven keyframes to follow the driver accurately.
One last adjustment to the Pixelate FX needs to be made. You may have noticed that if you play the video, there remains a pixelated circle on the screen even after the driver has gone completely out of frame. This is because in order to follow the driver off screen, we would need to give our circle’s Center X a negative value, and Vegas won’t let us. The lowest value we can use is 0, which puts will always leave half of the circle on screen. To remedy this (and still censor the driver’s face until it’s completely out of frame), find the frame at which the driver’s head has gone completely out of frame. There, create one more keyframe and set the circle’s Size to 0. Beginning with the previous keyframe, Vegas will shrink the circle as the driver leaves the screen, leaving a full and uncensored scene. Lastly, if you added Color Curves or some other FX as a temporary aid, make sure that you click on that FX in the FX chain at the top of the Video Event FX window and hit the Remove Selected Plug-In button to the right.
When you’re all done, you should have something similar to this:
Tags: cookie cutter, effects, pixelate




For everyone who is attempting this , dont waste your time! it doesnt work.
Tell me what’s happening with your project, diz, and maybe I can help you figure out why you’re not getting the intended result. I created the example at the end of the article (and many others) using exactly the steps I describe, so it most certainly does “work.”
Rob – Great site. I was looking around for Vegas Tutorials – and you’ve got a great start here on this site. Subscribing to your feed now…
Those steps in your tutorial definitely work – I have done something similar in the past.
In any case, do you know some way I can do a cookie cutter shape that’s rectangular? I felt limited by the shapes that are offered in the plugin’s preset list.
You also mention there are other ways to achieve the masking… would be interested to know what else you would recommend!
Cheers,
Scott
Thanks for the comments and the questions, Scott! I’ve gone through the article repeatedly, and it sure doesn’t seem like I’ve left anything out.
When you’re looking at the Video Event FX window for the cookie cutter FX, you should have Rectangle as an option for Shape. As you say, though, it’s rather limited. Of particular problem, you can’t adjust the aspect ratio. Best as I can tell, it’s determined by your project’s size at the time the cookie cutter FX is added.
For a rectangle shape, I’d go with Pan & Crop instead. Click the Pan / Crop icon on the event you want to mask, and in the Event Pan / Crop window:
1. Make sure that the Lock Aspect Ratio icon on the left is disabled;
2. In the Source section, change the Stretch to Fill Frame setting to No;
3. In the Position section, enter the Height and Width values you want.
You’ll then have a masked rectangle that’s the dimensions you want, not the ones Vegas wants.
That’s one of the other ways of masking. Another way is Bezier masking, which works similar to creating a path in Photoshop. This method is also accessed in the Pan / Crop window and is enabled by checking “Mask” next to the keyframe timeline.
I was avoiding Bezier masking while writing the article because 1) it can require a whole tutorial on its own, especially when you have to move the mask around and change its size and shape; and 2) it’s only available in Vegas Pro, whereas Vegas Movie Studio users have access to the cookie cutter FX. It is great, however, when you need to make a custom shaped mask.
Rob
Awesome – thanks Rob! Great tips! I wasn’t aware you could do that with the Crop & Pan. Will definitely find a use for this sometime.
Cheers
Scott
Just had a problem with the cookie cutter. When I add it, the circle not selected by the cookie cutter appears black. how do i fix this?
Curious, Rick. First thing to do would be read through the tutorial and be sure you followed all the steps — and if you added any of your own, un-add them to see if they had an effect. Following the tutorial closely shouldn’t result in what you describe.
A couple things I can think of that might introduce a black area:
If you’re still stumped, you can send me the project file at rob AT vegasvideohelp DOT com (no media files necessary, just the VEG or VF if you’re using Vegas Movie Studio), and I’ll see if I can figure it out.
Thanks for reading!
I have Movie Studio 9.0 Platinum and I’ve tried to follow the instructions in your (Rob’s) comment of 16/01/09. But even if I set Maintain Aspect Ratio to No and Stretch to Fill Frame to No, the values for Width and Height in the Position window can’t be changed independently: altering one makes an automatic change in the other by the same ratio. Any ideas?
What I’m trying to do is actually rather simpler than you describe. My Sony HF10 produces 16×9 AVCHD footage, but when the shot is of someone standing I often tend to get extraneous material that I need to cut out at the edges. I thought I could just crop it to 4×3 aspect ratio, throwing away one or both sides of the image. But I’m just learning Vegas Movie Studio and I can’t find a way to do it!
Thanks!
Hi, Jeremy! This is a case, I’m afraid, of the interface having two options whose names are too similar.
Check back, and you’ll see that it’s Lock Aspect Ratio, not Maintain Aspect Ratio, that I reference. The Lock Aspect Ratio option is as icon on the far left of the Event Pan/Crop window — looks like a white rectangle with a smaller shaded rectangle and a small arrow in the lower right corner). It controls the actual crop region.
The “Maintain Aspect Ratio” option (under Source), on the other hand, determines how the original source video behaves in the project as a whole.
At any rate, Sony includes a preset that, if I understand you right, does exactly what you want. Near the top of the Event Pan/Crop window, click the dropdown box next to “Preset” and choose 4:3 Standard TV aspect ratio and see if that gets you want you want.
If not, try some of the other presets.
Good luck, write back if you have any questions, and thanks for reading!
Rob
Thanks, Rob! I hadn’t spotted the “Lock Aspect Ratio” button and it does indeed do just what I want
.
I seem to need to set “stretch to fill frame” to “Yes”, or otherwise the video produced has black bars at both top/bottom and sides. I don’t quite understand why, as I’m retaining a height of 1080 when I crop.
Thank you so much for your help.
Jeremy
This really helped me. Thank you it’s much appreciated.
You’re welcome. Happy censoring!
I love You Man!
Great tutorial for Sony Vegas Premium users.
Thank You so much
You’re welcome, and thanks for the kind words. Tell your friends!
Thanks for this tutorial.
Interestingly, I applied the pixelation via the track fx button and not by dragging the effect on to the track. This made no difference until I produced the video and everything but the pixelation was there.
I reread your tutorial, dragged the effect to the track and then did the producing again and everything worked. I don’t know if it’s a bug in Vegas or a feature I don’t understand, but thought I’d share why it didn’t work at first for me.
That is interesting, Tim. I can’t think of a reason that would happen. I’ll give it a try and let you know what I find. What version are you using?