If you have not already, we suggest setting your Plex username to something else rather than email which is displayed on your posts in forum. You can change the username at https://app.plex.tv/desktop#!/account
Welcome to our forums! Please take a few moments to read through our Community Guidelines (also conveniently linked in the header at the top of each page). There, you'll find guidelines on conduct, tips on getting the help you may be searching for, and more!

Release: Sub-Zero 2.0.33.1871 - Subtitles done right.

pannipanni Posts: 1,047Members, Plex Pass, Plex Ninja, TunerTester Plex Ninja
edited December 12 in Plex Channel Plugins

Sub-Zero - Subtitles done right

logo

master Maintenance Slack Status

Current version: 2.0.33.1871

Questions? Have a look at the wiki first

Quick-links to the wiki and the score explanation page: http://v.ht/szwiki, http://v.ht/szscores


Support Sub-Zero

If you like this, why not buy me a beer: Donate

or join my Patreon starting at 1 $ / month: image

or use the OpenSubtitles Sub-Zero affiliate link to become VIP
10€/year, ad-free subs, 1000 subs/day, no-cache VIP server:image
(the affiliate system is not yet online, please message me with your OpenSubtitles username, if you decide to use the affiliate link)


Introduction

Hey there,

Some of you may have followed the recent development on the original Subliminal.bundle by @bramwalet.

I've made some serious changes, improvements and bugfixes to Subliminal.bundle during the last few weeks, with the help of some very nice people such as @PMAdmin, @chopeta, @BlueToxic and others.

As the direction of this project has moved a long way, I thought it was time to evolve from simply being a personal fork of Subliminal.bundle to something more dedicated.


Plugin Description

Sub-Zero aims to solve your subtitle problems by automatically downloading the hopefully best subtitles there are, for your individual video file.

Subtitles are a problem? Yep, they definitely are. I myself use this plugin on a daily basis as my wife has a serious hearing condition where subtitles help us to be able to watch our favourite TV series and movies together. Subtitles pose a generic struggle: matching your media file perfectly. This is as hard as it gets. Thankfully there are a bunch of libraries and services out there, that help with that.

Sub-Zero is far from being perfect, but with recent development and planned features, we're really getting there.

Its core is based on the works of Diaoul, who created the subliminal library, as well as enzyme, to parse MKV metadata. In addition to that Sub-Zero uses the extremely well-made guessit library made by wackou.

Sub-Zero still is under heavy development but has recently reached a stable state. I need you to report bugs and tell me your opinion on new features.

It currently supports the following subtitle providers:


Automatic Installation

  • Sub-Zero now is listed in the official Plex Channel Directory. You can install it from there.

Downloads

Stable (when in doubt, use this one)

Current version: https://github.com/pannal/Sub-Zero.bundle/releases/latest
Legacy versions: https://github.com/pannal/Sub-Zero.bundle/releases

Develop

Release candidate: https://github.com/pannal/Sub-Zero.bundle/archive/master.zip
Bleeding edge (development): https://github.com/pannal/Sub-Zero.bundle/archive/develop-2.1.zip

Repository

https://github.com/pannal/Sub-Zero.bundle


Manual Installation

  • go to Library/Application Support/Plex Media Server/Plug-ins/
  • remove old versions (rm -r Sub-Zero.bundle)
  • get the current version from here
  • unpack it
  • restart your plex media server!


Usage

  • go to Settings -> Server -> Agents -> Movies/TV Shows
  • select the metadata provider you use on your library, e.g.: Freebase (movies) or TheTVDB (series)
  • enable Sub-Zero Subtitles (TV/Movies)
  • configure them
  • refresh your library (or individual movies/TV shows)

Use the following agent order:

  1. Sub-Zero Subtitles (TV/Movies)
  2. Local Media Assets (TV/Movies)
  3. anything else



Attention: If you don't include the source/format (HDTV, BluRay, etc.) in your TV media file names, lower the minimum TV score to 330, otherwise you get no subtitles!



Documentation:

https://github.com/pannal/Sub-Zero/blob/master/README.md

Nice new shiny wiki

https://github.com/pannal/Sub-Zero.bundle/wiki


Changelog

2.0.33.1871

  • core: normalize line endings in subtitles to LF (\n)
  • core: add subtitle storage lock to avoid race condition
  • core: be more verbose about subtitle storage addition
  • core: fix MPL2 newline parsing, which resulted in broken subtitles
  • core: encoding change: reduce log spam
  • submod: common: fix CM_starting_spacedots
  • submod: common: remove redundant interpunction
  • opensubtitles: fix request/response handling

2.0.33.1849

  • opensubtitles: add VIP server handling + setting; VIP benefits: 10€/year, ad-free subs, 1000 subs/day, no-cache VIP server, help SZ and subscribe via http://v.ht/osvip
  • opensubtitles: try to reuse previous token instead of logging in every time
  • core: add throttling between searches (10 seconds)
  • core: fix IETF handling for good
  • core: fix no subtitles being searched in certain situations (when an external subtitle without special tag exists)
  • core: add subtitle blacklist
  • core: fixes
  • core: fix detection of certain PMS media stream language tags ("FR" for example)
  • core: missing subtitles: correctly skip unwanted subtitle extensions
  • core: missing subtitles: honor "treat undefined as first language" option correctly
  • api: add blacklisting endpoints for quickly searching for new subtitls via bookmarklet
  • submod: colors: apply color mods at the end of processing modifications; fix color mods
  • submod: new remove_tags modification to remove all styling tags from subtitles
  • submod: HI: be more aggressive at handling brackets
  • submod: OCR: update en and hrv
  • submod: common: remove "torrent downloaded from ..." lines
  • submod: OCR: fix WholeWord handling, improving modification
  • submod: apply OCR fixes before HI
  • submod: OCR: fix broken HI tag colons (ANNOUNCER'. instead of ANNOUNCER:)
  • menu: advanced: speed up batch modifications
  • menu: add subtitle blacklist
  • menu: recently played: show only TV episodes and movies (music tracks were listed here as well)

older changes

«134567117

Comments

  • pannipanni Posts: 1,047Members, Plex Pass, Plex Ninja, TunerTester Plex Ninja
    edited October 2015

    Please report and discuss any issues!

    Thanks!

  • pannipanni Posts: 1,047Members, Plex Pass, Plex Ninja, TunerTester Plex Ninja
    edited October 2015

    Sorry for everyone who's been using Subliminal.bundle before.
    Please delete the Subliminal.bundle folder from your Plex Plug-Ins before using this. And you will have to re-configure everything.

  • PMAdminPMAdmin Posts: 99Members, Plex Pass Plex Pass

    RC4 works like a charm! Why do you recommend these TV/Movie scores? i increase them myself to like 40/60 so i get more correct subs. Please advice :)

  • pannipanni Posts: 1,047Members, Plex Pass, Plex Ninja, TunerTester Plex Ninja
    edited October 2015

    Well in RC4 I've just flipped them, because i had movies and TV scores mixed up in RC2. So no, I do not recommend them, we have to experiment with them because of the recent score split.

    You use 40 for TV? I was under the impression matching TV subtitles score way higher than movies.

  • PMAdminPMAdmin Posts: 99Members, Plex Pass Plex Pass

    yeah, but it is always taking the highest score right? So increasing it to lets say 90, less are downloaded, but quality increases?

  • pannipanni Posts: 1,047Members, Plex Pass, Plex Ninja, TunerTester Plex Ninja

    Partly correct - as you've said, it always downloads the one with the highest rating, so increasing minimum actually would NOT increase quality but would protect you from very wrong subtitles for the wrong movie for example.

  • cybercontrolcybercontrol Posts: 39Members, Plex Pass Plex Pass

    Is there a way to refresh the subtitles when someone starts a movie?
    Would be a great way to get rid of some very wrong subtitles.

  • pannipanni Posts: 1,047Members, Plex Pass, Plex Ninja, TunerTester Plex Ninja

    @cybercontrol said:
    Is there a way to refresh the subtitles when someone starts a movie?
    Would be a great way to get rid of some very wrong subtitles.

    That would certainly be a cool feature. I'm not sure though if that's possible at all. I'm going to check it out. Can you post an issue on github for that?

  • PMAdminPMAdmin Posts: 99Members, Plex Pass Plex Pass
    edited October 2015

    @cybercontrol said:
    Is there a way to refresh the subtitles when someone starts a movie?
    Would be a great way to get rid of some very wrong subtitles.

    I think the one who is playing the movie will have to wait until the new subtitles are downloaded. So the start of the movie will be delayed.

    Maybe too early to conclude, but first thing that comes up in my mind.

  • chopetachopeta Posts: 182Members, Plex Pass Plex Pass

    RC4 looking good for me here.

    New project name as well :)

    It's my first time using LocalMediaExtended (since is now part of the bundle) and I do have a question and a request :)

    First the question: How different is this new LocalMediaAssets compared to the original one. What if Plex make changes to the original? Would those changes be merged back to the Extended version?

    Request: Brazilian Portuguese subtitles (pt-BR) are showing up as "Unknown" on the clients. This is an old bug with Plex that never got fixed. Is this something that can to be fixed within LocalMediaExtended? I am reporting an issue just in case :)

  • chopetachopeta Posts: 182Members, Plex Pass Plex Pass

    We need someone with expertise in the "score" thing. I can't find docs. talking about it...

    Anyone with real-world experience that can vouch to what are the "best practices" for setting TV and Movies scores?

  • cybercontrolcybercontrol Posts: 39Members, Plex Pass Plex Pass

    @PMAdmin said:
    Maybe too early to conclude, but first thing that comes up in my mind.

    Or just start the movie. If the person finds the subs are wrong he/she can restart the movie.

    Or scrape the logfiles and do it afterwards during maintainance.

    just a few ideas to battle all the wrongs subs.

  • pannipanni Posts: 1,047Members, Plex Pass, Plex Ninja, TunerTester Plex Ninja
    edited October 2015

    @chopeta said:
    RC4 looking good for me here.

    New project name as well :)

    It's my first time using LocalMediaExtended (since is now part of the bundle) and I do have a question and a request :)

    First the question: How different is this new LocalMediaAssets compared to the original one. What if Plex make changes to the original? Would those changes be merged back to the Extended version?

    Request: Brazilian Portuguese subtitles (pt-BR) are showing up as "Unknown" on the clients. This is an old bug with Plex that never got fixed. Is this something that can to be fixed within LocalMediaExtended? I am reporting an issue just in case :)

    Yep, that should be fixable by LocalMediaExtended. Please add a ticket on github for that.
    Edit: Oh, you already did :)

    It's used to allow Plex to find subtitles in subfolders, as it by default only sees the ones sitting besides the media files (https://support.plex.tv/hc/en-us/articles/200471133-Adding-Local-Subtitles-to-Your-Media)
    And it will also be used to support the new external subtitle naming format I'm working on (VIdeoname-BLA.en.addic7ed-95.srt)

  • davvehdavveh Posts: 52Members, Plex Pass Plex Pass

    Got it installed, works fine, will report issues. Count me in on the testing if needed.

  • BashinBashin Posts: 18Members ✭✭
    edited October 2015

    Thanks for this!
    I have a bug report:
    I have this file: Limitless.S01E03.1080p.HDTV.X264-DIMENSION.mkv (file size is: 4 353 958 601 bytes)
    The SZ log is attached to this post.
    Screenshot of settings:

    I have enabled both the LMA Extender and the Sub-zero agent for the TV Shows/Freebase (the Primary Metadata Agent that I use).
    I refreshed the episode and it downloaded a subtitle, but it downloaded the hearing Impared version, even though one exists that has all the HI/SDH text removed.

    Here are the two versions that it likely chooses from, and it chooses wrong: http://www.opensubtitles.org/en/search/sublanguageid-eng/imdbid-4981316

    EDIT: I am using this version https://github.com/pannal/Sub-Zero/releases/download/1.1-rc4/Sub-Zero-1.1-rc4.zip

  • pannipanni Posts: 1,047Members, Plex Pass, Plex Ninja, TunerTester Plex Ninja
    edited October 2015

    Hey,

    Limitless isn't even in the log file. Could you check for other logs and post the one with the affected file in it? (most likely ending in .0 or .1)

    And the opensubtitles link isn't working for me, is it still for you?
    Edit: Now it is :o

  • ledge74ledge74 Posts: 272Members, Plex Pass Plex Pass
    edited October 2015

    Hi Panni. Thanks a lot for developing this agent, as a french person subtitles are always a mess to integrate to Plex.

    I have a feature request that would really ease the job of a lot Plex users IMO.

    The idea is to get the agent to automatically refresh every recent media to download subtitles if they haven't been found yet.

    For example, let's say that a user wants to have french and english subs for its media. In my opinion, the perfect workflow would be:
    1. "Big bang theory S09E04" is added to plex media server but Sub-Zero doesn't find any subtitles.
    2. 3 hours later, sub-zero automatically scan the episode again and find the english subs. It downloads it automatically and add them.
    3. 3 hours later, sub-zero automatically scan the episode again and find the english and french subs. As english subs already exist, sub zero only download the french subtitles and add them to the media.
    4. The episode has now both french and english subtitles, sub-zero has done its job. It will not automatically scan the media ever again.

    To fully optimise this workflow, the user would have to specify a maximum date added so that sub zero doesn't look for the subs automatically if the media is too old.
    For example, if the user specify max date to 3 days, the agent would automatically refresh this media every 3 hours for 3 days. If the subtitles are still not found after this 3 days, sub-zero won't refresh it automatically ever again.

    I don't know if a feature like this could ever exist in your agent but I think it would be awesome !

    Thanks and if you ever decide to create something like this I would be happy to help you anyway I can :)

    My Projects:


    • Cast Rocket for Plex, a Chrome extension for sending online content to be played on your Plex client. 
  • pannipanni Posts: 1,047Members, Plex Pass, Plex Ninja, TunerTester Plex Ninja

    @ledge74 many have mentioned something like automatic subtitle maintenance in SZ's mother project, Subliminal.bundle. It would definitely come in handy, I'm just not too sure to what extent this is possible being a Plex agent.

    I will look further into this when 1.1 is stable. In the meantime you can do something equivalent on your own:
    You can trigger library or even item refreshes in Plex via command line: https://support.plex.tv/hc/en-us/articles/201242707-Plex-Media-Scanner-via-Command-Line

    Adding this as a simple cron job (or event in Windows), enabling the option "Scan: include external subtitles" in SZ, to skip the already existing subs, would do something like that.

    Either I'll find a way to do that from inside the Plex sandbox, or by keeping some sort of state in an external database, which then can be accessed from the outside by a small daemon that does what you're asking.

    Until then, maybe try the cron option and tell us how well it works?

  • ledge74ledge74 Posts: 272Members, Plex Pass Plex Pass
    edited October 2015

    @panni I already have a kind of cronjob setup for my subtitles using this bash command (I'm using hazel since I am on Mac and it is more practical than a crontab). It works really well for the moment.

    I think the most efficient way for the automation would be a Plex Channel, since it could run on every OS that are supported by Plex. I have taken a look at what is already existing: the Plextools channel can download subtitles then refresh the media, and the trakt.tv channel can run jobs every 30 minutes. So I guess it would be possible to create a channel that refresh new media (for example that are part of /library/recentlyAdded/) every 3 hours or so until they have subtitles?

    Too bad I don't know anything about Python :/

    My Projects:


    • Cast Rocket for Plex, a Chrome extension for sending online content to be played on your Plex client. 
  • pannipanni Posts: 1,047Members, Plex Pass, Plex Ninja, TunerTester Plex Ninja

    Well if channels can do that (I didn't look into that yet, as 1.1 stable is my main focus right now), you might well have a lead there. I know plugins have their own private database space which can be used, but I guess the channel wouldn't be able to see the data of the agent.

    I'll dig into this, thanks for pointing that out :)

«134567117
Sign In or Register to comment.