Jump to content

Action based on Metadata

Recommended Posts

  • Administrator

Action files sends data to Kodi or some other system, but isn't configured to retrieve or store data.  That could potentially be handled through an external script though.  

What exactly are you wanting to do?

Link to comment
Share on other sites

I would like to send webhook to adjust lens memory of projector based on aspect ratio of feature playing.  Right now I have two different sequences that I manually choose based on movie.  One has an action file to send the webhook that I use for wide scope titles. Hoping to automate this.

Link to comment
Share on other sites

  • Administrator

No guarantee on this or timeframe, but I'll look into adding aspect ratio to the conditions.  You could then trigger a different action for different aspect ratios.

Link to comment
Share on other sites

  • Administrator

This turned out to be much harder than I had anticipated when I suggested adding an aspect ratio to the conditions.  I don't know why I thought that Kodi listed the movie's actual aspect ratio.

I have the condition selection partially done, which you can see in the images below.

aspect1.png

 

aspect2.png

 

I had it pull in the aspect ratio, which is when I realized that it only lists the file aspect ratio, which is 1.78:1 for every bluray rip. I could have sworn I saw different aspect ratios at some point, but I double checked and apparently not.

 

I continued working on this and came up with a possible solution to scan IMDB to retrieve the aspect ratio that they have listed.  The problem there is that it isn't a free and takes time to scrape the aspect ratio.  You can see my original version of that below.

aspect3.png

I've since modified it to round to the 4 aspect ratios listed above.  I can change those to include more options fairly easily though.

Overall, I'd say that this is pretty close to done, but it has 2 major issues that I don't really know how to overcome.  The first that I mentioned above is that it takes time to scrape the info.  This happens when you are initially selecting to play your movie with PreShow.  For me, it takes 2-5 seconds.  The best I can think of is to add a PreShow setting on whether to allow the aspect ratio condition or not and default it to off.  That way people that don't need it won't be bothered by it.  But people that want to use it will still have their PreShows slowed a bit.  I did put a notification on there so that you'll know what it causing the delay.  It isn't a perfect solution, but it's the best that I can think of.

aspect4.png

 

The second problem is that I'm pulling the information from somewhere else that I can't guarantee it's accurate or will always work.  This may not be a huge deal, but my scrape for They Live lists it as 2.39:1.  When I took a screencap of my 4k, I measured it at 2.35:1.   In other more divergent example, Vertigo lists the original aspect ratio of 2.55:1 instead of the US theatrical aspect ratio of 1.85:1.

So that's the current status.

Link to comment
Share on other sites

  • 4 weeks later...
  • 2 months later...

With regards to having the proper aspect ratio in Kodi:  Tiny Media Manager has a tool which will detect the actual aspect ratio of a movie and store it in the NFO file.  Kodi then displays this correctly, at least with the skin I use which is Estuary Mod V2.  I realize this may not work for everyone but may be a better option than having to try and scrape from IMDB.

 

Thoughts?

Link to comment
Share on other sites

  • PreShow Supporter

To add more info, I use Ember Media Manager and it pulls the meta data and includes it in the nfo. Aeon Nox Silvo is my prefered skin which also shows the AR.

  <fileinfo>
    <streamdetails>
      <audio>
        <bitrate>3560</bitrate>
        <channels>6</channels>
        <codec>dtshd_ma</codec>
        <language>eng</language>
        <longlanguage>English</longlanguage>
      </audio>
      <audio>
        <bitrate>192</bitrate>
        <channels>2</channels>
        <codec>ac3</codec>
        <language>eng</language>
        <longlanguage>English</longlanguage>
      </audio>
      <subtitle>
        <language>eng</language>
        <longlanguage>English</longlanguage>
        <forced>false</forced>
        <type>Embedded</type>
      </subtitle>
      <video>
        <aspect>2.400</aspect>
        <bitrate>2349</bitrate>
        <codec>hevc</codec>
        <durationinseconds>6555</durationinseconds>
        <height>800</height>
        <width>1920</width>
        <filesize>5008898591</filesize>
      </video>
    </streamdetails>
  </fileinfo>

 

Link to comment
Share on other sites

  • Administrator

Thanks for the suggestion @hslansky & @Epitaph.

My goal is to always make a solution that works without the need for other applications.  I'll explore other options in the future and already have plans to do some work with nfo files, which may offer better options for a few processes.

Link to comment
Share on other sites

  • Administrator

I have continued to work on this and have added a new setting for Kodi's listed aspect ratio.

My issue with this setting, and the reason that I didn't go this route originally, is that I don't know if it is correct.  Unless you use TMM as @hslansky suggested or have your videos cropped and recompressed like @Epitaph's list, they will all be 1.78 : 1 as that's what a full frame blu-ray with black bars is.  

I have made the assumption that if you use nfo files, Kodi will have already scraped the data from them and we can just use that.  So there is now a sub-setting for this in PreShow to select how you want it handles.

aspectsource1.png

 

aspectsource2.png

 

I'm not sure if that's the right wording, but Kodi has a character limit on the settings, and to explain it properly requires scrolling.

 

And then I've modified the IMDB selection option to give the user some more control.  Originally I tried to make it so that it would pick the most likely option for movies that list multiple options. That worked for the majority of cases, but not all.  There are some that aren't labelled correctly, and then there's always the multi-aspect movies.  Now you'll get a pop-up so that you can select which one you want.  

chooseaspectratio.png

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share


 Share

×
×
  • Create New...