Kodi Community Forum

Full Version: [OPEN BETA] Mute Profanity
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
Quote:Is it possible to make Kodi use a .edl file for any and every movie that is played through Kodi? Basically wondering if I could tell Kodi to look in folder downloads, and if there is a .edl file there, no matter what the name is, use it for whatever video is being played.
@probbiethe1 : Unfortunately no, that's not how Kodi works. Kodi has it's own rules of where to look for an .edl file and what it considers a match. The plugin cannot change Kodi's built in behavior.
(2019-01-03, 03:01)kasher1979 Wrote: [ -> ]Could you make a plugin or app or whatever for Roku that reads its captions and mutes set words?

Hey @kasher1979. I do not think this is possible. Kodi's plugin system doesn't allow a plugin to view the captions about to be viewed during playback, and neither does the Roku system allow you to interject your own code to view captions and analyze them during playback. The main reason this plugin works the way it does (requiring you to pre-process the video file), is because I couldn't find a way to do it during live playback.
(2018-12-28, 05:29)MovieCleanup Wrote: [ -> ]The following is my basic knowledge share with the Mute profanity community for what its worth. 
http://moviecleanup.droppages.com

@MovieCleanup, this is excellent! Thank you for the write up and glad to see how you're doing so much more with it!
(2013-07-14, 16:19)fegunz Wrote: [ -> ]I should probably include the README as well, so people can know what this plugin does:

I've created a plugin that is designed to mute profanity in your movie library. It works by comparing the movie's subtitle file against your filter file. When a match is found, XBMC will mute the audio for the duration of the word.

How to use it:
Navigate to a movie or TV show you'd like to edit. The add-on will try to find the subtitle file for that movie, extracting embedded subtitles if possible. If you don't have one, it will ask if you'd like to download one. Downloads come from www.opensubtitles.org. After a very brief processing time, you then play the movie normally. You will notice that the blocked words are muted!

Key Features:
* Category-specific strictness ratings
* Mute profanity in either movies or TV shows
* Extract subtitles automatically from MKV or MP4 files
* Download missing subtitles from the internet
* Edit the strictness in the settings menu

Configuration Details:
Since the subtitle file and not the audio itself is analyzed, you will notice that the mute times are not always exact. The script is only guessing when the blocked word is spoken, and it can be wrong sometimes. This add-on includes a setting which specifies the amount of time in milliseconds before and after the time of the blocked word that XBMC should start and end the mute. By default, this is 300ms, but can be adjusted for more or less time, depending on preferences.

It's important to have an accurate subtitles file, with correct timings. If you notice that your subtitles show up too early or too late, the script will mute too early or too late as well. Even with max timing settings, the plugin will not mute before or after the subtitle is no longer displayed.

After you download and install the application, the list of blocked words is found in the script directory under "resources"->"filter.txt". Each word should be on it's own line and you can use the '*' character to match any number of characters. Change this file as you see fit.

How it works:
XBMC has built-in the ability to read a EDL file (Edit Decision List) and process it accordingly. The script will create this file, which contains the timestamps of when mutes should occur. Again, this calculation is found from processing the subtitles file of the movie being 'edited'. If no SRT file could be found, the add-on will attempt to download one based on the name of the file from www.opensubtitles.org. If one could not be found, the script will fail. If you need to mute a movie and the download feature is not working, I suggest you download the SRT file separately, ensure that it's timing is correct, then re-run my script to mute the profanity.

Enjoy!

Hey so I wanna do this and I’m new to all this stuff can I use this on kodi if I run it on a Mac? A step by step would help thanks
I've been doing a lot of Googling on this whole issue with using 0 to cut and found this really interesting Reddit link: https://www.reddit.com/r/kodi/comments/b...ntros_and/

My goal is to find the best Raspberry Pi 3 image of Kodi (really wanting to keep using the Estouchy skin, but that is for Krypton) to use, but so far I am finding anything above version 16.* (Jarvis) has this whole stuttering/freezing/(or not working at all) issue when using 0 in EDL files.
I've settled on this Kodi image for my Raspberry Pi 3, OSMC_TGT_rbp2_20170129.img, the last/final build of OSMC Kodi Jarvis. Using OSMC default skin which is very similar to Krypton's Estuary.
Skipping using 0 in EDL files works, but took some tweaking for 3D MVC:

Had to create an Advancedsettings.xml to better handle switching to 3D with MVC, see: https://kodi.wiki/view/Advancedsettings.xml
look for the section "stereoscopicregex"

Add the following for MVC:
</stereoscopicregexmvc> [-. _]MVC[-. _] </stereoscopicregexmvc>

It's still not entirely perfect on every MVC with switching to 3D, you still have to sometimes manually just select Over/Under or Side by Side and the TV will switch to Full Frame 3D.

All in all, really happy about this setup now!
I've just discovered this plug-in, and it's great. I'm having trouble forcing it to find an .srt subtitle file I created, though. The srt file it downloaded for one particular movie ("The Prizewinner of Defiance Ohio") was really messed up, so I ripped an MKV of the movie and extracted an srt file, then placed it in the folder where the movie is located on my Kodi system (Libreelec, Leia). The movie folder is local to the Kodi system; no network share involved. However, the plugin didn't find it, even though the title of the file is identical to that of the movie. So I also copied the srt file to the plugin's resources folder, but it still doesn't locate it. It just wants to keep on downloading the messed up file from Opensubtitles. Any thoughts?
(2019-09-17, 11:57)ntradd Wrote: [ -> ]I've just discovered this plug-in, and it's great. I'm having trouble forcing it to find an .srt subtitle file I created, though. The srt file it downloaded for one particular movie ("The Prizewinner of Defiance Ohio") was really messed up, so I ripped an MKV of the movie and extracted an srt file, then placed it in the folder where the movie is located on my Kodi system (Libreelec, Leia). The movie folder is local to the Kodi system; no network share involved. However, the plugin didn't find it, even though the title of the file is identical to that of the movie. So I also copied the srt file to the plugin's resources folder, but it still doesn't locate it. It just wants to keep on downloading the messed up file from Opensubtitles. Any thoughts?

Can you post a link to your .srt for analysis?
(2019-09-22, 05:52)MovieCleanup Wrote: [ -> ]
(2019-09-17, 11:57)ntradd Wrote: [ -> ]I've just discovered this plug-in, and it's great. I'm having trouble forcing it to find an .srt subtitle file I created, though. The srt file it downloaded for one particular movie ("The Prizewinner of Defiance Ohio") was really messed up, so I ripped an MKV of the movie and extracted an srt file, then placed it in the folder where the movie is located on my Kodi system (Libreelec, Leia). The movie folder is local to the Kodi system; no network share involved. However, the plugin didn't find it, even though the title of the file is identical to that of the movie. So I also copied the srt file to the plugin's resources folder, but it still doesn't locate it. It just wants to keep on downloading the messed up file from Opensubtitles. Any thoughts?

Can you post a link to your .srt for analysis? 
Actually, I'm not using the add-on anymore. I'm just writing my own EDL files from scratch, since the add-on isn't exact enough. It's faster to search an srt file for the profanity I want to mute, then find the exact time stamp in VSDC Video editor, and add it manually to the EDL file. I found that with the add-on I was having to adjust the beginning and ending times of all the mutes anyway.

However, I've been finding in using the add-on as well as editing my own files that in Libreelec Leia the parsing of the EDL file is not as expected. I've been using the "1" option to mute profanity, but whenever the player comes to a time reference, instead of muting, it completely cuts out the profanity from the audio track and closes the gap, and then about a second later it mutes the audio track, seemingly to adjust it back into sync. So for instance, from The Emperor's Club, where the audio track is "Mold him? [Jesus God in heaven], son, you're not going to mold him," comes out as "Mold him? (profanity is cut from here and gap is closed) son, you're not going (long muted silence here instead) to mold him." I've played around with moving the time stamps forward and backward, but no luck. I'm wondering what I'm doing wrong. In this particular case, here is the line in the EDL file:

00:37:04.028    00:37:06.239    1    #Muted: 'Jesus God in heaven'

Any help would be appreciated.
(2019-09-23, 22:18)ntradd Wrote: [ -> ]Actually, I'm not using the add-on anymore. I'm just writing my own EDL files from scratch, since the add-on isn't exact enough. It's faster to search an srt file for the profanity I want to mute, then find the exact time stamp in VSDC Video editor, and add it manually to the EDL file. I found that with the add-on I was having to adjust the beginning and ending times of all the mutes anyway.

However, I've been finding in using the add-on as well as editing my own files that in Libreelec Leia the parsing of the EDL file is not as expected. I've been using the "1" option to mute profanity, but whenever the player comes to a time reference, instead of muting, it completely cuts out the profanity from the audio track and closes the gap, and then about a second later it mutes the audio track, seemingly to adjust it back into sync. So for instance, from The Emperor's Club, where the audio track is "Mold him? [Jesus God in heaven], son, you're not going to mold him," comes out as "Mold him? (profanity is cut from here and gap is closed) son, you're not going (long muted silence here instead) to mold him." I've played around with moving the time stamps forward and backward, but no luck. I'm wondering what I'm doing wrong. In this particular case, here is the line in the EDL file:

00:37:04.028    00:37:06.239    1    #Muted: 'Jesus God in heaven'

Any help would be appreciated.


I don't think it is your .edl.  I'm finding the .edl functionality has been broken since 17.x.  I still use the old version on my android media player.  I did some limited testing on 18.0 and it appeared that the mute functionality had been fixed but I was not thorough since the skip function is still broken (18.4) and behaves similarly to your mute issue.  Unless you can't live without a current functionality that version 16 is missing, I would recommend testing 16.0 or 16.1 and see if it behaves as expected.
(2019-09-23, 23:18)MovieCleanup Wrote: [ -> ]
(2019-09-23, 22:18)ntradd Wrote: [ -> ]Actually, I'm not using the add-on anymore. I'm just writing my own EDL files from scratch, since the add-on isn't exact enough. It's faster to search an srt file for the profanity I want to mute, then find the exact time stamp in VSDC Video editor, and add it manually to the EDL file. I found that with the add-on I was having to adjust the beginning and ending times of all the mutes anyway.

However, I've been finding in using the add-on as well as editing my own files that in Libreelec Leia the parsing of the EDL file is not as expected. I've been using the "1" option to mute profanity, but whenever the player comes to a time reference, instead of muting, it completely cuts out the profanity from the audio track and closes the gap, and then about a second later it mutes the audio track, seemingly to adjust it back into sync. So for instance, from The Emperor's Club, where the audio track is "Mold him? [Jesus God in heaven], son, you're not going to mold him," comes out as "Mold him? (profanity is cut from here and gap is closed) son, you're not going (long muted silence here instead) to mold him." I've played around with moving the time stamps forward and backward, but no luck. I'm wondering what I'm doing wrong. In this particular case, here is the line in the EDL file:

00:37:04.028    00:37:06.239    1    #Muted: 'Jesus God in heaven'

Any help would be appreciated.


I don't think it is your .edl.  I'm finding the .edl functionality has been broken since 17.x.  I still use the old version on my android media player.  I did some limited testing on 18.0 and it appeared that the mute functionality had been fixed but I was not thorough since the skip function is still broken (18.4) and behaves similarly to your mute issue.  Unless you can't live without a current functionality that version 16 is missing, I would recommend testing 16.0 or 16.1 and see if it behaves as expected.
Sorry to hear that, since Amazon Prime has never worked until Leia, so I'll probably stay put. I've also tried using frame numbers in the edl file but the player doesn't even recognize that. I think I'll test the cut function
Sorry to hear that, since Amazon Prime has never worked until Leia, so I'll probably stay put. I've also tried using frame numbers in the edl file but the player doesn't even recognize that. I think I'll test the cut function
(2019-09-23, 23:47)ntradd Wrote: [ -> ]Sorry to hear that, since Amazon Prime has never worked until Leia, so I'll probably stay put. I've also tried using frame numbers in the edl file but the player doesn't even recognize that. I think I'll test the cut function

Do you have a PC that you could test the older version of Kodi on to verify that it is the .edl or player?
(2019-09-24, 22:45)MovieCleanup Wrote: [ -> ]
(2019-09-23, 23:47)ntradd Wrote: [ -> ]Sorry to hear that, since Amazon Prime has never worked until Leia, so I'll probably stay put. I've also tried using frame numbers in the edl file but the player doesn't even recognize that. I think I'll test the cut function

Do you have a PC that you could test the older version of Kodi on to verify that it is the .edl or player?  
No, not really. But I'm managing to make things work. I'm still using the addon, but I'm confused about editing the filter.txt file. I've been trying to make it catch phrases, but only with some success. For instance, I've added "for Christ's sake" to the filter.txt file, and it catches that fine. But I've also removed "god" from the file and replaced that with more specific phrases, like "Oh, God" but it refuses to catch any of these. Do you have any idea what's going on? Here is the section from my filter.txt file that seems to get ignored:

Oh, god: 10
O, god: 10
Oh god: 10
O god: 10

Thanks.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15