Jump to content

Kill 4K Transcode Streams/Paused Time Out


bakes82

Recommended Posts

MangoMC

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

 

image.png.585337cd5f69cbd80cf97906dc12628d.png

Edited by MangoMC
Link to comment
Share on other sites

MangoMC

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

bakes82

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

MangoMC

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

bakes82

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

MangoMC

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

bakes82
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 :P  There less pixels its like 3.xK
image.png.2d1d5349e96e2c18c05112d854544c33.png

Link to comment
Share on other sites

bakes82

@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.

image.thumb.png.cf922c4a94617135d202d979eecea952.png

@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

bakes82

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

MangoMC

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.

 

 

photo_2020-11-25_07-46-42.jpg

Link to comment
Share on other sites

bakes82

@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 :P

Edited by bakes82
Link to comment
Share on other sites

MangoMC

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

MangoMC

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

bakes82
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 by bakes82
Link to comment
Share on other sites

MangoMC

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

bakes82

@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

MangoMC

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

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