bakes82 90 Posted November 18, 2020 Share Posted November 18, 2020 Emby Kill Streams Plugin This plugin offers a couple options to kill transcoding 4k streams, streams that have been paused for xx min (set in config), and a fun nag warning to tell users not to transcode if set. Screen shots and dll on github. https://github.com/bakes82/Emby_KillStreams https://github.com/bakes82/Emby_KillStreams/releases 4 Link to comment Share on other sites More sharing options...
MangoMC 50 Posted November 24, 2020 Share Posted November 24, 2020 (edited) Thx for the plugin, but it doesnt work for me I placed it in plugins, opened the settings and checked audio transcode + nag, set time to 20. But video transcoding is still possible, also after a server restart the settings are gone Edited November 24, 2020 by MangoMC Link to comment Share on other sites More sharing options...
MangoMC 50 Posted November 24, 2020 Share Posted November 24, 2020 Ok. Kill paused Works. And that nag Feature too. Only the 4k Stop Not. I guess its because its looking for the Resolution and transcoding but transcodet 4k has got a smaller resolution Link to comment Share on other sites More sharing options...
bakes82 90 Posted November 24, 2020 Author Share Posted November 24, 2020 Correct the code looks for a width and height that is 4K. I can see if there is another option but it does kill 4K video transcodes when the 4K video is of the standard 4K size. @chefis there a flag that says a file is 4K other than using the width/height? How else would it be 4K? Link to comment Share on other sites More sharing options...
MangoMC 50 Posted November 24, 2020 Share Posted November 24, 2020 Maybe u can use codec hevc? I dont have many other Things with hevc Else than 4k. And the one that i have dont need transcode because they are at low Bitrate Link to comment Share on other sites More sharing options...
bakes82 90 Posted November 24, 2020 Author Share Posted November 24, 2020 HVEC is not 4k its x265. The code is on github so you can roll your own version if you want to do that. It also depends on what data is available to me at the stream level. Why do you have non standard sized 4k? Link to comment Share on other sites More sharing options...
MangoMC 50 Posted November 24, 2020 Share Posted November 24, 2020 4k is Not always the same resolution. Many of my files are 3840x1600 or something like that. And i Would like to change it but im too stupid Link to comment Share on other sites More sharing options...
bakes82 90 Posted November 24, 2020 Author Share Posted November 24, 2020 8 minutes ago, MangoMC said: 4k is Not always the same resolution. Many of my files are 3840x1600 or something like that. And i Would like to change it but im too stupid Show the media info for one of those. Are they cropping the bars or something lol. Not saying its not possible but how is that 4k then There less pixels its like 3.xK Link to comment Share on other sites More sharing options...
MangoMC 50 Posted November 24, 2020 Share Posted November 24, 2020 Link to comment Share on other sites More sharing options...
bakes82 90 Posted November 24, 2020 Author Share Posted November 24, 2020 @Luke How would I know if something is 4K or not? Link to comment Share on other sites More sharing options...
bakes82 90 Posted November 24, 2020 Author Share Posted November 24, 2020 @MangoMC Pushed out new release where I'm doing some ninja hack shit, it still seems to work for my "true" 4k movie so let me know. When you look at a file and it says "Video: 4K HEVC" as long as this field contains "4K" it should match the 4k logic now. @Luke This is the magic, seems kind of bad to me... var mediaSourceItem = sessionManagerSession.FullNowPlayingItem.GetMediaSources(false, false, new LibraryOptions()).Single(x => String.Equals(x.Id, sessionManagerSession.PlayState.MediaSourceId, StringComparison.CurrentCultureIgnoreCase)); var is4K = mediaSourceItem != null && mediaSourceItem.VideoStream.DisplayTitle.ToLower().Contains("4k"); Link to comment Share on other sites More sharing options...
Luke 37060 Posted November 25, 2020 Share Posted November 25, 2020 Yes I would like at the videostream width and height instead of the display title. Link to comment Share on other sites More sharing options...
Happy2Play 8281 Posted November 25, 2020 Share Posted November 25, 2020 I know nothing about this but anything greater then 1920X1080. Link to comment Share on other sites More sharing options...
bakes82 90 Posted November 25, 2020 Author Share Posted November 25, 2020 Yeah I guess I could do height/width > 1080p but less than the start of 8k. And that’s “4K”. Plex had a flag that says it’s 4K true/false. Makes life easy. @Luke looking at width height doesn’t account for the non standard 4K size. It’s how I had it originally set to standard 4K lol. Then I saw that display title thing. How does that get set to 4K Link to comment Share on other sites More sharing options...
MangoMC 50 Posted November 25, 2020 Share Posted November 25, 2020 Hey. Still doesnt work, both new Versions When i play direct stream the Kill Audio Transcode works. But when i start transcode to like 8Mbits nothing happens. It also doenst start transcodet with the kill audio transcodet. Link to comment Share on other sites More sharing options...
bakes82 90 Posted November 25, 2020 Author Share Posted November 25, 2020 (edited) @MangoMC New version should be out in 5, changed the AND to an OR before the kill would only happen if both transcode options were unchecked, now as long as 1 is unchecked should kill. Does the 4K Stream Audio Transcoding message appear every min? Based on the code I think it does, so I should probably do some stuff on that so it only shows it a few times Edited November 25, 2020 by bakes82 Link to comment Share on other sites More sharing options...
MangoMC 50 Posted November 25, 2020 Share Posted November 25, 2020 Now it kills the stream always with checked or not checked Allow audio transcode, and yes the message appears in the version before all the time. I dont want that message, but i think thats something that i can remove myself from the code. Link to comment Share on other sites More sharing options...
bakes82 90 Posted November 25, 2020 Author Share Posted November 25, 2020 What options are checked? Allow 4k Audio and Nag? Link to comment Share on other sites More sharing options...
MangoMC 50 Posted November 25, 2020 Share Posted November 25, 2020 Only 4k Audio and 20min pause time. But the settings in the configuration menu doenst save, audio and video is always false no matter what u check so i edit the file to true on allowaudio. The pause time gets saved Link to comment Share on other sites More sharing options...
MangoMC 50 Posted November 25, 2020 Share Posted November 25, 2020 With both true it doenst kill, thats ok, but also no message appears Link to comment Share on other sites More sharing options...
bakes82 90 Posted November 25, 2020 Author Share Posted November 25, 2020 (edited) 11 minutes ago, MangoMC said: With both true it doenst kill, thats ok, but also no message appears Correct both true = normal Emby function, it wont kill or msg about a transcode. Both false should kill a transcode :P. Audio being true and Video being false well Its hard for me to test, all my devices direct play all audio lol. Usually when audio is transcode video is also. Edited November 25, 2020 by bakes82 Link to comment Share on other sites More sharing options...
MangoMC 50 Posted November 25, 2020 Share Posted November 25, 2020 For me it always transcodes the Audio. Because is use Soundbar that only Supports dd+ and the 4k files are almost All dts or better. And Audio transcoding is Not really Hard for the CPU or gpu so its Not a Problem for me. Only video transcoding is too Hard Link to comment Share on other sites More sharing options...
MangoMC 50 Posted November 25, 2020 Share Posted November 25, 2020 Would it be possible to just write the plugin to stop video transcoding without that audio transcoding stuff? Link to comment Share on other sites More sharing options...
bakes82 90 Posted November 25, 2020 Author Share Posted November 25, 2020 @MangoMCNew version, fixes config save and should work with all options. If not its very close. Also in the logs I added some extra logging: 2020-11-25 13:19:56.933 Debug TaskManager: IntervalTrigger fired for task: Task to kill streams 2020-11-25 13:19:56.933 Debug TaskManager: Queueing task KillStreamScheduledTask 2020-11-25 13:19:56.933 Debug TaskManager: Executing Task to kill streams 2020-11-25 13:19:56.944 Info App: Count of streams 4 2020-11-25 13:19:56.944 Info App: AllowAudioTranscode True AllowVideoTranscode False 2020-11-25 13:19:56.945 Info App: Device Id 963f417a-4f9e-4a31-b3e2-a3f0ebab6553 - UserName Administrator - ID e9c1e79c56c7074b5eee100d9e51e98d PlayState Method AudioDirect Video Direct 2020-11-25 13:19:56.945 Info App: Device Id 5f41ffa9-b227-4425-aa93-3974b12f4d75 - UserName test - ID 8d37030bac2e0d62abd483f17200916a PlayState Method Transcode AudioDirect False Video Direct False 2020-11-25 13:19:56.946 Info App: Height 2160 Width 3840 2020-11-25 13:19:56.946 Info App: Inside Kill Video 4k 2020-11-25 13:19:56.946 Info App: Device Id 5f41ffa9-b227-4425-aa93-3974b12f4d75 - UserName test - ID 8d37030bac2e0d62abd483f17200916a 2020-11-25 13:19:56.961 Info App: Inside Allow 4k audio transcode 2020-11-25 13:19:56.961 Info App: Device Id 5f41ffa9-b227-4425-aa93-3974b12f4d75 - UserName test - ID 8d37030bac2e0d62abd483f17200916a 2020-11-25 13:19:56.961 Info App: Device Id uuid:42b94523-2f9f-188a-0080-0005cd71a874 - UserName - ID 6a128826c8c437711acc1388280b58cd PlayState Method AudioDirect Video Direct 2020-11-25 13:19:56.961 Info App: Device Id uuid:96bdf8a6-218d-15d6-0080-0005cd7149cc - UserName - ID aa75acb3fae90aaf672d5cfc9c97a802 PlayState Method AudioDirect Video Direct 2020-11-25 13:19:56.962 Info App: Count of paused streams 0 2020-11-25 13:19:56.962 Debug TaskManager: Task to kill streams Completed after 0 minute(s) and 0 seconds Link to comment Share on other sites More sharing options...
MangoMC 50 Posted November 25, 2020 Share Posted November 25, 2020 i guess its working, tested with 3 files. Perfect. Only one little bug 1. The reason on video transcoding killing was the one with audio transcoding And one feature request. Option to disable the info that im transcoding audio, i dont need that Great WORK 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