Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plex plugin #23

Open
cordellstoyer opened this issue Oct 24, 2020 · 27 comments
Open

Plex plugin #23

cordellstoyer opened this issue Oct 24, 2020 · 27 comments
Labels

Comments

@cordellstoyer
Copy link

I saw recently where Clearplay has a chrome plugin that filters Netflix and Amazon on-the-fly. Do you think it is possible to implement such a plugin for Plex using your methods?

Also, I'd like to try and get some more people involved so we can get more stuff filtered. Is there a Discord channel?

@ocram ocram added the question label Oct 25, 2020
@ocram
Copy link
Contributor

ocram commented Oct 25, 2020

Thank you!

I’d say Plex is not a priority, but it’s certainly possible with the backend and concept that we have. When #6 or #7 is done, I imagine it must be relatively easy to port the filtering from Netflix/Disney/Amazon to Plex.

There is no Discord channel yet. It would be great if someone could help and create/maintain/moderate that channel. We’d link to the channel from this project’s README.

@jacob-willden
Copy link

Hello @cordellstoyer. I know that it's been almost a year since you opened this issue, but I've been working on building the Chrome/Firefox extension that @ocram mentioned. I've actually used the Clearplay Chrome extension myself and the extension I'm building is very functionally similar to it. You were asking about a plugin for Plex. Does that mean a Chrome extension that works on the Plex.tv website? If so, I could easily add support for it.

@ocram
Copy link
Contributor

ocram commented Sep 7, 2021

Plex is both for personal media (“Plex Media Server”) and for movies and TV shows (“On Demand”, “Live TV”, etc.), right?

And it seems to be available on lots of different devices.

If support in the browser would be enough, and it could be added via the Chrome extension that also works for the other services, that would certainly be the best solution.

@jacob-willden
Copy link

Sounds good. I'll definitely add support for the browser extension.

@cordellstoyer
Copy link
Author

Most excellent! Thanks!

On the topic, I don't suppose it's possible to also filter using Plex HTPC? It's the dedicated Windows app. I don't see where it's possible to run plugins, so I was wondering if someone else knew of a way. Or perhaps Kodi has that functionality?

@jacob-willden
Copy link

I'm not sure about Plex HTPC either, though Kodi does support add-on development (according to one of their wiki pages here).

@cordellstoyer
Copy link
Author

Oh awesome, I wish I knew how to make something like that. I do my own personal edits with Premiere, export them, and run them through Plex. I use methods like zooming and cropping out undesirable content where possible, sometimes utilizing blur if I need to. I'll black out the whole screen as a last resort. I don't suppose things like that would be possible on-the-fly in a video player like Kodi? It's probably too precise to account for different video files.

@jacob-willden
Copy link

jacob-willden commented Oct 4, 2021

Sorry for the late response! Kodi does support Edit Decision List (EDL) files, though EDLs only allow for muting or skipping. Though since muting and skipping are possible at certain times (and based on the sample EDL files on the Kodi wiki here, have split-second precision), maybe it is possible to black out, blur, or even crop the screen, but I'm not sure. I'll do some research to try and find out more.

Update: I've been spending a little time experimenting with Kodi extension development, and I think it may be possible to add screen blanking as well by creating an opaque window that can be added and removed as needed (still not sure about cropping or blurring yet). I haven't been able to test this yet, since I've been unable to even create an extension that consistently reports a video's current time, but I'll see what I can figure out in the meantime.

Another Update: I've figured out how to consistently detect a video's current time in Kodi, and how to mute and skip with a basic custom add-on I'm experimenting with. I'm still trying to figure out screen blanking, and I'll post again if/when I figure it out. Thanks for your patience!

@cordellstoyer
Copy link
Author

Very exciting! Thank you so much!

@cordellstoyer
Copy link
Author

Hi Jacob! I came across something called Jellyfin, an open-source Plex alternative. I thought I'd run it by you and see if filtering is possible through it? I found this here for creating plugins https://github.com/jellyfin/jellyfin-plugin-template

@jacob-willden
Copy link

Ah, interesting! I'll take a look at it too.

@Mike7154
Copy link

I manage all my movies and other media with a plex media server for my kids' media. I dabbled in plex plugins in the past, and it would be amazing if there was a plex plugin that would allow a movie stream to read a filter file. That should make it work for any device that streams from the server. I would try to tackle this myself, but I'm in med school and won't have time. Has anyone tried to make a plex plugin? Plex does have plugin capability still even though they discontinued their plugin service, you just must install plugins manually now.

@cordellstoyer
Copy link
Author

@Mike7154 Same here. My current method is editing movies & TV shows on Adobe Premiere and exporting the file into my Plex server, just to make it easier for the end users in my house. That would be amazing if Plex had that type of capability, or even Jellyfin or some other alternative. Here's hoping!

@mthous72
Copy link

mthous72 commented Mar 8, 2022

I'm also for the Plex server plugin. That would make many of the old movies much more palatable for those of us who like the story, but don't like the profanity, etc to be part of their life anymore.

@jacob-willden
Copy link

jacob-willden commented Mar 13, 2022

Here's the latest. I finally figured out how to achieve screen blanking for the Kodi add-on, except with one problem: the code I need to use is under the GNU General Public License (GNU) version 2 (without specifying if it's allowed under a later version), while the other needed code is under the GPL version 3. I contacted the developer to see if I can get permission to use the code, as the licenses are apparently incompatible. In the meantime, I'll build up the add-on's interface.

I've also been continuing to try to see if creating a Plex Server or Jellyfin plugin is possible, though it's been even slower going due to the lack of documentation available. Thankfully, Jellyfin has a good community that I can look to for help, like with Kodi.

Edit: Good news! I got clarification from the owner of the code I need that all of his Kodi add-ons are dual-licensed under the GNU GPL version 2 and the MIT license and that since he shared the snippet on the Kodi forum, it can be used for anything. This means that I can continue with the Kodi add-on.

@cordellstoyer
Copy link
Author

@jacob-willden Amazing! I sure appreciate you taking the time to work on this!

Imagine how cool it would be to download filters within the Kodi interface. Can't wait to see what you come up with!

@jacob-willden
Copy link

Absolutely! Building this Kodi add-on has been a passion project of mine for the past couple of months and I'm excited to implement more features.

Here's the latest. It can now mute, skip, and hide video using a filter file in the same folder and with the same name (except with an .mcf extension) as the video file. You can download and test the add-on in its current form if you'd like, available here with installation and usage instructions: https://github.com/jacob-willden/script.movie.content.filter

The next step I'm working on is filter categories (like violence, profanity, sexuality, etc), so the user can choose what should be filtered out and what should be left in. I'm also trying to figure out if it would be possible to create filter files within Kodi as well.

Imagine how cool it would be to download filters within the Kodi interface.

That would be really cool to have. Since I haven't heard from ocram in a long time, I'm not sure if he will be able to create the API for the filter files that such a feature would most likely require, but maybe there's another way to make that happen. I'll keep researching and experimenting.

Sorry I haven't been able to reply much because of my busy schedule. Thanks for being so patient and supportive everyone!

@cordellstoyer
Copy link
Author

WHOA! I just tested it out and it worked amazingly! Truly excited to see where this goes!

@Mike7154
Copy link

I am really excited about what this project can become. I have a pretty well-functioning family media center using plex, and I have several other parents from my church who are asking me to help them set up a similar system for their families to filter media. But a tool like this on plex would be huge and I would definitely go through my favorite movies and create filters.

A tool like this would even make me migrate all of my hard work/plugins/development from plex over to Jellyfin if I had to.

@ocram
Copy link
Contributor

ocram commented Jul 30, 2022

Sorry for the extreme delay and the silence! The Kodi add-on sounds really exciting. I’m still planning to build the API, but will only be able to do so in the fourth quarter of this year, unfortunately.

@jacob-willden
Copy link

Sorry it's been so long, life has been extremely busy! Here's the latest. I've been working on a plugin for Jellyfin for a while, but after scouring the documentation and asking around in the Jellyfin community, it appears that Jellyfin's API has no way to control video volume via plugin yet (though skipping is possible right now). This means that until the ability to mute or set the volume in the player is added to their plugin API, I won't be able to get the Jellyfin plugin working.

As far as Plex goes, the app is apparently going to be removing plugins completely in the near future, so trying to develop a plugin for it definitely seems to be a lost cause now.

So for the time being, I would recommend Kodi for filtering your digital video library, since it has native EDL support (allowing muting and skipping without needing to install an add-on), and it has a great add-on API that allows for other filtering features like video hiding (also known as "blanking") through an add-on. The only disadvantage is that since it's GPL-licensed, it's not available on some platforms like Apple TV. But you could definitely put your video library into Kodi on a device and then connect it to the TV via HDMI or screen casting. (Note: Be sure to use the latest version of Kodi, 19.4, since some earlier versions have an EDL bug that's fixed in the latest version.)

Thanks for your patience and support with this project, everyone!

@WuGing
Copy link

WuGing commented May 28, 2023

Came here while looking for options, and didn't realize that Plex plugins were dead... I've previously tried asking VidAngel if they'd ever make something for filtering home libraries, but it sounded like they're lawsuit makes that a no-go (not really sure how that works...)

It's a bummer that things won't work for Plex, since I have the lifetime subscription, but at the rate they keep removing features that I actually wanted/used, perhaps I'll need to ditch. Where does one procure the EDL files?

@jacob-willden
Copy link

Sorry again for the late response! That's a good question, @WuGing. There are actually two kinds of EDL files that you could use: an ordinary EDL file that Kodi can read natively, or a Movie Content Filter file that's an EDL with a couple of additional features (which my Kodi add-on can use).

The biggest feature is the capability to filter out the video while keeping the audio. If you're only interested in muting the audio or skipping sections, then the ordinary EDLs will be perfectly fine.

Movie Content Filter's Website has a very small collection of files already in the latter format. VideoSkip has a significant collection of filter files that, while not in EDL format, could be converted over fairly easily (as long as everyone just converts the files for themselves without distributing them publicly, since the files on VideoSkip are freely available but most have ambiguous licensing). I'll look into creating a converter that can quicken the process.

@jacob-willden
Copy link

I've now made a video filter file converter (source on Codeberg). It can convert VideoSkip files to EDL files for Kodi, and I'm planning on adding the ability to convert to Movie Content Filter (MCF) format too.

@solowalker27
Copy link

@jacob-willden Very intrigued about your work here, thanks. Do you have a repo for your Jellyfin plugin progress?

@jawhett
Copy link

jawhett commented Nov 25, 2023

I'm very interested in the jellyfin plug-in, or to be honest just a standalone editor that I can run my files through.

@VSerafimov
Copy link

The Clean Media Player was created specifically for this and it now supports streaming from a Plex Media Server.

It can be downloaded from here: https://cleanmediaplayer.com/

Here is the detailed description on Reddit.

You can watch movies and videos with customizable profanity filters. These filters mute the audio and display subtitles with swear words and offensive phrases removed.

It also has some other neat features:

  • Specify what words you want to replace the profanity with
  • Create a list of scenes [time spans] to automatically skip
  • Auto find subtitles using the file hash or manually find subtitles by name
  • Adjust subtitles offset to sync them with the video

No monthly subscription.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

9 participants