Jump to content

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


Cheesegeezer

Recommended Posts

rbjtech
5 minutes ago, Cheesegeezer said:

i've added this into the mix now.  

This will log the item id that has failed and removes it from the processed list so it can be processed next time (should the file be locked)

I tried to make it fail and the only thing i can think is that in Linux and Mac the file.attributes are something else and the file is actually Read Only.  This was the only way i could prevent writing to the file.

For Dark Knight testing - I had the video playing && mediaInfo GUI open and reading the file and the file loaded into MKVToolNix and it still exited with Code 0 and wrote the track title.  The only way the track writing failed and the process exited with a Code 2 was by making the file Read Only or Protected.

I am setting the File Attributes to Normal before writing the track titles.  Which will remove the "Read Only" attribute from the file.  However i'm not sure if this code translates to Linux or Mac.

Version 0.0.2.1 is up on the First Post

image.png.967159046fc197a165ba36bc46b77cb9.png

image.thumb.png.faeed99d5019a7b2ab5f1f37f087757d.png

 

image.thumb.png.76da8f3c2ed3ccc8f8efbccf5790e88d.png

 

image.thumb.png.adac9a44b0db273cf504337083ffc773.png

Perfect !

Thanks Dave.

 

Link to comment
Share on other sites

Cheesegeezer
13 minutes ago, rbjtech said:

Perfect !

Thanks Dave.

 

Teams :D 

Link to comment
Share on other sites

rbjtech
18 minutes ago, Cheesegeezer said:

i've added this into the mix now.  

This will log the item id that has failed and removes it from the processed list so it can be processed next time (should the file be locked)

I tried to make it fail and the only thing i can think is that in Linux and Mac the file.attributes are something else and the file is actually Read Only.  This was the only way i could prevent writing to the file.

For Dark Knight testing - I had the video playing && mediaInfo GUI open and reading the file and the file loaded into MKVToolNix and it still exited with Code 0 and wrote the track title.  The only way the track writing failed and the process exited with a Code 2 was by making the file Read Only or Protected.

I am setting the File Attributes to Normal before writing the track titles.  Which will remove the "Read Only" attribute from the file.  However i'm not sure if this code translates to Linux or Mac.

Version 0.0.2.1 is up on the First Post

image.png.967159046fc197a165ba36bc46b77cb9.png

image.thumb.png.faeed99d5019a7b2ab5f1f37f087757d.png

 

image.thumb.png.76da8f3c2ed3ccc8f8efbccf5790e88d.png

 

image.thumb.png.adac9a44b0db273cf504337083ffc773.png

If the media is on a share/nas etc, then there may be a lot of reasons why that file is 'locked' - so this is a very worthwhile addition to this awesome plugin :) 

  • Agree 1
Link to comment
Share on other sites

MagicDoubleM
10 hours ago, rbjtech said:

I strip any MKV tag's as part of my import process but I don't believe they should be the reason for a failure ?

The only thing that will stop the MKV titles being updated is if the file is open for writing by the OS - ie file is in use.  

So if ANY process is holding the file open (for whatever reason) - then the titles will not get changed.

 

It's about those tags in emby, not the about updating the mkv.

All those with that tag, don't get any tags from the plugin added. As soon as I remove it, and refresh the lib, things work fine.image.png.8a42d3be7df89c7420abbcb02c035deb.png

 

edit: looks like this has been fixed already, the current update-process populates tags as expected.

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

Cheesegeezer
17 minutes ago, MagicDoubleM said:

It's about those tags in emby, not the about updating the mkv.

All those with that tag, don't get any tags from the plugin added. As soon as I remove it, and refresh the lib, things work fine.image.png.8a42d3be7df89c7420abbcb02c035deb.png

 

edit: looks like this has been fixed already, the current update-process populates tags as expected.

was the Tag field locked in the metadata editor.  May trakt is locking that field after they tag?  I dunno, i don't use that plugin

Link to comment
Share on other sites

MagicDoubleM
22 minutes ago, Cheesegeezer said:

was the Tag field locked in the metadata editor.  May trakt is locking that field after they tag?  I dunno, i don't use that plugin

Nope, nothing locked in emby. The tag comes from the nfo that is created by radarr/sonarr, it's not from the trakt-plugin.

Link to comment
Share on other sites

Cheesegeezer
23 minutes ago, MagicDoubleM said:

Nope, nothing locked in emby. The tag comes from the nfo that is created by radarr/sonarr, it's not from the trakt-plugin.

@rbjtech why know these programs… any ideas to help an old chap out

Link to comment
Share on other sites

Cheesegeezer

I’m gonna put this out there but is anyone interested in this feature

75732123-CA73-4521-B128-54C9DBD3D60C.png.615d777a0a98f418a088722d0d9766fe.png
 

@chef

could you include this in AO2.0. I can chuck you the code if you do!!

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

neik
19 hours ago, Cheesegeezer said:

And running version 0.2.0? 

i know. I saw the log and replied to it. And explain that mediaInfo is picking up the HDR, but for some reason the plugin isn’t. For the output  

can you show your settings screen please

Yepp, running 0.0.2.0.

Sure, here a screenshot:
image.thumb.png.4bd03e93bb5754b759b44a4b3fab822e.png

image.thumb.png.9c0e5145ef2d14f5c30c1425e45167ab.png

image.thumb.png.1ca1ecb347eb797fea57fe9583797dd3.png

Link to comment
Share on other sites

Cheesegeezer
12 minutes ago, neik said:

Yepp, running 0.0.2.0.

Sure, here a screenshot:
 

 

How bizarre sir!! One is uber confused.

can you try 2.1 on first post and let me know if any of thise file exit with a code 2? Sorry fella I’m really stumped!

Link to comment
Share on other sites

MagicDoubleM
40 minutes ago, Cheesegeezer said:

I’m gonna put this out there but is anyone interested in this feature

75732123-CA73-4521-B128-54C9DBD3D60C.png.615d777a0a98f418a088722d0d9766fe.png
 

@chef

could you include this in AO2.0. I can chuck you the code if you do!!

Hell yeah, I'm very interested. Cool idea.👍🏻👍🏻👍🏻

  • Like 1
Link to comment
Share on other sites

neik
57 minutes ago, Cheesegeezer said:

How bizarre sir!! One is uber confused.

can you try 2.1 on first post and let me know if any of thise file exit with a code 2? Sorry fella I’m really stumped!

I will retry with 2.1 and feedback.

Apparently there is also an issue with identifying DTS-ES correctly:

	Line 2739: 2022-06-07 03:31:49.006 Debug Media Info: Ref Item = /(...)/movies/Bolt (2008)/Bolt (2008).mkv
	Line 2740: 2022-06-07 03:31:49.006 Debug Media Info: GENERAL INFO
	Line 2741: 2022-06-07 03:31:49.006 Debug Media Info: Video Tracks = 1
	Line 2742: 2022-06-07 03:31:49.006 Debug Media Info: Audio Tracks = 2
	Line 2743: 2022-06-07 03:31:49.006 Debug Media Info: Subtitle Tracks = 
	Line 2744: 2022-06-07 03:31:49.006 Debug Media Info: Overall Bitrate = 6212444
	Line 2745: 2022-06-07 03:31:49.006 Debug Media Info: *********************
	Line 2746: 2022-06-07 03:31:49.006 Debug Media Info: VIDEO INFO
	Line 2747: 2022-06-07 03:31:49.006 Debug Media Info: Track Format = AVC
	Line 2748: 2022-06-07 03:31:49.006 Debug Media Info: BitRate = 3191420
	Line 2749: 2022-06-07 03:31:49.006 Debug Media Info: Height =1080
	Line 2750: 2022-06-07 03:31:49.006 Debug Media Info: Width =1920
	Line 2751: 2022-06-07 03:31:49.006 Debug Media Info: Aspect Ration =1.778
	Line 2752: 2022-06-07 03:31:49.006 Debug Media Info: HDR Format =
	Line 2753: 2022-06-07 03:31:49.006 Debug Media Info: HDR Format Profile =
	Line 2754: 2022-06-07 03:31:49.006 Debug Media Info: HDR Compatibility =
	Line 2755: 2022-06-07 03:31:49.006 Debug Media Info: *********************
	Line 2756: 2022-06-07 03:31:49.035 Info Media Info: Video Stream Updated to: 1080p AVC
	Line 2757: 2022-06-07 03:31:49.035 Info Media Info: Video Track Title Set to 1080p AVC
	Line 2758: 2022-06-07 03:31:49.035 Debug Media Info: AUDIO INFO
	Line 2759: 2022-06-07 03:31:49.035 Debug Media Info: Track Format = DTS
	Line 2760: 2022-06-07 03:31:49.035 Debug Media Info: No of Channels = 6
	Line 2761: 2022-06-07 03:31:49.035 Debug Media Info: Track Index = 1
	Line 2762: 2022-06-07 03:31:49.035 Debug Media Info: Track Additional Features = ES
	Line 2763: 2022-06-07 03:31:49.035 Debug Media Info: *********************
	Line 2764: 2022-06-07 03:31:49.035 Debug Media Info: ************** Reset Embedded Titles = False
	Line 2765: 2022-06-07 03:33:22.245 Info Media Info: Audio Stream #1 Updated to:  5.1
	Line 2766: 2022-06-07 03:33:22.245 Debug Media Info: AUDIO INFO
	Line 2767: 2022-06-07 03:33:22.245 Debug Media Info: Track Format = DTS
	Line 2768: 2022-06-07 03:33:22.245 Debug Media Info: No of Channels = 6
	Line 2769: 2022-06-07 03:33:22.245 Debug Media Info: Track Index = 2
	Line 2770: 2022-06-07 03:33:22.245 Debug Media Info: Track Additional Features = ES
	Line 2771: 2022-06-07 03:33:22.245 Debug Media Info: *********************
	Line 2772: 2022-06-07 03:33:22.246 Debug Media Info: ************** Reset Embedded Titles = False
	Line 2773: 2022-06-07 03:33:22.273 Info Media Info: Audio Stream #2 Updated to:  5.1

Will recheck these with 2.1 as well.

Link to comment
Share on other sites

Cheesegeezer
8 minutes ago, neik said:

I will retry with 2.1 and feedback.

Apparently there is also an issue with identifying DTS-ES correctly:

nice catch…. I check on this tomorrow 

8 minutes ago, neik said:

Will recheck these with 2.1 as well.

 

Link to comment
Share on other sites

rbjtech
12 minutes ago, neik said:

I will retry with 2.1 and feedback.

Apparently there is also an issue with identifying DTS-ES correctly:

Will recheck these with 2.1 as well.

DTS-ES should be identified OK ?

In MediaInfo -

  • DTS-ES should be tagged as 'ES XLL'
  • DTS-ES Discreet should be tagged as 'ES XXCH'
  • DTS-HD (MA) ES Discreet should be tagged as 'ES XXCH XLL'

Can you provide the JSON output of the file (from MediaInfo GUI) and what you think it should be..  :)

Edited by rbjtech
Link to comment
Share on other sites

rbjtech
1 hour ago, Cheesegeezer said:

@rbjtech why know these programs… any ideas to help an old chap out

I believe it's been  fixed ? @MagicDoubleM - Can you kindly confirm ?

https://emby.media/community/index.php?/topic/108984-mediainfo-for-emby-pluginhdr-vision-atmos-dtsx/&do=findComment&comment=1152311

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

Cheesegeezer
13 minutes ago, rbjtech said:

DTS-ES should be identified OK ?

In MediaInfo -

  • DTS-ES should be tagged as 'ES XLL'
  • DTS-ES Discreet should be tagged as 'ES XXCH'
  • DTS-HD (MA) ES Discreet should be tagged as 'ES XXCH XLL'

Can you provide the JSON output of the file (from MediaInfo GUI) and what you think it should be..  :)

log just shows ES could be another frosty format lol 😂 

  • Haha 2
Link to comment
Share on other sites

rbjtech
1 hour ago, Cheesegeezer said:

I’m gonna put this out there but is anyone interested in this feature

75732123-CA73-4521-B128-54C9DBD3D60C.png.615d777a0a98f418a088722d0d9766fe.png
 

@chef

could you include this in AO2.0. I can chuck you the code if you do!!

Hiya Dave - just to say that some Emby Apps only work with MP4's and certain Codecs such as Dolby Vision (LG App for example).  Samsungs may be the same.

MKV has only recently got support for remuxing DV successfully - so I would be very cautious about this conversion - especially if you are then deleting the MP4 source file ..

My 2p  

 

  • Agree 1
Link to comment
Share on other sites

rbjtech
4 minutes ago, Cheesegeezer said:

log just shows ES could be another frosty format lol 😂 

Actually - I think I've got the error in my own script (that you used as the rules..) lol

I'll check this tomorrow on the file themselves - but I think -

ES = DTS ES 

ES XLL = DTS-HD ES

the XLL part is 'HD MA' - so that make sense ...

  • Thanks 1
Link to comment
Share on other sites

Cheesegeezer
40 minutes ago, rbjtech said:

Hiya Dave - just to say that some Emby Apps only work with MP4's and certain Codecs such as Dolby Vision (LG App for example).  Samsungs may be the same.

MKV has only recently got support for remuxing DV successfully - so I would be very cautious about this conversion - especially if you are then deleting the MP4 source file ..

My 2p  

 

As we discussed on Teams…. this needs some serious thought. 

  • Agree 1
Link to comment
Share on other sites

MagicDoubleM
15 hours ago, rbjtech said:

I was a little qukck with that, I did another run over my complete lib over night, and there are still movies that don't get the tags. There is no other difference than this one tag. Doing another run with the current dll, as i'm not sure if was a build behind.

Yes, 0.0.2.1 populated them all with tags. Nice work!

Edited by MagicDoubleM
  • Thanks 2
Link to comment
Share on other sites

Cheesegeezer

So i've been working on this today to make it really robust

image.png.72750f3383b5089b906f12c2195a767d.png

 

During testing nothing will be deleted.

image.png.077c7f24bad86169b0edebdc1dd2addb.png

The log will warn of days remaining before deletion

image.thumb.png.6f1c165be9f9b670a868f2bbeab04079.png

Original files have the new extension of "orig-" plus the original extension in case you need to revert back, you know what the original extension should be

Example: movie.mp4 will be renamed to movie.orig-mp4

The new mkv file creation date will be the same as when you added the orignal file (this is to keep your emby library organised)

Preserve Dolby Vision in MP4 - this will check your media using mediaInfo and check if there is a Dolby Vision Layer.  if so and you have this selected it will ignore the file, otherwise it will continue converting.

Any other special scenarios you can think of.

 

Cheers everyone

  • Like 2
Link to comment
Share on other sites

rbjtech
6 minutes ago, Cheesegeezer said:

Preserve Dolby Vision in MP4 - this will check your media using mediaInfo and check if there is a Dolby Vision Layer.  if so and you have this selected it will ignore the file, otherwise it will continue converting.

@FrostByte Should be able to chime in here as I don't personally use the .MP4 container but my understanding is certain apps with certain DV 'layers' only work with .MP4

This 'may' have changed now and the MKV container is a valid container for all DV types (5, 7 & 8  ) - but I still believe there are some restrictions on apps being able to play MKV with DV - the LG App for example.

Edited by rbjtech
  • Like 2
  • Thanks 1
Link to comment
Share on other sites

gihayes
On 6/7/2022 at 2:21 PM, Cheesegeezer said:

I’m gonna put this out there but is anyone interested in this feature

75732123-CA73-4521-B128-54C9DBD3D60C.png.615d777a0a98f418a088722d0d9766fe.png

That looks like a a great feature!!  It would help keep video consistent!

Link to comment
Share on other sites

MagicDoubleM
4 hours ago, rbjtech said:

@FrostByte Should be able to chime in here as I don't personally use the .MP4 container but my understanding is certain apps with certain DV 'layers' only work with .MP4

This 'may' have changed now and the MKV container is a valid container for all DV types (5, 7 & 8  ) - but I still believe there are some restrictions on apps being able to play MKV with DV - the LG App for example.

This is correct, DV5 in mkv produces wrong colors in the LG emby-app. It's a very special case though, so it shouldn't hold you back from offering the feature. But maybe seperate DV5 from the ones with HDR10-fallback in the options?

One simple option in that dialogue could be to only keep the default track, or tracks with certain languages, maybe even just the best quality-track per language?

One thing to keep in mind is, that changing the filename(extension) will result in tools like radarr/sonarr getting out of sync... Not sure what the solution for that might be.

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

MagicDoubleM

Re Tags... I noticed that movies with a radarr tag again lost their mediainfo tags. So here's the only explanation I have currently, emby seems to reset tags when it reads metadata from an nfo file and doesn't ever write tags through the metadata saver plugin, hence tags get lost as soon as there's one in the nfo and a metadata refresh is happening. I'll have to test this, but that's basically what was going on.

  • Thanks 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...