rbjtech 4342 Posted June 7, 2022 Share Posted June 7, 2022 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 Perfect ! Thanks Dave. Link to comment Share on other sites More sharing options...
Cheesegeezer 3089 Posted June 7, 2022 Author Share Posted June 7, 2022 13 minutes ago, rbjtech said: Perfect ! Thanks Dave. Teams Link to comment Share on other sites More sharing options...
rbjtech 4342 Posted June 7, 2022 Share Posted June 7, 2022 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 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 1 Link to comment Share on other sites More sharing options...
MagicDoubleM 94 Posted June 7, 2022 Share Posted June 7, 2022 (edited) 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. edit: looks like this has been fixed already, the current update-process populates tags as expected. Edited June 7, 2022 by MagicDoubleM update 1 Link to comment Share on other sites More sharing options...
Cheesegeezer 3089 Posted June 7, 2022 Author Share Posted June 7, 2022 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. 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 More sharing options...
MagicDoubleM 94 Posted June 7, 2022 Share Posted June 7, 2022 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 More sharing options...
Cheesegeezer 3089 Posted June 7, 2022 Author Share Posted June 7, 2022 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 More sharing options...
Cheesegeezer 3089 Posted June 7, 2022 Author Share Posted June 7, 2022 (edited) I’m gonna put this out there but is anyone interested in this feature @chef could you include this in AO2.0. I can chuck you the code if you do!! Edited June 7, 2022 by Cheesegeezer 1 Link to comment Share on other sites More sharing options...
neik 838 Posted June 7, 2022 Share Posted June 7, 2022 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: Link to comment Share on other sites More sharing options...
Cheesegeezer 3089 Posted June 7, 2022 Author Share Posted June 7, 2022 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 More sharing options...
MagicDoubleM 94 Posted June 7, 2022 Share Posted June 7, 2022 40 minutes ago, Cheesegeezer said: I’m gonna put this out there but is anyone interested in this feature @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. 1 Link to comment Share on other sites More sharing options...
neik 838 Posted June 7, 2022 Share Posted June 7, 2022 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 More sharing options...
Cheesegeezer 3089 Posted June 7, 2022 Author Share Posted June 7, 2022 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 More sharing options...
rbjtech 4342 Posted June 7, 2022 Share Posted June 7, 2022 (edited) 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 June 7, 2022 by rbjtech Link to comment Share on other sites More sharing options...
rbjtech 4342 Posted June 7, 2022 Share Posted June 7, 2022 (edited) 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 June 7, 2022 by rbjtech 1 Link to comment Share on other sites More sharing options...
Cheesegeezer 3089 Posted June 7, 2022 Author Share Posted June 7, 2022 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 2 Link to comment Share on other sites More sharing options...
rbjtech 4342 Posted June 7, 2022 Share Posted June 7, 2022 1 hour ago, Cheesegeezer said: I’m gonna put this out there but is anyone interested in this feature @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 1 Link to comment Share on other sites More sharing options...
rbjtech 4342 Posted June 7, 2022 Share Posted June 7, 2022 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 ... 1 Link to comment Share on other sites More sharing options...
Cheesegeezer 3089 Posted June 7, 2022 Author Share Posted June 7, 2022 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. 1 Link to comment Share on other sites More sharing options...
MagicDoubleM 94 Posted June 8, 2022 Share Posted June 8, 2022 (edited) 15 hours ago, rbjtech said: 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 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 June 8, 2022 by MagicDoubleM 2 Link to comment Share on other sites More sharing options...
Cheesegeezer 3089 Posted June 8, 2022 Author Share Posted June 8, 2022 So i've been working on this today to make it really robust During testing nothing will be deleted. The log will warn of days remaining before deletion 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 2 Link to comment Share on other sites More sharing options...
rbjtech 4342 Posted June 8, 2022 Share Posted June 8, 2022 (edited) 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 June 8, 2022 by rbjtech 2 1 Link to comment Share on other sites More sharing options...
gihayes 34 Posted June 8, 2022 Share Posted June 8, 2022 On 6/7/2022 at 2:21 PM, Cheesegeezer said: I’m gonna put this out there but is anyone interested in this feature That looks like a a great feature!! It would help keep video consistent! Link to comment Share on other sites More sharing options...
MagicDoubleM 94 Posted June 8, 2022 Share Posted June 8, 2022 (edited) 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 June 8, 2022 by MagicDoubleM 1 Link to comment Share on other sites More sharing options...
MagicDoubleM 94 Posted June 10, 2022 Share Posted June 10, 2022 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. 1 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now