You can do it by applying an expression (wiggle) to mask the vertices.
I just tried a new (to me) Script, “maskPointsExpression.jsx”. It works a charm. You can get it here:
https://www.nabscripts.com/Downloads/downloads_en_2.php?id=5#maskPointsExpression
Demo on the page has little vid demo, I saw that after I typed the following walk-through, oh, well, details follow:
Add “maskPointsExpression.jsx” to your AE Scripts Folder, then fire up AE.
Run>Script>maskPointsExpression. Then select your mask,
Click on “Calculate” (it puts up a number equaling the vertices
Click on All (to apply expression to all vertices)
Click “Position”, write this expression in the box:
wiggle(15,20)
The 15 (frequency – how often) is your given example frame rate (since you want it to change every frame) and the 20 (amplitude) is how many pixels you want them to jump around (that’s really the max jump, I think). Change to taste.
Anyway, it creates a new mask, named “Animated mask” with the keyframes determined by the expression.
Pretty slick.
Be forewarned, trim footage to only as long as you needed, I had a 30 second clip in a 4 sec comp, yet it calculated the keyframes for all 30 sec, taking a long time (5 minutes plus). After trimming the clip, it knocked it right out.
There is an earlier script, written for Roto work, that attaches mask vertices to track point keyframes (and you can write expressions for the Track Points, then Convert to keyframes). It works but is a longer work around, an earlier post, here:
https://forums.creativecow.net/cgi-bin/new_read_post.cgi?forumid=2&postid=891545
It’s a great script for roto, but I think the new one is easier for putting expressions on a mask.