Jump to content

Emby 3.3 and channels change


Recommended Posts

DrCornelius
Posted

Hi!

 

I'm developing a channel for my own personal use and before the last update I was able to populate GetChannelItems without adding MediaSources for the item, I was using GetChannelItemMediaInfo because I don't have any information about the media before calling it. Now I need to add MediaSources (GetChannelItems) for it to work and ends up transcoding even after the callback (GetChannelItemMediaInfo) received the info. Also the play button isn't showing inside the item details, only in the listing.

 

Another thing, is it possible to make the video resumable if I send the duration?

 

Thanx

Posted

Hi, ChannelItemInfo is actually very similar to MediaSourceInfo, except MediaSourceInfo is a bit more raw. The rest of our system uses MediaSourceInfo so I wanted to get the channels framework in line with that.

 

If you would like a compatibility layer to make it similar to how it was before, then you can simply take this class into your plugin:

 

https://github.com/MediaBrowser/TuneIn/blob/master/MediaBrowser.Plugins.TuneIn/ChannelMediaInfo.cs

 

That will allow you to construct a ChannelMediaInfo just like before, and then you can call ToMediaSource() on it.

DrCornelius
Posted

Is it possible to use the information (MediaStreams) sent by the callback (GetChannelItemMediaInfo) instead of the info (MediaSources) from the listing (GetChannelItems) to avoid transcoding?

 

is it possible to make the video resumable if I send the duration and/or size?

 

Thx for the help!

Posted

You have to send back MediaSourceInfo but you can use ChannelMediaInfo to help create that if you like. Start that and see if that gets you playing. And yes, a runtime should allow resume.

DrCornelius
Posted

Before the update I would get most videos played directly or at lest direct streamed, but now it's always transcoding. It seems that the info (MediaStreams) from the callback (GetChannelItemMediaInfo) is only being used to show audios tracks and subtitles, and the info (MediaSources) from the listing (GetChannelItems) to create the ffmpeg call.

 

If I stop the video in the middle, it gets marked as finished/seen and I can't resume it (the last version had the same issue).

Posted

Can you try setting the container to mkv? I thought we were normalizing using matroska that but it's possibly not happening at all levels.

Posted

By the way if you're using the callback for the purpose of running ffprobe, then i would not do that. What it's intended for is situations where you don't have a media url until the time of playback. Like for example, something that requires a temporary authorization.

 

So yes this means it will transcode but I wouldn't harp on that for now. It you set SupportsProbing = true, then in an upcoming update i'm planning on utilizing that at play time to probe for  media info.

DrCornelius
Posted (edited)

I'm using the callback because I do need an authorization and I can't infer any information about the file/URL before that, I have a server proxying the whole process and redirecting to the final URL, that's why is an internal IP.

 

I'm probing the file to avoid transcoding and to get the actually file size, codecs, container, tracks etc.

ffmpeg-transcode-67291619-b1ca-4916-874b-949ae64e9d8e.txt

Edited by DrCornelius
Posted

Ok, I would remove the probe and just wait for me to do the work that I've mentioned. Thanks.

DrCornelius
Posted

OK; I'll wait for you solution then. Thanx!

DrCornelius
Posted

I guess you'll take a look at this too, right? The video isn't resumable.

 

2018-02-27 03:41:09.513 Error SessionManager: Error reporting playback progress
    *** Error Report ***
    Version: 3.3.0.0
    Command line: C:\Users\XXXX\Documents\Projects\Emby\MediaBrowser.ServerApplication\bin\Debug\MediaBrowser.ServerApplication.exe
    Operating system: Microsoft Windows NT 6.2.9200.0
    64-Bit OS: True
    64-Bit Process: True
    User Interactive: True
    Processor count: 8
    Program data path: C:\Users\XXXX\Documents\Projects\Emby\ProgramData-Server
    Application directory: C:\Users\XXXX\Documents\Projects\Emby\MediaBrowser.ServerApplication\bin\Debug
    MediaBrowser.Common.Extensions.ResourceNotFoundException: Session 4a49b47673c9a42ed0da8e143c52bac9 not found.
       at Emby.Server.Implementations.Session.SessionManager.GetSession(String sessionId, Boolean throwOnMissing) in C:\Users\XXXX\Documents\Projects\Emby\Emby.Server.Implementations\Session\SessionManager.cs:line 892
       at Emby.Server.Implementations.Session.SessionManager.<OnPlaybackProgress>d__69.MoveNext() in C:\Users\XXXX\Documents\Projects\Emby\Emby.Server.Implementations\Session\SessionManager.cs:line 661
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at System.Runtime.CompilerServices.ConfiguredTaskAwaitable.ConfiguredTaskAwaiter.GetResult()
       at MediaBrowser.Controller.Session.SessionInfo.<OnProgressTimerCallback>d__96.MoveNext() in C:\Users\XXXX\Documents\Projects\Emby\MediaBrowser.Controller\Session\SessionInfo.cs:line 311
    MediaBrowser.Common.Extensions.ResourceNotFoundException
       at Emby.Server.Implementations.Session.SessionManager.GetSession(String sessionId, Boolean throwOnMissing) in C:\Users\XXXX\Documents\Projects\Emby\Emby.Server.Implementations\Session\SessionManager.cs:line 892
       at Emby.Server.Implementations.Session.SessionManager.<OnPlaybackProgress>d__69.MoveNext() in C:\Users\XXXX\Documents\Projects\Emby\Emby.Server.Implementations\Session\SessionManager.cs:line 661
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at System.Runtime.CompilerServices.ConfiguredTaskAwaitable.ConfiguredTaskAwaiter.GetResult()
       at MediaBrowser.Controller.Session.SessionInfo.<OnProgressTimerCallback>d__96.MoveNext() in C:\Users\XXXX\Documents\Projects\Emby\MediaBrowser.Controller\Session\SessionInfo.cs:line 311

Posted

That doesn't look related to anything.

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