Cheesegeezer 3086 Posted September 24, 2022 Share Posted September 24, 2022 (edited) Cheesey Productions brings you SUB-KILLER for Emby Remove those unwanted subtitle languages Removes Graphical subtitles by default & can extract text based subtitles as an option Available from the plugin store A huge shout out to @rbjtech @FrostByte and @Dickydodah!for all their help with this. https://twemoji.maxcdn.com/2/72x72/1f44d.png Please read the wiki page available that will help you get set up. - currently under construction SUB-KILLER WIKI PAGE This plugin is destructive as it removes physical subtitle files from your media containers PLEASE USE A TEST LIBRARY FIRST Config Page Edited October 3, 2022 by Cheesegeezer 9 2 Link to comment Share on other sites More sharing options...
MagicDoubleM 93 Posted September 26, 2022 Share Posted September 26, 2022 Very nice idea. Looking forward to this one. Link to comment Share on other sites More sharing options...
Cheesegeezer 3086 Posted October 3, 2022 Author Share Posted October 3, 2022 Hey peeps So i think we are at the stage for release. Please set up a test library (create a new library and throw in some copies of some TV or Movie files) and then do a library scan and see if you get the desired results. I think it's working well from our testing. Requires 4.7.7.0 Emby Server Version 1.0.0.0 is available in the plugin catalogue under Metadata Section. Enjoy 1 Link to comment Share on other sites More sharing options...
Dickydodah! 127 Posted October 5, 2022 Share Posted October 5, 2022 Hi, I've been testing this for some while now and it works a treat but I have noticed a few failures and seen this in the logs. 2022-10-05 12:40:07.173 Info SubKiller: PROCESSING OF Labor Day HAS STARTED 2022-10-05 12:40:07.173 Info SubKiller: Item FilePath = M:\TV Shows\The Rookie\Season 05 - The Rookie\The Rookie - S05E02 - Labor Day.mkv 2022-10-05 12:40:07.173 Debug SubKiller: total No of Streams = 4 2022-10-05 12:40:07.173 Debug SubKiller: total No of Subtitles = 2 2022-10-05 12:40:07.173 Debug SubKiller: Subtitle Start Index = 2 2022-10-05 12:40:07.173 Debug SubKiller: Subtitle Display Lang = English, Embedded Title = , Language = eng, Index = 2, is Forced=False, isTextBased = True 2022-10-05 12:40:07.173 Debug SubKiller: Subtitle Display Lang = English, Embedded Title = SDH, Language = eng, Index = 3, is Forced=False, isTextBased = True 2022-10-05 12:40:07.173 Info SubKiller: Languages selected = [eng] 2022-10-05 12:40:07.173 Debug SubKiller: Stored Lang:eng - Stored Title: - Index:0 - Forced:False 2022-10-05 12:40:07.173 Debug SubKiller: Stored Lang:eng - Stored Title:SDH - Index:1 - Forced:False 2022-10-05 12:40:07.173 Info SubKiller: Extracting Subtitles to File 2022-10-05 12:40:07.174 Error SubKiller: ***** ERROR ***** UNABLE TO PERFORM SUBTITLE PROCESSING IN MAIN METHOD 2022-10-05 12:40:07.175 Error SubKiller: System.NullReferenceException: Object reference not set to an instance of an object. at Emby.SubKiller.ScheduledTasks.SubKillerScheduledTask.ExtractSubtitles(BaseItem item) at Emby.SubKiller.ScheduledTasks.SubKillerScheduledTask.MatchSubtitles(BaseItem item) at Emby.SubKiller.ScheduledTasks.SubKillerScheduledTask.Execute(CancellationToken cancellationToken, IProgress`1 progress) Link to comment Share on other sites More sharing options...
Cheesegeezer 3086 Posted October 5, 2022 Author Share Posted October 5, 2022 @Dickydodah! Are the files Read-Only for some reason... this sometimes happens with MKV's check the file properties, if they are read only, i will handle this in the code.(i must have missed it on sub killer) lol Dang i also need to do the Linux Mod too!! Link to comment Share on other sites More sharing options...
Dickydodah! 127 Posted October 5, 2022 Share Posted October 5, 2022 @Cheesegeezer They are not read only. This is not the only file that has this issue and the common thing seems to be that they only have 2 english subs so no foreign ones to delete. If you recall there is also a problem when there are no subs of the chosen language to extract, all the foreign subs are left embedded. Just to make it even more weird if I have the forced only switch on and there are three english subs in the file (along with other languages) The two unwanted english subs are left embeded. Link to comment Share on other sites More sharing options...
Cheesegeezer 3086 Posted October 5, 2022 Author Share Posted October 5, 2022 ok cheers i'll take a look when i get a chance fella 1 Link to comment Share on other sites More sharing options...
Dickydodah! 127 Posted October 6, 2022 Share Posted October 6, 2022 @Cheesegeezer An example of nothing happening if there are no subs of the chosen language. Not a real problem in this file as there is only one french sub but could be if there were loads. This one doesn't kick out an error so I'm guessing its something to do with the way SubKiller is assesing the file. I thought you might like a look when you get some time 2022-10-05 12:56:45.876 Info SubKiller: PROCESSING OF The Greater Good HAS STARTED 2022-10-05 12:56:45.876 Info SubKiller: Item FilePath = M:\TV Shows\Power Book II - Ghost\Season 02 - Power Book II - Ghost\Power Book II - Ghost - S02E03 - The Greater Good.mkv 2022-10-05 12:56:45.877 Debug SubKiller: total No of Streams = 3 2022-10-05 12:56:45.877 Debug SubKiller: total No of Subtitles = 1 2022-10-05 12:56:45.877 Debug SubKiller: Subtitle Start Index = 2 2022-10-05 12:56:45.877 Debug SubKiller: Subtitle Display Lang = French, Embedded Title = French, Language = fre, Index = 2, is Forced=False, isTextBased = True 2022-10-05 12:56:45.877 Info SubKiller: Languages selected = [eng] 2022-10-05 12:56:45.877 Info SubKiller: PROCESSING OF The Greater Good HAS COMPLETED 2022-10-05 12:56:45.877 Debug SubKiller: SubKiller processing for The Greater Good and took 0 milliseconds 2022-10-05 12:56:45.877 Debug SubKiller: Id -3715461 - The Greater Good has already been added to the processed List Link to comment Share on other sites More sharing options...
Cheesegeezer 3086 Posted October 6, 2022 Author Share Posted October 6, 2022 55 minutes ago, Dickydodah! said: @Cheesegeezer An example of nothing happening if there are no subs of the chosen language. Not a real problem in this file as there is only one french sub but could be if there were loads. This one doesn't kick out an error so I'm guessing its something to do with the way SubKiller is assesing the file. I thought you might like a look when you get some time 2022-10-05 12:56:45.876 Info SubKiller: PROCESSING OF The Greater Good HAS STARTED 2022-10-05 12:56:45.876 Info SubKiller: Item FilePath = M:\TV Shows\Power Book II - Ghost\Season 02 - Power Book II - Ghost\Power Book II - Ghost - S02E03 - The Greater Good.mkv 2022-10-05 12:56:45.877 Debug SubKiller: total No of Streams = 3 2022-10-05 12:56:45.877 Debug SubKiller: total No of Subtitles = 1 2022-10-05 12:56:45.877 Debug SubKiller: Subtitle Start Index = 2 2022-10-05 12:56:45.877 Debug SubKiller: Subtitle Display Lang = French, Embedded Title = French, Language = fre, Index = 2, is Forced=False, isTextBased = True 2022-10-05 12:56:45.877 Info SubKiller: Languages selected = [eng] 2022-10-05 12:56:45.877 Info SubKiller: PROCESSING OF The Greater Good HAS COMPLETED 2022-10-05 12:56:45.877 Debug SubKiller: SubKiller processing for The Greater Good and took 0 milliseconds 2022-10-05 12:56:45.877 Debug SubKiller: Id -3715461 - The Greater Good has already been added to the processed List Yep I forgot to handle it not finding the selected language(s). Thanks i'll get round to it Ta 1 Link to comment Share on other sites More sharing options...
Dickydodah! 127 Posted October 7, 2022 Share Posted October 7, 2022 Sorry to do this but I've just found a little GUI bug. If you hover your mouse over the + next to the dropdown to choose libraries it comes up with a tooltip that says "ignore series". 1 Link to comment Share on other sites More sharing options...
fillidill 153 Posted October 8, 2022 Share Posted October 8, 2022 I really want to try this out but I have two questions. Will this plugin be available to the latest stable release? Maybe stupid question but do I understand correctly that this will remove ASS subtitles? Link to comment Share on other sites More sharing options...
Cheesegeezer 3086 Posted October 8, 2022 Author Share Posted October 8, 2022 (edited) 47 minutes ago, fillidill said: I really want to try this out but I have two questions. Will this plugin be available to the latest stable release? yes 47 minutes ago, fillidill said: Maybe stupid question but do I understand correctly that this will remove ASS subtitles? Are ass subs external or stored internally? If they are text based internally then any text based sub would be extracted as SRT. I should really add a function to extract them based on what the user wants. if the subs are already extracted then it wont touch them Edited October 8, 2022 by Cheesegeezer 1 Link to comment Share on other sites More sharing options...
fillidill 153 Posted October 8, 2022 Share Posted October 8, 2022 2 hours ago, Cheesegeezer said: yes Are ass subs external or stored internally? If they are text based internally then any text based sub would be extracted as SRT. I should really add a function to extract them based on what the user wants. if the subs are already extracted then it wont touch them They are internal. I however just want to get rid of them (because of how bad it works in emby browser app streamed from my ds920+), no need for extracting. Link to comment Share on other sites More sharing options...
Cheesegeezer 3086 Posted October 8, 2022 Author Share Posted October 8, 2022 I have just released a new version for testing in our we group so waiting for feedback on that. i would suggest that you create a new library and copy a couple of shows or movies to that library. Ive invited you to it Link to comment Share on other sites More sharing options...
MagicDoubleM 93 Posted October 8, 2022 Share Posted October 8, 2022 Quick question, what happens to subtitles that aren't properly tagged? I guess they get removed, so can we have an option to keep those? Could, you, wild thinking here, scan through those subs and identify the actual language? Link to comment Share on other sites More sharing options...
MagicDoubleM 93 Posted October 9, 2022 Share Posted October 9, 2022 One more little feature request: Taking special flags in consideration would make sense, like always keeping subs for the original language or commentaries. Link to comment Share on other sites More sharing options...
Cheesegeezer 3086 Posted October 9, 2022 Author Share Posted October 9, 2022 (edited) On 08/10/2022 at 18:31, MagicDoubleM said: Quick question, what happens to subtitles that aren't properly tagged? I guess they get removed, so can we have an option to keep those? that’s not my job to ensure that “obtained” media has been tagged & encoded correctly. On 08/10/2022 at 18:31, MagicDoubleM said: Could, you, wild thinking here, scan through those subs and identify the actual language? Absolutely not! Edited October 9, 2022 by Cheesegeezer Link to comment Share on other sites More sharing options...
Cheesegeezer 3086 Posted October 9, 2022 Author Share Posted October 9, 2022 (edited) 1 hour ago, MagicDoubleM said: One more little feature request: Taking special flags in consideration would make sense, like always keeping subs for the original language or commentaries. The scope of the plugin is purely to deal with language, forced and SDH flags. Its a tool to reduce the number of subtitles stored in a media container. Edited October 9, 2022 by Cheesegeezer Link to comment Share on other sites More sharing options...
gihayes 34 Posted October 14, 2022 Share Posted October 14, 2022 (edited) Subkiller Generating Errors, Not able to Extract Subtitle. Thanks for all your hard work on the gazillion plugins Cheese. Subkiller is never finishing on my system. Never gets past 3% no matter how long it runs. The directory where it is processing files is not read only. Emby and other programs are able to read and write to it fine. It seems that if it has nothing to extract it's OK. I restarted Emby, and started Subkiller running from Scheduled Tasks. The log is attached. Subrip Error.txt Edited October 15, 2022 by gihayes Link to comment Share on other sites More sharing options...
gihayes 34 Posted October 15, 2022 Share Posted October 15, 2022 On 10/14/2022 at 12:57 PM, gihayes said: Subkiller Generating Errors, Not able to Extract Subtitle. Thanks for all your hard work on the gazillion plugins Cheese. Subkiller is never finishing on my system. Never gets past 3% no matter how long it runs. The directory where it is processing files is not read only. Emby and other programs are able to read and write to it fine. It seems that if it has nothing to extract it's OK. I restarted Emby, and started Subkiller running from Scheduled Tasks. The log is attached. Subrip Error.txt 115.36 kB · 4 downloads There were several other errors occurring in the log, so I set Emby to do a Database Vacuum, shut down Emby, rebooted the computer and restarted Emby before bed last night. This morning I discovered that the Subkiller was working Ok. It was at 60 or some percent when I looked at it and it finished some time later. Now it finishes a run in seconds. All is well. Link to comment Share on other sites More sharing options...
hhoverflow 0 Posted October 28, 2022 Share Posted October 28, 2022 Do I need any other package to use the SubKiller? I have this error. Running Emby stable version on a Synology NAS. *** Error Report *** Version: 4.7.8.0 Command line: /volume1/@appstore/EmbyServer/system/EmbyServer.dll -programdata /var/packages/EmbyServer/var -ffdetect /var/packages/EmbyServer/target/bin/ffdetect -ffmpeg /var/packages/EmbyServer/target/bin/ffmpeg -ffprobe /var/packages/EmbyServer/target/bin/ffprobe -nolocalportconfig -ignore_vaapi_enabled_flag -pidfile /var/packages/EmbyServer/var/EmbyServer.pid -defaultdirectory /volume1/Public -updatepackage emby-server-synology7_{version}_x86_64.spk -noautorunwebapp Operating system: Linux version 4.4.180+ (root@build15) (gcc version 8.5.0 (GCC) ) #42962 SMP Wed Sep 21 10:56:47 CST 2022 Framework: .NET 6.0.8 OS/Process: x64/x64 Runtime: volume1/@appstore/EmbyServer/system/System.Private.CoreLib.dll Processor count: 4 Data path: /var/packages/EmbyServer/var Application path: /volume1/@appstore/EmbyServer/system System.NotImplementedException: System.NotImplementedException: The method or operation is not implemented. at Emby.SubKiller.ScheduledTasks.SubKillerScheduledTask.Run() at Emby.Server.Implementations.ApplicationHost.RunEntryPoints(IEnumerable`1 entryPoints, Boolean isBeforeStartup) Source: Emby.SubKiller TargetSite: Void Run() Link to comment Share on other sites More sharing options...
Cheesegeezer 3086 Posted October 28, 2022 Author Share Posted October 28, 2022 6 hours ago, hhoverflow said: Do I need any other package to use the SubKiller? I have this error. Running Emby stable version on a Synology NAS. *** Error Report *** Version: 4.7.8.0 Command line: /volume1/@appstore/EmbyServer/system/EmbyServer.dll -programdata /var/packages/EmbyServer/var -ffdetect /var/packages/EmbyServer/target/bin/ffdetect -ffmpeg /var/packages/EmbyServer/target/bin/ffmpeg -ffprobe /var/packages/EmbyServer/target/bin/ffprobe -nolocalportconfig -ignore_vaapi_enabled_flag -pidfile /var/packages/EmbyServer/var/EmbyServer.pid -defaultdirectory /volume1/Public -updatepackage emby-server-synology7_{version}_x86_64.spk -noautorunwebapp Operating system: Linux version 4.4.180+ (root@build15) (gcc version 8.5.0 (GCC) ) #42962 SMP Wed Sep 21 10:56:47 CST 2022 Framework: .NET 6.0.8 OS/Process: x64/x64 Runtime: volume1/@appstore/EmbyServer/system/System.Private.CoreLib.dll Processor count: 4 Data path: /var/packages/EmbyServer/var Application path: /volume1/@appstore/EmbyServer/system System.NotImplementedException: System.NotImplementedException: The method or operation is not implemented. at Emby.SubKiller.ScheduledTasks.SubKillerScheduledTask.Run() at Emby.Server.Implementations.ApplicationHost.RunEntryPoints(IEnumerable`1 entryPoints, Boolean isBeforeStartup) Source: Emby.SubKiller TargetSite: Void Run() @FrostByte should be able to help you he has Synology and been testing Subkiller with us. Link to comment Share on other sites More sharing options...
FrostByte 5042 Posted October 28, 2022 Share Posted October 28, 2022 3 hours ago, Cheesegeezer said: @FrostByte should be able to help you he has Synology and been testing Subkiller with us. I get the same error running beta server, though the plugin works just fine. You get that error on server startup so it's not even running the task yet. System.NotImplementedException: System.NotImplementedException: The method or operation is not implemented. at Emby.SubKiller.ScheduledTasks.SubKillerScheduledTask.Run() at Emby.Server.Implementations.ApplicationHost.RunEntryPoints(IEnumerable`1 entryPoints, Boolean isBeforeStartup) 1 Link to comment Share on other sites More sharing options...
Dickydodah! 127 Posted October 28, 2022 Share Posted October 28, 2022 @Cheesegeezer I believe I have found a small bug. I'm currently running v1.0.0.0 on server v4.7.8.0. I'm using a scheduled task as I have been seeing some odd errors in the debug log mostly due to file locks on files that have just been imported so I decided to keep it simple I have Subkiller set to extract all Eng subs and it is working fine extracting Normal, SDH and Forced subs as expected. I have narrowed down the issue I'm seeing to external SRT subs that existed prior to installing Subkiller. It seems that SubKiller is interpreting these as embeded subs and attempting to extract them and then failing. This particular file has no embeded subs and just one external SRT file. (I have 20 "problem" files with pre existing subs) Whilst this doesn't really cause me any issues it does slow down the scanning process as the ID is never added to the processed list and the files are scanned everytime Subkiller runs. I can see problems scenarios where the external subs are imported when the video file is imported which I currently don't do. I intend to remove all the problem SRT files and run SubKiller again to get them into the processed list and then I should be able to add the SRT files back. I think the issue may also occur if you choose to refresh the processed list but currently I'm not 100% certain. 2022-10-28 15:46:13.227 Info SubKiller: PROCESSING OF The House of Enlightenment HAS STARTED 2022-10-28 15:46:13.227 Info SubKiller: Item FilePath = M:\TV Shows\See\Season 03 - See\See - S03E05 - The House of Enlightenment.mkv 2022-10-28 15:46:13.227 Debug SubKiller: total No of Streams = 3 2022-10-28 15:46:13.228 Debug SubKiller: total No of Subtitles = 1 2022-10-28 15:46:13.228 Debug SubKiller: Subtitle Start Index = 2 2022-10-28 15:46:13.228 Debug SubKiller: Subtitle Display Lang = English, Embedded Title = , Language = eng, Index = 2, is Forced=True, isTextBased = True 2022-10-28 15:46:13.228 Info SubKiller: Languages selected = [eng] 2022-10-28 15:46:13.228 Debug SubKiller: Stored Lang:eng - Stored Title: - Index:0 - Forced:True 2022-10-28 15:46:13.228 Info SubKiller: Extracting Subtitles to File 2022-10-28 15:46:13.228 Error SubKiller: ***** ERROR ***** UNABLE TO PERFORM SUBTITLE PROCESSING IN MAIN METHOD 2022-10-28 15:46:13.229 Error SubKiller: System.NullReferenceException: Object reference not set to an instance of an object. at Emby.SubKiller.ScheduledTasks.SubKillerScheduledTask.ExtractSubtitles(BaseItem item) at Emby.SubKiller.ScheduledTasks.SubKillerScheduledTask.MatchSubtitles(BaseItem item) at Emby.SubKiller.ScheduledTasks.SubKillerScheduledTask.Execute(CancellationToken cancellationToken, IProgress`1 progress) Link to comment Share on other sites More sharing options...
Dickydodah! 127 Posted October 28, 2022 Share Posted October 28, 2022 (edited) I can confirm that removing and running SubKiller again before re adding the SRT files works. I can also confirm that refreshing the processed list is what causes the problem. You have to rescan the library after deleting the SRT files as I'm guessing SubKiller gets the info regarding the number of subs from the Emby DB. Edited October 28, 2022 by Dickydodah! 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