Jump to content

Profanity filtering (muting)


wowsers

Recommended Posts

sfatula
1 hour ago, crusher11 said:

They're just words. 

You are entitled to your opinion, and I am sure you are right for you. But that does not apply to everyone and I doubt anyone asked. This is a request by those of us who (obviously) do care about the issue.  If they are just words, then, you should complain to Emby forum admins as such language we want to get rid of is not allowed on this forum as well. Along with many other places in life. Recent quote from Luke: "Hi, please refrain from profanity as this is a family friendly environment. ". Which exactly matches what we are asking for!

  • Like 2
  • Agree 1
Link to comment
Share on other sites

  • 6 months later...

There was a plug-in for XBMC/Kodi awhile ago that did exactly this. You could choose the severity of curse word you would want to remove, then choose how large of a section you wanted to remove based on milliseconds (250-300 was about perfect). It would read the subtitles, and then output an EDL that would automatically be processed when the show/movie played. As long as the subtitle track was accurate, ie not for a different version of the show/movie, it worked beautifully. 


I still have the original plug-in somewhere. I’m not a coder though so no idea how well it could be ported to Emby. 

Link to comment
Share on other sites

sfatula

So if I understand correctly, on a antenna recording, I need to extract a srt file from the recording via various tools, make it a srt file, run through PMFileGenerator to get edl from my muted words, and then play with the plugin installed. Should work on Apple TV with Emby client.

All sound correct?

For other content liked converted owned Blurays, I can do the same but the advantage of the tool is I avoid what is probably more work. Currently, I demux the audio, extract/convert srt, manually search, edit audio in audacity as needed, remux. 

Link to comment
Share on other sites

BillOatman
2 hours ago, sfatula said:

So if I understand correctly, on a antenna recording, I need to extract a srt file from the recording via various tools, make it a srt file, run through PMFileGenerator to get edl from my muted words, and then play with the plugin installed. Should work on Apple TV with Emby client.

All sound correct?

For other content liked converted owned Blurays, I can do the same but the advantage of the tool is I avoid what is probably more work. Currently, I demux the audio, extract/convert srt, manually search, edit audio in audacity as needed, remux. 

Yup that's pretty much it.  But PMFileGenerator will create a EDL and a new SRT file.  The new srt file contains the subtitle text for the lines that get muted out, with the undesired words replaced with asterisks.  The plugin can only mute a complete srt file entry, typically a sentence, not individual words.

Edited by BillOatman
  • Like 1
Link to comment
Share on other sites

  • 1 month later...
kennethpruett

Thanks for the information on the plugin.

I've been looking for methods for years.   Unsure why there is so much resistance to add EDL support to home media systems. 
Possibly they are concerned of getting sued.

In the mean time, my search came across two solutions, one for online streaming and one for processing your own files.


Processing Your Own:
Cleanvid - https://github.com/mmguero/cleanvid/

In a nutshell, it uses subtitles (either in the video or srt file) and spits out a new video file (only alters audio so its fast) and subtitle file with profanity removed.
It can also output an EDL file if thats all you want.

Quote

cleanvid is a little script to mute profanity in video files in a few simple steps:

  • The user provides as input a video file and matching .srt subtitle file. If subtitles are not provided explicitly, they will be extracted from the video file if possible; if not, subliminal is used to attempt to download the best matching .srt file.
  • pysrt is used to parse the .srt file, and each entry is checked against a list of profanity or other words or phrases you'd like muted. Mappings can be provided (eg., map "sh*t" to "poop"), otherwise the word will be replaced with *****.
  • A new "clean" .srt file is created. with only those phrases containing the censored/replaced objectional language.
  • ffmpeg is used to create a cleaned video file. This file contains the original video stream, but the audio stream is muted during the segments containing objectional language. The audio stream is re-encoded as AAC and remultiplexed back together with the video. Optionally, the clean .srt file can be embedded in the cleaned video file as a subtitle track.

You can then use your favorite media player to play the cleaned video file together with the cleaned subtitles.
As an alternative to creating a new video file, cleanvid can create a simple EDL file (see the mplayer or KODI documentation) or a custom JSON definition file for PlexAutoSkip.

I've used it successfully on about 3 movies so far.
Some understanding of install and use of Python is required.  I did so on Ubuntu 20.04LTS.

 

Online Streaming:
Enjoy - https://www.enjoymoviesyourway.com
Similar to VidAngel but they dont have the legal issues and works with Roku.
It works with almost all the online services (Netflix, Amazon, Disney+, Peacocktv, HBO Max, YouTube, Hulu).
Best part is you can use it for free with 60 sec intermission breaks every 15 mins. 
Upgrade for $6/month and removes that and adds more functionality.
(I'm not affiliated with them and dont have any financial benefit from sharing them, they just made a solution that works for me, so sharing)

  • Thanks 1
Link to comment
Share on other sites

Amanade3
On 30/12/2022 at 00:34, BillOatman said:

Yup that's pretty much it.  But PMFileGenerator will create a EDL and a new SRT file.

I opened the PMLfile generator but every time I hit enter it just quits the app without doing anything can you help?

Screenshot 2023-02-12 132618.png

Link to comment
Share on other sites

BillOatman
8 hours ago, Amanade3 said:

I opened the PMLfile generator but every time I hit enter it just quits the app without doing anything can you help?

Screenshot 2023-02-12 132618.png

It isn't doing nothing, it is showing you how you need to run it. It is a console app so it needs parameters, you can't just double click it in file explorer.

PMFileGenerator <Full path to srt file> <Full path to muted words file>

So for example:
PMFileGenerator c:\movies\MyLittlePony.en.srt c:\PMFileGenerator\MuteList.txt

The mute list file that I use and more info here.

Info on the Emby plugin that uses the file that PMFileGenerator generates can be found here.

Edited by BillOatman
Link to comment
Share on other sites

Amanade3
24 minutes ago, BillOatman said:

It isn't doing nothing, it is showing you how you need to run it. It is a console app so it needs parameters, you can't just double click it in file explorer.

Tnx for the reply but i'm a noob here and i still don't get it. I don't know how to execute the program. Should i rename the file path after the PML file gen. I checked the github readme and its not clear.

Link to comment
Share on other sites

  • 5 months later...
danielmhair

What about using AI to convert the audio to text with word level transcription? And seems fast.

https://replit.com/@DavidAtReplit/OpenAI-Whisper-Transcriber

Link to comment
Share on other sites

  • 2 months later...
gene0915

Not sure if I (or somebody else) already mentioned it before but here's another program to put in your tool belt for removing profanity: link

I was in the process of cleaning up Stranger Things but noticed in season 4, episode 1, right after the 16 minute mark, one of the characters says "bullsh*t". For whatever reason, this word is not in the sub-title text. I'll probably delete the entire scene since it does nothing to add to the story.

  • Like 1
Link to comment
Share on other sites

BillOatman
On 10/16/2023 at 3:05 PM, gene0915 said:

Not sure if I (or somebody else) already mentioned it before but here's another program to put in your tool belt for removing profanity: link

I was in the process of cleaning up Stranger Things but noticed in season 4, episode 1, right after the 16 minute mark, one of the characters says "bullsh*t". For whatever reason, this word is not in the sub-title text. I'll probably delete the entire scene since it does nothing to add to the story.

Wow via the actual audio.  Ambitious!  

If you use my apps you could always add the word into the subtitle file and remove it that way as well.

Edited by BillOatman
Link to comment
Share on other sites

rbjtech
18 minutes ago, jaycedk said:

This is just a joke 😎 no harm ment.

Are you guys trying to change freedom of speech 🤔😂🤣

I did chuckle myself - not happy with the word BS, but happy to show sheer terror and psychological horror ... ok ... 🤔 🤣 .. 

  • Haha 1
Link to comment
Share on other sites

gene0915
9 hours ago, jaycedk said:

This is just a joke 😎 no harm ment.

Are you guys trying to change freedom of speech 🤔😂🤣

Nope.

When I grew up, using swear words in my house was something we did not do. My parents didn't swear and none of us kids would dare do it either else we'd get a bar of soap in our mouth or a belt across the bottom.

As I grew up and had kids of my own, I have the same policy in my house. No swearing allowed, period. Because society is decaying more and more on a daily basis, I know I can't protect their ears 24x7 but in my house, I can block out the world and give them a loving, nurturing environment. My youngest use to take the bus to/from school but after hearing the language these 2 boys were using at the bus stop, I now drive her to/from school. These foul mouth little monsters were saying things that would make a porn star blush.

Thankfully, my children are nerds and just like playing online games with their friends. If their friends drop an F bomb during a gaming session, they know to ask them to stop else they'll have to quit playing with them. Yes, I sit within ear range and listen to their voice chat.

I always edit out swear words from their shows and movies before they watch them and sometimes will even delete entire scenes that display content that doesn't align with my beliefs. For unknown reasons, this enrages some people.

I'd never tell anyone how to raise their child or what they should or shouldn't let them watch and I don't want anyone to do that to me. They're MY kids and I'll raise them how -I- see fit.

If studios want to make an amazing movie that has 60 minutes of a perfect story, followed by 30 minutes of the lead character just standing on screen dropping the F bomb non-stop, no problem. I'd never demand they remove that movie from theaters and if somebody wants to take their 6 year old to see it, knock yourself out. What I would do is wait for a digital release of that movie, delete everything after the 60 minute mark and go on with life and nobody should get upset about that.

For some crazy reason, we as a society were able to survive and make progress without non-stop profanity in TV shows and movies for decades. Then, the FCC decided they needed to allow disgusting and vulgar things in all forms of media. I have yet to see the benefit of that decision but I digress.

As time goes on, I find myself watching more and more shows and movies from the 30s, 40s, 50s and 60s. This modern stuff is just garbage.

  • Like 2
  • Haha 1
Link to comment
Share on other sites

I'll just mention that nothing has changed with the FCC regarding naughty words. Its power to regulate words is just limited to the broadcast channels it licenses.

The cable/satellite/streamers have always self regulated their language/content. They just collectively relaxed their internal policies to chase Netflix.

Link to comment
Share on other sites

gene0915
On 10/20/2023 at 11:22 AM, BillOatman said:

Wow via the actual audio.  Ambitious!  

If you use my apps you could always add the word into the subtitle file and remove it that way as well.

I have absolutely used your amazing app many times! :)

The one thing I like about MPR is, as you stated, it directly edits the audio so only the vocals with profanity are muted while you can still hear everything else. I hope the author revisits it from time to time to make updates.

Link to comment
Share on other sites

  • 1 month later...

"The plugin needs to be installed manually, it is not in the plugin catalog (at least not at this time). Take the released DLL file, or create your own DLL file from the source, and put it in the plugin directory along with all of your other plugins. No other files are required."

@BillOatmanI'm super confused.  I downloaded all the files from GitHub and nowhere is there a DLL file.  What am I missing?

Link to comment
Share on other sites

BillOatman
18 hours ago, wjhazel said:

"The plugin needs to be installed manually, it is not in the plugin catalog (at least not at this time). Take the released DLL file, or create your own DLL file from the source, and put it in the plugin directory along with all of your other plugins. No other files are required."

@BillOatmanI'm super confused.  I downloaded all the files from GitHub and nowhere is there a DLL file.  What am I missing?

It's in the zip file here.

Link to comment
Share on other sites

  • 2 weeks later...
tmurphy2792

@BillOatmanthese tools sound like they'll be extremely helpful, thanks for putting these together and sharing.
So I'm just starting into trying to set these up, and I'm admittedly not very advanced in this stuff.
I understand the PMFileGenerator needs an SRT file in order to function? Any advice on something to generate that?


Following the info in the PDF included with ComSkipper, I have successfully setup comskip with a batch file to trigger it after the recording. It is generating the edl files beautifully.
While I was strugglebussing to figure out how to build the dll for ComSkipper I stumbled upon this Pottymouth plugin and I was wondering how to get them to work in concert?
Can I just set up my batch file to trigger comskip, then trigger something to generate srt, and finally trigger PMFileGenerator? 


I'm assuming either PMFileGenerator will just append to the EDL created by comskip, or will I need to configure it to use a separate edl?
I guess following up on that, if they use the same EDL file do I need both plugins? Since it sounds like PM is capable of skipping and muting?

 

Sorry that's a lot of questions, hopefully they all make sense. 
Thanks in advance for any help/advice you can offer.

Link to comment
Share on other sites

BillOatman
6 hours ago, tmurphy2792 said:

@BillOatmanthese tools sound like they'll be extremely helpful, thanks for putting these together and sharing.
So I'm just starting into trying to set these up, and I'm admittedly not very advanced in this stuff.
I understand the PMFileGenerator needs an SRT file in order to function? Any advice on something to generate that?


Following the info in the PDF included with ComSkipper, I have successfully setup comskip with a batch file to trigger it after the recording. It is generating the edl files beautifully.
While I was strugglebussing to figure out how to build the dll for ComSkipper I stumbled upon this Pottymouth plugin and I was wondering how to get them to work in concert?
Can I just set up my batch file to trigger comskip, then trigger something to generate srt, and finally trigger PMFileGenerator? 


I'm assuming either PMFileGenerator will just append to the EDL created by comskip, or will I need to configure it to use a separate edl?
I guess following up on that, if they use the same EDL file do I need both plugins? Since it sounds like PM is capable of skipping and muting?

 

Sorry that's a lot of questions, hopefully they all make sense. 
Thanks in advance for any help/advice you can offer.

Hi. ComSkipper and PottyMouth are 2 independent plugins. You can have either or both plugins installed and active.

Comskipper skips commercials using the comskip EDL file to know where to skip.

PottyMouth skips "bad" words using the EDL file generated by PMFileGenerator.
PMFileGenerator  uses the videos SRT (subtitles) file to generate the EDLfile used by PottyMouth ,and will also generate a SRT (subtitles) file to use to display the sentence with the undesired work scrubbed. You will want to use this generated subtitle file when playing a video using PottyMouth.

PMFileGenerator needs the SRT (subtitle) file from the video so it knows where the bad words are to mute out. They often come with the video file if you downloaded it, and can also be inside the MKV or MP4 container.  If it's in the container you will need to extract it for PMFileGenerator to use. There are free tools to do so. I like MKVToolNix. It can also do things with MP4 containers. They can also be downloaded from OpenSubtitles and other places.

Important safety tip.  :  Check the timing on any SRT file you use.  If the timing is not accurate you will find the wrong words muted and the undesired ones will come through loud and clear :)

Hope that helps.

Edited by BillOatman
Link to comment
Share on other sites

tmurphy2792

@BillOatmanThanks for the feedback.

So I continued to play with them last night and came to the unfortunate realization that because I use roku devices for the vast majority of my watching, neither of these plugins will work for me.
I can be watching from a web browser and have it skip and mute beautifully, but the roku devices play the stream completely uninterrupted without skips or mutes.
To my understanding from finding some of your other posts, this is a limitation of the client app, correct?

MKVToolNix: Thanks for that suggestion, want to say I've played with this one in the past. I'll test to see if it works with the .TS files I'm receiving from my over the air antenna.

Link to comment
Share on other sites

BillOatman
7 hours ago, tmurphy2792 said:

@BillOatmanThanks for the feedback.

So I continued to play with them last night and came to the unfortunate realization that because I use roku devices for the vast majority of my watching, neither of these plugins will work for me.
I can be watching from a web browser and have it skip and mute beautifully, but the roku devices play the stream completely uninterrupted without skips or mutes.
To my understanding from finding some of your other posts, this is a limitation of the client app, correct?

MKVToolNix: Thanks for that suggestion, want to say I've played with this one in the past. I'll test to see if it works with the .TS files I'm receiving from my over the air antenna.

That's correct.  If you play something and look at the Comskipper/PottyMouth server log it will probably say that the client doesn't support it.  That ability being added to the Roku was requested some time ago.  You can try asking in the Roku forum and see what they say, but there isn't anything I can do about that.  Sorry.  

Link to comment
Share on other sites

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...