2012-05-03, 05:13
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.
Download it:
zip: https://github.com/brazilbrown/mute-prof...fanity.zip
Source code: https://github.com/brazilbrown/mute-profanity
How to use it:
Install the add-on by unzipping to XBMC's addons folder. Plugin can be found in video add-ons. Once started you will see your movie collection. When you select a movie, the add-on will try to find the subtitle file for that movie. If you don't have one, it will ask if you'd like to download one. After a very brief processing time, it will complete and you then play the movie normally. You will notice that the blocked words are muted!
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 250ms, 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. Change this file as you see fit, but remember spaces matter. For example you might want to filter "asswipe" but not "class". You'll notice my filter file contains spaces for this reason (and they are important).
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'. My script currently only handles SRT subtitle files. 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 really, really need to mute a movie and it's not working, I suggest you download the SRT file separately, ensure that it works, then re-run my script to mute the profanity.
Possible Future Additions:
As this is a work in progress, I've started to come up with a list of features that one might find helpful with an add-on like this one:
* Edit the filter file in settings menu
* Multiple filter levels (little kids, young adults, etc)
* TV Shows option
* Much more...
What I need from you:
I've only tested this on one Windows machine, with only a few movies. I need more testers and suggestions. I have a list of features I'd like to implement in the future but would like to hear from the community as well. What features are most important to you?
One more note:
This add-on is not for everyone, I dare say not even for most. If you don't want to mute profanity, please don't use this add-on. This might come to a shock to a lot of people, but different people have different opinions, and they both can be valid. Just because you feel one way or another doesn't mean you're "right" and the other person is "wrong". If you want to use this that great, and if you don't that's great also.
Enjoy!
Download it:
zip: https://github.com/brazilbrown/mute-prof...fanity.zip
Source code: https://github.com/brazilbrown/mute-profanity
How to use it:
Install the add-on by unzipping to XBMC's addons folder. Plugin can be found in video add-ons. Once started you will see your movie collection. When you select a movie, the add-on will try to find the subtitle file for that movie. If you don't have one, it will ask if you'd like to download one. After a very brief processing time, it will complete and you then play the movie normally. You will notice that the blocked words are muted!
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 250ms, 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. Change this file as you see fit, but remember spaces matter. For example you might want to filter "asswipe" but not "class". You'll notice my filter file contains spaces for this reason (and they are important).
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'. My script currently only handles SRT subtitle files. 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 really, really need to mute a movie and it's not working, I suggest you download the SRT file separately, ensure that it works, then re-run my script to mute the profanity.
Possible Future Additions:
As this is a work in progress, I've started to come up with a list of features that one might find helpful with an add-on like this one:
* Edit the filter file in settings menu
* Multiple filter levels (little kids, young adults, etc)
* TV Shows option
* Much more...
What I need from you:
I've only tested this on one Windows machine, with only a few movies. I need more testers and suggestions. I have a list of features I'd like to implement in the future but would like to hear from the community as well. What features are most important to you?
One more note:
This add-on is not for everyone, I dare say not even for most. If you don't want to mute profanity, please don't use this add-on. This might come to a shock to a lot of people, but different people have different opinions, and they both can be valid. Just because you feel one way or another doesn't mean you're "right" and the other person is "wrong". If you want to use this that great, and if you don't that's great also.
Enjoy!