guardianproject / ObscuraCam

Photo and Video Filtering App for Privacy
https://guardianproject.info/apps/obscuracam
GNU General Public License v3.0
309 stars 81 forks source link

Obscuring faces in videos #148

Open Phoenix616 opened 5 months ago

Phoenix616 commented 5 months ago

Currently (5.0.0 beta 1) the face detection and manual obscuring seems to only work on static images, videos seem to all fully pixalete without the ability to only obscure parts of it the same way as static images.

When reading that it can "obscure image and video" I kinda expected that both worked the same way, would be really interesting if this could be added. (Didn't find any open source app that can do this :/)

n8fr8 commented 5 months ago

We used to do exactly that on video, with multiple moving resizeable boxes of obfuscation or redaction in video. However, it was quite slow to process and render, and unstable on many devices.

n8fr8 commented 5 months ago

All of the infrastructure is in the app via the ffmpeg library to do this again, and even some of the old UI code, but it would require a few weeks/months of work to get it all modernized.

Phoenix616 commented 5 months ago

Interesting. Thanks for letting me know, maybe I'll take a stab at it. Seeing as there seem to exist some other, proprietary apps which allow this in a pretty fast way (probably because of the speed of modern devices) I bet it could be usable now.

n8fr8 commented 5 months ago

There are new hardware accelerated options built on the MediaCodec API but not sure which ones have the ability for the kind of dynamic pixel based filtering we need. Some examples:

https://github.com/natario1/Transcoder https://github.com/MasayukiSuda/GPUVideo-android

We have also thought of some generative AI approaches to this, but nothing tangible there yet.