Jump to content

MediaInfo For Emby Plugin(HDR, Vision, Atmos, DTS:X)


Cheesegeezer

Recommended Posts

crusher11

Rather than having toggles for every little thing, why not let the user string together variables in whichever order they please? Make it a text box, and one user might enter "{{codec}} {{channels}} {{samplerate}}" and get "Dolby Digital 2.0 (48kHz)",  and another might enter "{{channels}} {{bitrate}}" and just get "2.0 192kbps", for example.

Makes it easy to customise per-user without explicitly having to have a toggle for every variable.

Link to comment
Share on other sites

Cheesegeezer
5 minutes ago, crusher11 said:

Rather than having toggles for every little thing, why not let the user string together variables in whichever order they please? Make it a text box, and one user might enter "{{codec}} {{channels}} {{samplerate}}" and get "Dolby Digital 2.0 (48kHz)",  and another might enter "{{channels}} {{bitrate}}" and just get "2.0 192kbps", for example.

Makes it easy to customise per-user without explicitly having to have a toggle for every variable.

Because it's Regex and I hate Regex it's like japenese hyroglifics mixed together.  But if you would like to code a custom Formatter for me, please be my guest.

 

  • Like 1
Link to comment
Share on other sites

crusher11
32 minutes ago, Cheesegeezer said:

Because it's Regex and I hate Regex it's like japenese hyroglifics mixed together.  But if you would like to code a custom Formatter for me, please be my guest.

 

I don't follow. How does regex fit in?

Link to comment
Share on other sites

Cheesegeezer
45 minutes ago, FrostByte said:

I need to pop outside for about 30 minutes.  I'll take a look as soon as I get back.

New dll up on First post

 

I have update the first post on this thread.  Please read thru.  Download Plugin - Replace plugin in server plugin directory --> Restart Emby Server --> Clear Browser Cache

I think this is the final version, however will be up down to how testing goes with Frostbyte

Link to comment
Share on other sites

Cheesegeezer
9 minutes ago, crusher11 said:

I don't follow. How does regex fit in?

This is a very small snippit of the code to rename an episode (not as involved as selecting many different fields from a media info, however it is essentally the same as toggles).  

Anyways - Toggles are staying and there are no plans to add in custom naming conventions.

EpisodeExpressions = new[]
            {
                // *** Begin Kodi Standard Naming
                // <!-- foo.s01.e01, foo.s01_e01, S01E02 foo, S01 - E02 -->
                new EpisodeExpression(@".*(\\|\/)(?<seriesname>((?![Ss]([0-9]+)[][ ._-]*[Ee]([0-9]+))[^\\\/])*)?[Ss](?<seasonnumber>[0-9]+)[][ ._-]*[Ee](?<epnumber>[0-9]+)([^\\/]*)$")
                {
                    IsNamed = true
                }, 
                // <!-- foo.ep01, foo.EP_01 -->
                new EpisodeExpression(@"[\._ -]()[Ee][Pp]_?([0-9]+)([^\\/]*)$"),
                new EpisodeExpression("([0-9]{4})[\\.-]([0-9]{2})[\\.-]([0-9]{2})", true)
                {
                    DateTimeFormats = new []
                    {
                        "yyyy.MM.dd",
                        "yyyy-MM-dd",
                        "yyyy_MM_dd"
                    }
                },
                new EpisodeExpression("([0-9]{2})[\\.-]([0-9]{2})[\\.-]([0-9]{4})", true)
                {
                    DateTimeFormats = new []
                    {
                        "dd.MM.yyyy",
                        "dd-MM-yyyy",
                        "dd_MM_yyyy"
                    }
                },

                new EpisodeExpression("[\\\\/\\._ \\[\\(-]([0-9]+)x([0-9]+(?:(?:[a-i]|\\.[1-9])(?![0-9]))?)([^\\\\/]*)$")
                {
                    SupportsAbsoluteEpisodeNumbers = true
                },
                new EpisodeExpression(@"[\\\\/\\._ -](?<seriesname>(?![0-9]+[0-9][0-9])([^\\\/])*)[\\\\/\\._ -](?<seasonnumber>[0-9]+)(?<epnumber>[0-9][0-9](?:(?:[a-i]|\\.[1-9])(?![0-9]))?)([\\._ -][^\\\\/]*)$")
                {
                    IsOptimistic = true,
                    IsNamed = true,
                    SupportsAbsoluteEpisodeNumbers = false
                },
                new EpisodeExpression("[\\/._ -]p(?:ar)?t[_. -]()([ivx]+|[0-9]+)([._ -][^\\/]*)$")
                {
                    SupportsAbsoluteEpisodeNumbers = true
                },

                // *** End Kodi Standard Naming

                new EpisodeExpression(@".*(\\|\/)[sS]?(?<seasonnumber>\d{1,4})[xX](?<epnumber>\d{1,3})[^\\\/]*$")
                {
                    IsNamed = true
                },

                new EpisodeExpression(@".*(\\|\/)[sS](?<seasonnumber>\d{1,4})[x,X]?[eE](?<epnumber>\d{1,3})[^\\\/]*$")
                {
                    IsNamed = true
                },

                new EpisodeExpression(@".*(\\|\/)(?<seriesname>((?![sS]?\d{1,4}[xX]\d{1,3})[^\\\/])*)?([sS]?(?<seasonnumber>\d{1,4})[xX](?<epnumber>\d{1,3}))[^\\\/]*$")
                {
                    IsNamed = true
                },

                new EpisodeExpression(@".*(\\|\/)(?<seriesname>[^\\\/]*)[sS](?<seasonnumber>\d{1,4})[xX\.]?[eE](?<epnumber>\d{1,3})[^\\\/]*$")
                {
                    IsNamed = true
                },

                // "01.avi"
                new EpisodeExpression(@".*[\\\/](?<epnumber>\d{1,3})(-(?<endingepnumber>\d{2,3}))*\.\w+$")
                {
                    IsOptimistic = true,
                    IsNamed = true
                },

                // "1-12 episode title"
                new EpisodeExpression(@"([0-9]+)-([0-9]+)")
                {
                },

                // "01 - blah.avi", "01-blah.avi"
                new EpisodeExpression(@".*(\\|\/)(?<epnumber>\d{1,3})(-(?<endingepnumber>\d{2,3}))*\s?-\s?[^\\\/]*$")
                {
                    IsOptimistic = true,
                    IsNamed = true
                },

                // "01.blah.avi"
                new EpisodeExpression(@".*(\\|\/)(?<epnumber>\d{1,3})(-(?<endingepnumber>\d{2,3}))*\.[^\\\/]+$")
                {
                    IsOptimistic = true,
                    IsNamed = true
                },

                // "blah - 01.avi", "blah 2 - 01.avi", "blah - 01 blah.avi", "blah 2 - 01 blah", "blah - 01 - blah.avi", "blah 2 - 01 - blah"
                new EpisodeExpression(@".*[\\\/][^\\\/]* - (?<epnumber>\d{1,3})(-(?<endingepnumber>\d{2,3}))*[^\\\/]*$")
                {
                    IsOptimistic = true,
                    IsNamed = true
                },

                // "01 episode title.avi"
                new EpisodeExpression(@"[Ss]eason[\._ ](?<seasonnumber>[0-9]+)[\\\/](?<epnumber>\d{1,3})([^\\\/]*)$")
                {
                    IsOptimistic = true,
                    IsNamed = true
                },
                // "Episode 16", "Episode 16 - Title"
                new EpisodeExpression(@".*[\\\/][^\\\/]* (?<epnumber>\d{1,3})(-(?<endingepnumber>\d{2,3}))*[^\\\/]*$")
                {
                    IsOptimistic = true,
                    IsNamed = true
                }
            };
Edited by Cheesegeezer
Link to comment
Share on other sites

crusher11

I was figuring you went into MediaInfo, got all the codec details, stored each of them in a variable, then spat the variables out. In which case, what I suggested simply involves changing the order in which you call the variables.

I'm not sure why regex would be required, since you would just be overwriting what was there (which should be nothing anyway, right?) with a new thing, instead of replacing certain pieces.

Link to comment
Share on other sites

Cheesegeezer
13 minutes ago, crusher11 said:

I was figuring you went into MediaInfo, got all the codec details, stored each of them in a variable, then spat the variables out. In which case, what I suggested simply involves changing the order in which you call the variables.

I'm not sure why regex would be required, since you would just be overwriting what was there (which should be nothing anyway, right?) with a new thing, instead of replacing certain pieces.

As i said, i have no intentions of changing the way it works now.  Sorry.

Link to comment
Share on other sites

rbjtech
54 minutes ago, crusher11 said:

I was figuring you went into MediaInfo, got all the codec details, stored each of them in a variable, then spat the variables out. In which case, what I suggested simply involves changing the order in which you call the variables.

I'm not sure why regex would be required, since you would just be overwriting what was there (which should be nothing anyway, right?) with a new thing, instead of replacing certain pieces.

Take a look at what you get from MediaInfo - you explain it like it was an 'easy' thing to take all that conditional info and compress it into a single 'title' per track - it very much isn't an easy thing to do as there are all sorts of if, buts, when's and why's ...   Thus you cannot do it 'manually'.

  • Agree 1
Link to comment
Share on other sites

crusher11
47 minutes ago, Cheesegeezer said:

As i said, i have no intentions of changing the way it works now.  Sorry.

I name all my tracks manually (where necessary) so I don't have a dog in this fight, it was just a thought I had is all.

  • Thanks 1
Link to comment
Share on other sites

Cheesegeezer

Yeah i see, you look at your log, you have got heaps of erros in there and lots of path deletions going on. 
 

 

Link to comment
Share on other sites

FrostByte

hmm...I'll see if I can get a cleaner log.   Movies is running right now and I did a refresh

Link to comment
Share on other sites

Cheesegeezer
3 minutes ago, FrostByte said:

hmm...I'll see if I can get a cleaner log.   Movies is running right now and I did a refresh

sure no worries

I'm expecting to see this in the log

Log.Info("PERFORMING MEDIAINFO EXTRACTION ON TV EPISODES");

and this is the next log line after Actual Episodes to process = 579

the only thing stopping is

if (config.EnableTVEpisodes) 

which is saying if EnableTVEpisodes is enabled, lets do some work.

Link to comment
Share on other sites

FrostByte

When running Movies only I see that line and I can see it adding information.  I even checked the files and all was good.

However, TV just starts and stops in 2 seconds.  

Link to comment
Share on other sites

Cheesegeezer
1 minute ago, FrostByte said:

When running Movies only I see that line and I can see it adding information.  I even checked the files and all was good.

However, TV just starts and stops in 2 seconds.  

i think i've found it

2 secs chief

 

  • Like 1
Link to comment
Share on other sites

Cheesegeezer

@FrostByte 

i can re create the fault now, so i will have a fix for you

  • Like 1
Link to comment
Share on other sites

Cheesegeezer
37 minutes ago, FrostByte said:

When running Movies only I see that line and I can see it adding information.  I even checked the files and all was good.

However, TV just starts and stops in 2 seconds.  

plugin dll is updated in first post.  This is fixed now and should work like a charm buddy.

Great catch on the bug by the way!!!  Thanks

  • Like 1
Link to comment
Share on other sites

Cheesegeezer
1 minute ago, FrostByte said:

That was it.  Appears to be updating now.  Thank you

Awesome.... Thanks for your patience.  You can turn off Debug logging now lol!!

 

  • Thanks 1
Link to comment
Share on other sites

FrostByte

If anyone else wants to run this on their Synology just add the "SynoCommunity" repository to Package Center and you will see the mediainfo and mkvtoolnix packages to install.  CLI only.

  • Like 1
Link to comment
Share on other sites

FrostByte

DV5 appears correct, no HDR10 compatibility added

Video 
ID : 1 
Format : HEVC 
Format/Info : High Efficiency Video Coding 
Format profile : Main 10@L5@High 
HDR format : Dolby Vision, Version 1.0, dvhe.05.06, BL+RPU 
Codec ID : V_MPEGH/ISO/HEVC 
Duration : 42 min 24 s 
Bit rate : 15.7 Mb/s 
Width : 3 840 pixels 
Height : 2 160 pixels 
Display aspect ratio : 16:9 
Frame rate mode : Constant 
Frame rate : 24.000 FPS 
Color space : YUV 
Chroma subsampling : 4:2:0 
Bit depth : 10 bits 
Bits/(Pixel*Frame) : 0.079 
Stream size : 4.65 GiB (95%) 
Title : 4K DV5 HEVC  
Default : No 
Forced : No 
Color range : Full 

 

  • Like 1
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...