2

I'm trying to black out/censor segments of a screen-recording. I basically need something to check the color of a pixel on the video, and if the color does not match, it somehow censors the section of the video.

Example: The source video needs to have at position 100;150 the color #f3f3f3. If this condition is true, just display the clip normally, if it's some other color, change the opacity to 0 or apply a blur.

(preferably in AfterEffects or PremierePro)

1 Answer 1

0

Below is how to change the colour of a shape in after effects based on the background colour at a given position:

Put a null on the position you wish to sample.

Put this expression in the fill colour of the object you want to change:

target = thisComp.layer("BGLAYER");
colorpicker = thisComp.layer("sample 1 null");
target.sampleImage(target.fromWorld(colorpicker.position), [0.5,0.5], true, time)

BGLAYER is the name of your background layer (eg your video)

sample 1 null Is the null which is colour picking

You will also need a conditional statement in the expression to switch its opacity on or off - I'm not sure how to do that, but will add it to this answer if I work it out.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.