wowsers 5 Posted August 28, 2018 Share Posted August 28, 2018 @Luke: what's the best way to implement this feature (assuming I hire a developer)? Allow Emby users to filter out (mute) common profanity words, e.g f--k, s--t, etc. The workflow looks like this: User goes to the server settings page, goes to a config page (a plugin?), chooses the words they don't want to hear, and hits Save. Emby compares the word list to the subtitle file of each video. When there are matches, Emby mutes the audio at the appropriate time during playback (between the start and stop time of each line in the sub file where there is a match). Thanks! 4 1 Link to comment Share on other sites More sharing options...
Luke 37066 Posted August 28, 2018 Share Posted August 28, 2018 Hi, while I think this is a neat idea, I'm not sure when we'll ever be able to prioritize it ahead of other features. First, before you could even think about muting the audio, you need a database of voice data for every single video in your library. Then a player could read that data and mute accordingly. But does anything even exist to create that kind of data? I'm really not sure. Link to comment Share on other sites More sharing options...
wowsers 5 Posted August 28, 2018 Author Share Posted August 28, 2018 (edited) Thanks for your reply, Luke. The database of voice data is in the subtitle file of each video. Let's say I don't want my kids to hear the word s--t. Below is a line from the .srt of the movie Oceans Eight. Just mute the whole line from the start time (00:10:55,870) to the stop time (00:10:57,369). 19700:10:55,870 --> 00:10:57,369You know, I borrowed some shit. Edited August 28, 2018 by wowsers Link to comment Share on other sites More sharing options...
wowsers 5 Posted August 28, 2018 Author Share Posted August 28, 2018 (edited) Would this require a plugin, updates to the server, or both? Edited August 28, 2018 by wowsers Link to comment Share on other sites More sharing options...
blade005 172 Posted August 28, 2018 Share Posted August 28, 2018 Perhaps leveraging an existing service might be an option? http://ufilter.tv/ https://try.clearplay.com/ This would give you the service inside and outside of the Emby ecosystem. Just a thought. 2 Link to comment Share on other sites More sharing options...
legallink 187 Posted August 29, 2018 Share Posted August 29, 2018 Vidangel also does this but I haven’t been able to get them to license their filters. Link to comment Share on other sites More sharing options...
laie_techie 12 Posted August 29, 2018 Share Posted August 29, 2018 When I read the request, my mind went to services like ClearPlay or VidAngel, but I don't know the format of their filters. Working off subtitles is an interesting idea, but you'd have to mute the entire phrase instead of just the undesired word. Link to comment Share on other sites More sharing options...
legallink 187 Posted August 29, 2018 Share Posted August 29, 2018 EDL is the most common format for something like this. Same format that one would use for commercial skipping as well as any other type of filtering. The tough part is getting them. Vidangel does a form of community collaboration to create their filters. Most other places create the filters themselves. Link to comment Share on other sites More sharing options...
speechles 1917 Posted August 29, 2018 Share Posted August 29, 2018 (edited) It can work like TV Guardian. Except...without the need for extra hardware... But....you would always need to transcode the audio to do this. You need some sort of map which tells you at which times contain swear words and which dont. The subtitles give you this, but they break it down into milliseconds, which I don't believe ffmpeg can break down into. The best you get this way is silence for the entire seconds when the sentence containing swear words appears. Not accurate to the exact milliseconds the subtitle may give. -af volume=enable='between(t,10,12)':volume=0 The above will let ffmpeg mute the audio between 10 and 12 seconds. So in effect, lets say its a short video. 3 times swearing. -af volume=enable='between(t,10,12)':volume=0, volume=enable='between(t,65,68)':volume=0, volume=enable='between(t,80,83)':volume=0 I am sure you get the idea. The plugin would need to read the subtitle look for swear words or words which are to be muted and make note of their start/end in seconds. Do this for the entire subtitle. Now saves these in a DB. When playing, the server can read from this plugin (which will read from its DB) and pull in the start/stop of each muting. It would be rather easy to do, since the brunt of the work is done by ffmpeg itself and the plugin to parse/store/read back the start/stops of each muting. 1) plugin has administrator configure offensive words aka "foul language filters" (comes prebuilt with some nasty ones so user doesn't have to choose the obvious) 2) plugin has administrator pick users who will be restricted by "foul language filters" 2) plugin has to "scan subtitles" to create its DB of start/stop for each Video ID. So will need a scan task and perhaps ways to pick which libraries apply the "foul language filters". 3) plugin has to make use of many different subtitle formats, or restrict to just srt ( ? ) 4) plugin must always transcode audio if the user is "foul language filtered" 5) user must have transcode permissions for audio at server level to be "foul language filtered" 6) server must know to always transcode audio when a user is being "foul language filtered" (must force all apps to transcode audio regardless of capability) 7) any title lacking subtitles (.. or any than cannot be parsed entirely) cannot be played by users who are "foul language filtered" (to avoid the obvious) Edited August 29, 2018 by speechles 1 Link to comment Share on other sites More sharing options...
sfatula 185 Posted August 30, 2018 Share Posted August 30, 2018 Regarding TV Guardian, please note it already works with no extra hardware. On Dish Hopper, they developed a plugin that filters all such language out of things playing on the satellite receiver, partnering with Dish. They charge a small monthly fee for the service. They have options to simply mute the audio, or mute and show the subtitle with the offending word(s) replaced. It works off of subtitles. 1 Link to comment Share on other sites More sharing options...
michaeltruncale 5 Posted December 21, 2020 Share Posted December 21, 2020 I know this was 2 years ago... Wondering if there was anything ever made or integrated with Emby for this? Link to comment Share on other sites More sharing options...
Luke 37066 Posted December 21, 2020 Share Posted December 21, 2020 Not yet. I still think it's a neat idea though. Link to comment Share on other sites More sharing options...
chef 3745 Posted December 23, 2020 Share Posted December 23, 2020 Actually targeting bad words with subtitles would be next to impossible. You'd have an idea of the phrase that uses the bad word, but not exactly where it is located in the stream. We need something better. What about scanning the audio with a synthesis AI, and blank out the bad words, save the audio file as another audio track in the video container? It might be long scans for an AI version... not necessarily impossible... maybe... Link to comment Share on other sites More sharing options...
chef 3745 Posted December 23, 2020 Share Posted December 23, 2020 https://codelabs.developers.google.com/codelabs/cloud-speech-text-csharp#6 After quickly looking into this. You could use the codelabs tutorial posted above to deal with locating the bad words. I'm not sure how much Google charges to hit their API with long audio samples. Link to comment Share on other sites More sharing options...
RanmaCanada 345 Posted December 29, 2020 Share Posted December 29, 2020 Instead of trying to censor movies, how about just not letting your kids watch such content? Or you could use the providers who already do this to movies, and purchase the content from them instead of from a regular store or pirating it. It is technically illegal to do this, so I am surprised that such providers still exist in today's age of MPPA lawsuits. Oh wait a quick google shows that vidangel has been sued and lost and had to pay out hefty fines. If you insist on your kids watching movies with such content, I would suggest edit them yourself. It's not that difficult and you will have a copy you can give to any friends/family who are in the same situation. Link to comment Share on other sites More sharing options...
sfatula 185 Posted December 29, 2020 Share Posted December 29, 2020 19 minutes ago, RanmaCanada said: Instead of trying to censor movies, how about just not letting your kids watch such content? Or you could use the providers who already do this to movies, and purchase the content from them instead of from a regular store or pirating it. It is technically illegal to do this, so I am surprised that such providers still exist in today's age of MPPA lawsuits. Oh wait a quick google shows that vidangel has been sued and lost and had to pay out hefty fines. If you insist on your kids watching movies with such content, I would suggest edit them yourself. It's not that difficult and you will have a copy you can give to any friends/family who are in the same situation. Ok, so, lots of problems with your post. First, not sure about anyone else, I am not talking about any kids. Perhaps, just perhaps, some people including adults don't like such language. I know you wouldn't believe that if you have HBO or other such channels, but such people do exist in the real world, and it's not one or two. Second, not pirating anything. Third, not all content is played on providers who adjust the content. Therefore, it's often not possible. Also, you must have missed my post above. There are filters available for some platforms, and they have not been sued or shut down (as of yet). I gave an example, on Dish Hopper, you can subscribe to TV Guardian and it will filter the content for you. This indicates some demand for such a service as it required a partnership with Dish Network and TV Guardian. I actually DO edit the content myself. However, it would be much much faster (and automated in my case) if I could just use an EDL file to adjust the content instead of editing audio. I could then script the changes. Link to comment Share on other sites More sharing options...
michaeltruncale 5 Posted May 29, 2022 Share Posted May 29, 2022 Assuming still nothing like this exists for Emby correct? If I wanted to do this to some of my movies, for myself, for my family, movies I purchased and have ripped. What’s the easiest/best way to edit the movie to remove the language I don’t want to hear? Someone mentioned an edl file or using subtitles. So if I create a file, *.edl, and put some code in it it’ll mute the sound during the start/stop time? Or do I need to actually edit the video files themselves? and if I do edit the actual video file, can I tag the video file “_clean” and get that to show up as a play option or something? Thanks!! Link to comment Share on other sites More sharing options...
Luke 37066 Posted May 30, 2022 Share Posted May 30, 2022 On 5/29/2022 at 3:38 PM, michaeltruncale said: Assuming still nothing like this exists for Emby correct? If I wanted to do this to some of my movies, for myself, for my family, movies I purchased and have ripped. What’s the easiest/best way to edit the movie to remove the language I don’t want to hear? Someone mentioned an edl file or using subtitles. So if I create a file, *.edl, and put some code in it it’ll mute the sound during the start/stop time? Or do I need to actually edit the video files themselves? and if I do edit the actual video file, can I tag the video file “_clean” and get that to show up as a play option or something? Thanks!! Correct, nothing at this time. Emby does not support .edl files at this time although that's certainly possible for future updates. Link to comment Share on other sites More sharing options...
ebr 14913 Posted May 31, 2022 Share Posted May 31, 2022 Hi. Please do read the previous discussions in this thread, though, because I feel the precision necessary to only mute single words will be very difficult to achieve during playback - especially if using a bitstreamed audio format. Thanks. 1 Link to comment Share on other sites More sharing options...
BillOatman 500 Posted May 31, 2022 Share Posted May 31, 2022 (edited) On 5/29/2022 at 3:38 PM, michaeltruncale said: Assuming still nothing like this exists for Emby correct? If I wanted to do this to some of my movies, for myself, for my family, movies I purchased and have ripped. What’s the easiest/best way to edit the movie to remove the language I don’t want to hear? Someone mentioned an edl file or using subtitles. So if I create a file, *.edl, and put some code in it it’ll mute the sound during the start/stop time? Or do I need to actually edit the video files themselves? and if I do edit the actual video file, can I tag the video file “_clean” and get that to show up as a play option or something? Thanks!! I currently have a plugin called Comskipper that uses EDL files to skip commercials. EDL files contain lines that contain time markers, and an action to take. For example: 15.3 16.7 1 420 822 3 Which indicates to mute the audio from 15.3 to 16.7 seconds, and skip the commercial from 420 to 822 seconds. Right now it only skips commercials, but assuming there is a way for a plugin to mute audio via the remote control interface like it fast forwards for commercial skips now I could look into adding that functionality as a test. And if it works well maybe make that its own plugin. You would be on the hook for creating the EDL file with the "bad word" markers like above. I'll check if that functionality exists tonight, unless @ebr checks in and knows off the top of his head You can read up on that plugin here Edited May 31, 2022 by BillOatman 1 1 Link to comment Share on other sites More sharing options...
michaeltruncale 5 Posted May 31, 2022 Share Posted May 31, 2022 That would be great!! Reading up on the plug-in now Thanks! Link to comment Share on other sites More sharing options...
ebr 14913 Posted May 31, 2022 Share Posted May 31, 2022 Muting would only be possible when not bitstreaming audio and, also, the interface you have to position data is nowhere near accurate enough to do this properly. I believe there is discussion of this in this thread previously. Link to comment Share on other sites More sharing options...
BillOatman 500 Posted May 31, 2022 Share Posted May 31, 2022 1 hour ago, michaeltruncale said: That would be great!! Reading up on the plug-in now Thanks! 1 hour ago, ebr said: Muting would only be possible when not bitstreaming audio and, also, the interface you have to position data is nowhere near accurate enough to do this properly. I believe there is discussion of this in this thread previously. Looks like you are currently out of luck until core Emby takes it on @michaeltruncale. Link to comment Share on other sites More sharing options...
gene0915 37 Posted May 31, 2022 Share Posted May 31, 2022 I think I might have posted about this in another thread but I'd also like to see some sort of option to have Emby read the subtitles of a movie/TV show and just mute the audio when a swear word is detected. I'm 10,000% OK if the entire sentence is muted even if there's only one swear word in it. As an adult, I'd love for my children to watch Stranger Things with me but after season one, the executives involved in this show caved to pressure from the actors and allowed their characters to start swearing like sailors. I lived through the 80's as a teen and have talked to people that grew up in major cities, and rural areas, during that time and we all say the same thing about that show ......... NONE of us swore like these kids do. It's beyond excessive. Same for HBO's Westworld. I'm so sick and tired of non-stop profanity in shows and movies, especially TV shows. What I've been doing is bringing the files into a video editor and just manually muting audio and deleting entire scenes of some content I consider objectionable. Which leads me to a question that is a bit off topic but, can anyone recommend a Windows/Linux video editor that can _EASILY_ handle MKVs? 1 1 Link to comment Share on other sites More sharing options...
sfatula 185 Posted May 31, 2022 Share Posted May 31, 2022 (edited) I will continue to edit the audio source then. No matter the format, audio editing it is pretty easy once you get it down. Totally agree with gene0915, it's beyond excessive. For us, no kids, we won't watch a number of shows anymore that have decided the same. They lost us as consumers. Edited May 31, 2022 by sfatula Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now