Jump to content

Plugin - Iconic Image Enhancer


roaku

Recommended Posts

GrimReaper
3 hours ago, diogee said:

I'd say about 200 out of the 1400 animated series I have are English only
Probably around 100 are a mix of Korean or Chinese audio only

The remaining 1100 or so all contain Japanese audio
Of that 1100, if I had to guess, somewhere around 300 of those contain English audio in addition to the Japanese audio
But not all 300 series has both english and japanese for every season. Uhh as an example off the top of my head, Attack On Titan? Still currently airing new episodes so Season 1 through to 3 contain Dual Audio but current season is Japanese only
Maybe about 70 out of the 1100 contain 3 or more audio track languages

So my goal would be not trying to identify if it has English, I'm specifically trying to identify if it has quite literally, 2 or more audio languages. Not so much WHICH 2 languages, just that it HAS 2 or more languages.
If that makes any more sense?

As for your issue, until something better comes along, you COULD make 4-5 MediaStream rules with Type:audio/DisplayTitle:[language] , for example:

Type:audio/DisplayTitle:Jap

Type:audio/DisplayTitle:Eng

Type:audio/DisplayTitle:Chi

Type:audio/DisplayTitle:Kor

Type:audio/DisplayTitle:Spa

etc. 

Assign different icon to each rule (else there will be only one badge shown even if multiple rules were true). Granted, it WILL put a badge on all your single-audio stream movies, but it will put TWO or more on your multi-audio items, therefore making them easy to distinguish. 🤷‍♂️

 

Edited by GrimReaper76
Typo
Link to comment
Share on other sites

roaku

@diogee

@crusher11

I'll look into the possibility of incorporating regex that doesn't get in the way of more basic use. Again, this will be some time in the unspecified future after release.

 

@crusher11 I think a better solution for your scenario might be specifying folders for the rule set to apply to. That's also a 'unspecified future' feature.


 

 

Link to comment
Share on other sites

crusher11

Even just "this but not that" should be able to get it done, I think. "' - ' but not ' - 4K' and not ' - 1080p'" would filter properly.

The 1080p versions of my 4K movies are in the same folder as all my other movies, so folder specificity wouldn't help.

 

Link to comment
Share on other sites

roaku
On 2/11/2021 at 3:26 AM, moha85 said:

Hello again @roaku


I think the previous thread was written in Spanish, I don't know why.... But well it doesn't matter, that's what the translator is for it 😂

First of all I would like to thank you again for the replies and listen to the community.

Returning to the topic, when do you think version 1.0 will be ready and you will be able to enjoy what you have talked about?

I hope to have a release published within the next 4 weeks.

 

Quote

And secondly, I would like to contribute something to the project with custom icons of the different types of video qualities, for the community and me to enjoy :)

Thanks again

This would be cool, but again, the icons themselves have to be packaged as a font set before they get to me. That might be something you're able to do, but not me. :)

Link to comment
Share on other sites

roaku
5 minutes ago, crusher11 said:

Even just "this but not that" should be able to get it done, I think. "' - ' but not ' - 4K' and not ' - 1080p'" would filter properly.

The 1080p versions of my 4K movies are in the same folder as all my other movies, so folder specificity wouldn't help.

 

Ahh, I thought you were the user with the giant library and folder grouping. Must have gotten that crossed up with another blue/purple avatar. Sorry.

Edited by roaku
Link to comment
Share on other sites

crusher11

The 4Ks are in their own folder, but the 1080p versions of them are in with all my other 1080p-only movies.

Link to comment
Share on other sites

roaku
4 hours ago, GrimReaper76 said:

@roaku, further to above, made some tests and the internal logic breaks somewhere, details below:

Setup is:

Movie A - Japanese/English audio, Japanese/English subs

Movie B - Japanese audio, English subs

Test 1: MediaStream rule with DisplayLanguage:Jap (no Type property, assuming both audio and subs will be evaluated in that case) 

Movie A iconized (Japanese audio, Japanese subs - don't know which one was argument=true) 

Movie B iconized (Japanese audio) 

Test 2: MediaStream rule with DisplayTitle:Jap

Movie A iconized (same as above) 

Movie B iconized (same as above) 

Test 3: MediaStream rule with DisplayLanguage:Eng

Movie A iconized (English audio, English subs - don't know which one was argument=true) 

Movie B iconized (English subs)

So, the assumption that it's type-independent looks correct. 

Test 4: MediaStream rule with DisplayTitle:Eng

Movie A iconized (same as above) 

Movie B iconized (same as above) 

Again, confirmation that evaluation is type-independent. 

Following all above, with all 4 MediaStream rules iconizing BOTH movies as conditions being true, Test 5 was done with:

2-properties MediaStream rule:

DisplayLanguage:Jap

DisplayTitle:Eng

However, that produced no result and neither movie being iconized, although based on the previous test ALL conditions were true and with AND operator between properties, BOTH movies should've been iconized again. 

My intention was to introduce third property, as Type:audio (which I did, btw, Test 6 was MediaStream rule with: Type:Audio/DisplayLanguage:Jap/DisplayTitle:Eng - didn't work, of course, since it broke down already in the less complex test previously; to clarify, first I wanted to ensure that DisplayLanguage and DisplayTitle can coexist as properties inside a single rule, later restricting it to only Audio stream, hence resulting in only Movie A being iconized.) 

Hope you could follow. 

Cheers

 

 

 

If I'm following, you want to apply 3 properties inside *one* rule to a *single* MediaStream...which should work.

As long as all 3 have the values for those properties populated by Emby at the time Iconic checks them.

I already have workarounds for certain properties, so this could be another case that needs special handling.

I don't have any items with subtitles to test against (I've always burned in my subs with original audio, and created a separate version with dubbed audio and no subs).

If you have the ability to create a short example clip of your case and send it my way, that would speed up my testing.

If not, I'll try re-ripping a disc to create an mkv with subtitles embedded in the container.

Link to comment
Share on other sites

GrimReaper
32 minutes ago, roaku said:

If I'm following, you want to apply 3 properties inside *one* rule to a *single* MediaStream...which should work.

As long as all 3 have the values for those properties populated by Emby at the time Iconic checks them.

I already have workarounds for certain properties, so this could be another case that needs special handling.

I don't have any items with subtitles to test against (I've always burned in my subs with original audio, and created a separate version with dubbed audio and no subs).

If you have the ability to create a short example clip of your case and send it my way, that would speed up my testing.

If not, I'll try re-ripping a disc to create an mkv with subtitles embedded in the container.

That is the ultimate goal, yes. However, something needs to be addressed even prior: combination of particular 2 properties which apparently don't play nice with each other atm, easy to reproduce: take any dual-audio item from your library; Media Stream rule with DisplayLanguage:[first stream] works; MediaStream rule with DisplayTitle:[second stream] works. Once those two rules are combined into single rule - it doesn’t. 

Link to comment
Share on other sites

roaku
15 minutes ago, GrimReaper76 said:

That is the ultimate goal, yes. However, something needs to be addressed even prior: combination of particular 2 properties which apparently don't play nice with each other atm, easy to reproduce: take any dual-audio item from your library; Media Stream rule with DisplayLanguage:[first stream] works; MediaStream rule with DisplayTitle:[second stream] works. Once those two rules are combined into single rule - it doesn’t. 

*One* MediaStream must have *both* of the property values for this to work.

Iconic doesn't evaluate across streams, both because it's a free for all of complexity increase and to avoid total protonic reversal.

Link to comment
Share on other sites

GrimReaper
12 minutes ago, roaku said:

*One* MediaStream must have *both* of the property values for this to work.

Iconic doesn't evaluate across streams, both because it's a free for all of complexity increase and to avoid total protonic reversal.

Aren't those two audio tracks part of the same MediaStream? 

Edit: Small digression from multi-audio: as visible from the tests above, without specifying TYPE, so not restricting it to either audio or subtitles, an item with single Japanese audio and English subtitles SHOULD be iconized with DisplayLanguage:Jap/DisplayTitle:Eng combo - DisplayLanguage:Jap applies, and rule alone works. DisplayTitle:Eng applies and rule alone works. Both values ARE true. 

Edited by GrimReaper76
Link to comment
Share on other sites

roaku
12 minutes ago, GrimReaper76 said:

Aren't those two audio tracks part of the same MediaStream?

No. Each file within the container format is a *separate* MediaStream.

Just an example, but if you have an mkv with all of the following files, each one is evaluated separately and independently from the others:

Video

Audio 1

Audio 2

Subtitle 1

Subtitle 2

Embedded JPEG

 

The easiest way to tell what you have is to go to an individual movie item in your library and scroll to the bottom. Each of the files in each container for each version of the movie are listed there.

Quote

Edit: Small digression from multi-audio: as visible from the tests above, without specifying TYPE, so not restricting it to either audio or subtitles, an item with single Japanese audio and English subtitles SHOULD be iconized with DisplayLanguage:Jap/DisplayTitle:Eng combo - DisplayLanguage:Jap applies, and rule alone works. DisplayTitle:Eng applies and rule alone works. Both values ARE true. 

I can't follow this description, but again, it's possible that this is another property that will need special handling to test against.

Again, if you can provide an example file and a screenshot of your rule, I can investigate your specific situation.

 

Link to comment
Share on other sites

35 minutes ago, GrimReaper76 said:

Aren't those two audio tracks part of the same MediaStream? 

I think maybe you are confusing MediaStream with MediaSource.

Link to comment
Share on other sites

GrimReaper
9 minutes ago, roaku said:

Each file within the container format is a *separate* MediaStream

This makes it all clear now. I thought that item is looked at as a whole. But then, without specifying Type, what is looked at in "plain" rules? Which stream? 

Example: Media rule with only one property: DisplayTitle:Eng. Where does it search? As per my tests, it searches both in audio and subtitles streams, because I get iconized movies with English audio (and no subs) and also movies with only Japanese audio but English subs? 

Link to comment
Share on other sites

GrimReaper
Just now, ebr said:

I think maybe you are confusing MediaStream with MediaSource.

Yeah, looking for some additional clarification now. 

Link to comment
Share on other sites

roaku
3 minutes ago, GrimReaper76 said:

This makes it all clear now. I thought that item is looked at as a whole. But then, without specifying Type, what is looked at in "plain" rules? Which stream? 

Example: Media rule with only one property: DisplayTitle:Eng. Where does it search? As per my tests, it searches both in audio and subtitles streams, because I get iconized movies with English audio (and no subs) and also movies with only Japanese audio but English subs? 

For a MediaStream rule, all MediaStreams for each version of a given Movie Item get looped over, one MediaStream at a time, to see if *that* MediaStream matches *all* the properties you've defined for that rule. If at least one MediaStream from any version of that Movie Item matches, a single icon for that rule appears on the image.

So, in theory, you could create one MS rule with one property value for 'Title'.  That rule will evaluate to true if *any* MediaStream's title property matches that value. Whether that MediaStream is video, audio, subtitle, etc. is irrelevant in this case.

Or, you could create one MS rule with two properties, one for Type containing 'audio' and another for 'Title' containing your value. This rule will only evaluate to true if one of your Audio MediaStreams have the Title value. It won't matter in this case what your subtitle or video MediaStream's have for their Title values.

Link to comment
Share on other sites

GrimReaper
27 minutes ago, roaku said:

I can't follow this description, but again, it's possible that this is another property that will need special handling to test against.

Don't take this as any sort of criticism, I'm thoroughly enjoying your plugin, just trying to wrap my head around what is looked at at certain conditions, what is compared and what is returned, it makes my head ache. I can only imagine how is it to imagine project as a whole. 🙄

Link to comment
Share on other sites

GrimReaper
17 minutes ago, roaku said:

For a MediaStream rule, all MediaStreams for each version of a given Movie Item get looped over, one MediaStream at a time, to see if *that* MediaStream matches *all* the properties you've defined for that rule. If at least one MediaStream from any version of that Movie Item matches, a single icon for that rule appears on the image.

So, in theory, you could create one MS rule with one property value for 'Title'.  That rule will evaluate to true if *any* MediaStream's title property matches that value. Whether that MediaStream is video, audio, subtitle, etc. is irrelevant in this case.

Or, you could create one MS rule with two properties, one for Type containing 'audio' and another for 'Title' containing your value. This rule will only evaluate to true if one of your Audio MediaStreams have the Title value. It won't matter in this case what your subtitle or video MediaStream's have for their Title values.

Great, thanks for the explanation, that was exactly what I was trying to get at and what I've surmised, but obviously don't know how to express, so I'll try again:

Item in question has a single Japanese audio and English subtitle. 

MS rule with single property DisplayLanguage:Jap, correctly puts a badge as:

"So, in theory, you could create one MS rule with one property value for 'Title'.  That rule will evaluate to true if *any* MediaStream's title property matches that value. Whether that MediaStream is video, audio, subtitle, etc. is irrelevant in this case" 

So, Video-NO, Audio-TRUE, Subtitle-NO. Condition satisfied, put badge. 

Next, MS rule with single property DisplayTitle:Eng, correctly puts a badge as:

"So, in theory, you could create one MS rule with one property value for 'Title'.  That rule will evaluate to true if *any* MediaStream's title property matches that value. Whether that MediaStream is video, audio, subtitle, etc. is irrelevant in this case" 

So, Video-NO, Audio-NO, Subtitle-TRUE. Condition satisfied, put badge. 

However, MS rule with TWO properties:

DisplayLanguage:Jap

DisplayTitle:Eng

DOES NOT iconize, although it should as BOTH conditions ARE true, there is Video-NO, Audio-TRUE, Subtitle-NO for first property and Video-NO, Audio-NO, Subtitle-TRUE for second one. 

I hope I was clear enough now. 

 

Edited by GrimReaper76
Typos, of course 🙄
Link to comment
Share on other sites

roaku
Quote

DOES NOT iconize, although it should as BOTH conditions ARE true, there is Video-NO, Audio-TRUE, Subtitle-NO for first property and Video-NO, Audio-NO, Subtitle-TRUE for second one. 

 

@GrimReaper76

No, this shouldn't match the rule because according to your description, you don't have any *one* MediaStream that possesses *both* properties of 'DisplayLanguage' containing 'Jap' and 'DisplayTitle' containing 'Eng'.

Edited by roaku
  • Thanks 1
Link to comment
Share on other sites

GrimReaper
13 minutes ago, roaku said:

@GrimReaper76

No, this shouldn't match the rule because according to your description, you don't have any *one* MediaStream that possesses *both* properties of 'DisplayLanguage' containing 'Jap' and 'DisplayTitle' containing 'Eng'.

NOW I finally get it, THANK YOU, I was looking at it wrongly all the time, rule-based instead of stream-based. In that case, I reckon at least multiple instances of property "Type" should be allowed (I know you revoked multiple identical properties), which would allow single MediaSource to be targeted by multiple stream conditions combined into one MediaStream rule (resulting in single badge, as opposed to multiple rules separate for each stream which wound exponentially increase false positives, iconizing items that only one out of three rules applies to). 

Thanks again

Edited by GrimReaper76
  • Like 1
Link to comment
Share on other sites

roaku

Ya, more options are coming, I've just got to get the first version out the door first.

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

lundblad
5 hours ago, roaku said:

Ya, more options are coming, I've just got to get the first version out the door first.

Awesome plugin! i did not read all posts in this thread but it it possible to make a icon for a specific subtitles language? (swedish) :)

and maby in the future be able to add custom (PNG images) like a swedish flag for swedish subtitles! :D

Thanks again for great plugin

Edited by lundblad
Link to comment
Share on other sites

GrimReaper
22 hours ago, crusher11 said:

The 4Ks are in their own folder, but the 1080p versions of them are in with all my other 1080p-only movies.

Maybe you could try using a combo of  @chef's automated tagging plugin (as it allows multiple criteria on a single item, more fine-grained targeting) and Iconic' s Tag-based rule? Didn't try it, but sounds like a possibility? 🤷‍♂️

Edit1: Link

Edit2: Well, throw that out the window, I just couldn't make it work, there ain't 'user-defined' field for value, and without it just cannot get anywhere. Ah, well, it was worth a try. 

 

Edited by GrimReaper76
Link
Link to comment
Share on other sites

lundblad

Ok, now i have icons for swedish subtitles so it works, but damn library loading really slow. or maby just first time when makin the icons? 

Link to comment
Share on other sites

GrimReaper
13 minutes ago, lundblad said:

Ok, now i have icons for swedish subtitles so it works, but damn library loading really slow. or maby just first time when makin the icons? 

Yeah, should be just the initial rendering, afterwards is cached. 

Edit: Although that 'slow' is subjective, I haven't noticed any considerable slowdown compared to regular image loading upon cache-rebuild, few seconds at the most. 

Edited by GrimReaper76
Link to comment
Share on other sites

lundblad
12 minutes ago, GrimReaper76 said:

Yeah, should be just the initial rendering, afterwards is cached. 

Edit: Although that 'slow' is subjective, I haven't noticed any considerable slowdown compared to regular image loading upon cache-rebuild, few seconds at the most. 

Takes very long time for me, i dont know why..

Maybe because i have 4 rules? First i tried one rule with  "Property Value:  srt/subrip/pgsub/ASS/" but that did not work.


image.thumb.png.56d2accfda9123d2276ad3851d9ae053.png

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...