Jump to content

Transcoding Information


Recommended Posts

Anthony Musgrove
Posted

Hi all - could someone please shed some light on this issue.  I swear I had some data in TranscodeInformation at one stage.

 

this is on _sessionManager_PlaybackProgress

 

e.Session.Playstate.PlayMethod is definitely MediaBrowser.Model.Session.PlayMethod.Transcode

 

The emby log shows that it is definitely transcoding,

 

however e.Session.TranscodingInfo is null.

 

In the emby log, it shows that the TranscodeReason is Unsupported Container.  I don't understand why TranscodingInfo is null when it is definitely transcoding, and definitely PlayMethod.Transcode.

 

@@chef

 

Thank you guys.

 

Anthony

Anthony Musgrove
Posted

EG:

 

2020-05-17 23:58:15.570 Info Emby ScripterX: TRANSCODING INFORMATION IS NULL?????
2020-05-17 23:58:15.616 Info HttpServer: HTTP Response 200 to 192.168.1.124. Time: 329ms. http://192.168.1.50:8096/emby/videos/12081/hls1/main/7.ts?DeviceId=02257e33-d04a-4a2a-a4d9-e724ecda9e2e&MediaSourceId=0ba6b6aaee48b80ffde1dc347a6300c8&PlaySessionId=43bd0dbd1cfa47058b02100e977a5d2a&VideoCodec=h264&AudioCodec=mp3,aac&VideoBitrate=139871375&AudioBitrate=128625&AudioStreamIndex=1&TranscodingMaxAudioChannels=2&SegmentContainer=ts&MinSegments=1&BreakOnNonKeyFrames=True&ManifestSubtitles=vtt&h264-profile=high,main,baseline,constrainedbaseline,high10&h264-level=52&TranscodeReasons=ContainerNotSupported
2020-05-17 23:58:16.571 Info Emby ScripterX: FOUND SESSION AND IS NOT NULL, LETS SEE IF ITS TRANSCODE INFO IS NULL ...
2020-05-17 23:58:16.571 Info Emby ScripterX: NOPE :( TRANSCODING INFO DOESNT EXIST ...
2020-05-17 23:58:16.571 Info Emby ScripterX: IS TRANSCODING ......
2020-05-17 23:58:16.571 Info Emby ScripterX: TRANSCODING INFORMATION IS NULL?????

Anthony Musgrove
Posted

And code snippets ...

            SessionInfo test_session = this._sessionManager.GetSession(e.Session.DeviceId, e.Session.Client, e.Session.ApplicationVersion);

            if(test_session != null)
            {
                Plugin._iLogger.Info("FOUND SESSION AND IS NOT NULL, LETS SEE IF ITS TRANSCODE INFO IS NULL ...");

                if(test_session.TranscodingInfo != null)
                {
                    Plugin._iLogger.Info("TRANSCODING INFO EXISTS!!!!!!!!!!! ...");
                }
                else
                {
                    Plugin._iLogger.Info("NOPE  TRANSCODING INFO DOESNT EXIST ...");
                }
            }


            if(e.Session.PlayState != null)
            {
                if(e.Session.PlayState.PlayMethod == MediaBrowser.Model.Session.PlayMethod.Transcode)
                {
                    //lets find where transcoding information is..
                    TranscodingInfo tInfo = e.Session.TranscodingInfo;

                    Plugin._iLogger.Info("IS TRANSCODING ......");

                    if(tInfo != null)
                    {
                        Plugin._iLogger.Info("AND TRANSCODE INFO IS NOT NULL ......");
                    }

                }
            }

Anthony Musgrove
Posted

Sorry chef I'm not sure why it tagged you :)

Posted

That was me.

  • Like 1
Anthony Musgrove
Posted

No problems thank you mate :)

TeamB
Posted

is "Unsupported Container" (a remux) really trans-coding though, I dont think Emby considers this trans-coding, it is direct play as far as Emby is considered I think.

  • Like 1
Anthony Musgrove
Posted

The admin interface shows its transcoding too mate, I just wanted to make sure I wasnt going crazy. Ill have to test with other formats :)

Posted (edited)

It isn't instantly set the transcodingInfo. If you are reading the session info it will be blank for transcodingInfo initially right after you start. After the first 10 seconds or so it will populate. You need to allow for this. TranscodingInfo will not be sent when the transcoding progress is complete at 100%. This will be seen in the session info when complete since transcoding info within the session info is not available.

Edited by speechles
  • Like 1
Posted (edited)

is "Unsupported Container" (a remux) really trans-coding though, I dont think Emby considers this trans-coding, it is direct play as far as Emby is considered I think.

 

Anything that has "transcoding reason" is transcoding. Call it Remux/DirectStream/Transcode but all forms of those require ffmpeg and produce TranscodingInfo inside the Session. It is not considered DirectPlay. Check the dashboard/stats-for-nerds and see. ;)

Edited by speechles
  • Like 1
Anthony Musgrove
Posted (edited)

It isn't instantly set the transcodingInfo. If you are reading the session info it will be blank for transcodingInfo initially right after you start. After the first 10 seconds or so it will populate. You need to allow for this. TranscodingInfo will not be sent when the transcoding progress is complete at 100%. This will be seen in the session info when complete since transcoding info within the session info is not available.

Yep, I totally agree with that, and I do accommodate for it, thats why I chose this event type, and I let the media play for 5-10 minutes and basically blast the emby log with a check for if its null, and even after 5 minutes its null :)

 

Edit: but for the entire 5 minutes, the emby dashboard shows the media is transcoding :)

Edited by Anthony.Musgrove
Anthony Musgrove
Posted (edited)

So for now, I get %is.transcoding% from PlayState.PlayMethod, and if transcodeinfo is null, it won't populate the rest of the %transcode.* tokens.. until I resolve this one :)

 

5ec218e47be63_transcoding_.png

 

and thus yields;

 

Anthony is transcoding item [iD: 12081] [Name: "The Big Bang Theory 2020_04_22_23_04_00"] on device [iD: 94a60dfb-c097-44be-879d-5e76463c5575] [Name: "Chrome"] (Avg CPU=%transcoding.avgcpu.usage%) 

Edited by Anthony.Musgrove
Anthony Musgrove
Posted

And I just realised this is only occuring when playing Recorded TV shows.   When I play other files that aren't recorded, the transcoding information exists :)

 

Anthony 94a60dfb-c097-44be-879d-5e76463c5575 "Chrome" 591 "A Hero Sits Next Door" , h264, Automatic software decoder, 640

 

Its only when its transcoding recorded tv shows/media.

Anthony Musgrove
Posted
Posted

What is the container the recorded show is in?

spaceman07
Posted

Thanks for that.. I will try it out.. is there a way to capture all the params to see what the capture is? Otherwise will have to manually type them all in

spaceman07
Posted

Hello

 

Following two is not working for me -

"%transcoding.width%" "%transcoding.reasons%"

 

Have i missed something? and also noticed when its false for transcoding logging is constant continues sending info to the script.

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