Skip to content

How you can Blur Faces in a Video from Command Line

Privateness is at all times extremely vital, particularly with visible media the place you would possibly not have the permission of people within the video. In case you are filming one thing in public, it is most likely you’ll be able to catch any person’s face who merely does not need or wish to be recognized. This lately were given me to considering: what is one of the best ways to blur faces in a video by way of command line?

The most productive open supply application I discovered for blurring faces in a video was once deface. Let’s take a look at how you’ll use deface to blur faces in movies!

Get started through downloading Python-based by way of pip:

python3 -m pip set up deface

With deface put in, merely give you the video identify and get the output record with blurred faces:

sudo deface ./sample-4k-faces-video.mp4
Enter:  ./sample-4k-faces-video.mp4
Output: ./sample-4k-faces-video_anonymized.mp4

The ensuing video does an outstanding task of blurring out faces of individuals strolling through within the authentic recording:

View the ensuing video of individuals strolling down the streets of New York:

The default threshold for face reputation works rather well, even on shifting topics. You’ll experiment with thresholds with the thresh argument, or even draw the thresholds out whilst debugging:

I downloaded a handful of YouTube movies the use of my favourite YouTube downloading utility youtube-dl and I used to be amazed at how neatly deface did on numerous visible environments. Faces have been recognized at a competent degree even at default threshold!

  • An Interview with Eric Meyer

    Your early CSS books have been instrumental in pushing my love for entrance finish applied sciences. What was once it about CSS that you just fell in love with and drove you to jot down about it? To start with blush, it was once the simplicity of it as in comparison to the table-and-spacer…

  • Conquering Impostor Syndrome

    Two years in the past I documented my struggles with Imposter Syndrome and the reaction was once immense.  I gained messages of give a boost to and commiseration from new internet builders, veteran engineers, or even individuals of all revel in ranges in different professions.  I have even stuck myself studying the submit…

  • Create Classy Inputs Using MooTools’ OverText
  • CSS Text Overlap

    One of the most vital purposes of CSS is to put components. Margin, padding, most sensible, left, proper, backside, place, and z-index are simply some of the primary avid gamers in CSS positioning. Via the use of the above spacing…

Ready to get a best solution for your business?