Jump to content

Python Profanity Filter Mute Script


Recommended Posts

Posted

I've been a subscriber to Emby for a long time, we also have used VidAngel and Enjoy for a long time... we all have our reasons. Anyways, I've seen this come up as a feature request and I know @BillOatmanhas implemented the pottymouth filter which reads .edl files (huge fan Bill, I use your comskipper plugin it's much appreciated) but I haven't been able to make it as consistent as I like. Pottymouth may do what you like, but if not here is another option.

This implementation isn't a plug-in but a python script that utilizes whisper to find the timestamps and profanity based on a JSON list of profanity, organized by severity (editable). Then, ffmpeg mutes those time codes and inserts a new audio track, so you have the original and you have a clean version depending on what you'd like to watch.

Whisper runs pretty fast, but the command currently needs to be run manually. Haven't gotten to it yet, but I'd like to automate it some. Just was really impressed at my first implementation of the script. I'm sure there's a way to have this run automatically when new files are added, though for me personally it isn't every file I'd like to run this on... i.e. live TV recordings don't have profanity by default. 

Here's the GitHub repo for those that want to try it out or contribute!

https://github.com/wpbryant/profanity

  • Thanks 1
BillOatman
Posted (edited)

@willum Cool idea using ffmpeg to create "dirty and clean" audio tracks!  So long as your kids aren't clever enough to figure out how to change the audio track when you leave the room ;)

I should probably switch to faster-whisper as well.

Edited by BillOatman

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...