Jump to content

Channels api wiki


Luke

Recommended Posts

Redshirt

Cool. When you drill down to the media itself you use a standard item query like any other library item?

Link to comment
Share on other sites

No, it's all using the custom channels api, but the objects that come back have the same structure you're accustomed to, including the channels themselves. So that will make things like playback, images, marking watched/favorites all function with code you already have.

 

Channels have their own api though because there is no recursive querying, and each channel creates it's own hierarchy.

  • Like 1
Link to comment
Share on other sites

Just a minor note - the new dev build adds channel content downloading features to the core. The downloaded version will show up in the item's media source list. If you've implemented MediaSources, then there shouldn't be any additional work required. (there was none required in the web client).

 

Those using the StreamBuilder library will get this for free too.

Link to comment
Share on other sites

When delivering the media information via the old API properties will the system put the downloaded version of the information in these standard fields?

Link to comment
Share on other sites

Also, I just saw this:

"Path": "\\\\MEDIASERVER\\Movies\\ImagesByName\\channels\\Trailers"

In my result object for a Channels request.

 

Is that correct?  We are storing channel data in the IBN?  Why isn't that in the data folder...?

Link to comment
Share on other sites

media info, no. i'l look at that.

 

for ibn that's jsut the channels themselves. there's no data or anything related to channel items. it just puts channel images into ibn, by channel name.

Link to comment
Share on other sites

for ibn that's jsut the channels themselves. there's no data or anything related to channel items. it just puts channel images into ibn, by channel name.

 

 

But that's what is delivered as the "Path" of that channel.  Doesn't make sense to me why I'd get a path to the IBN there.

Link to comment
Share on other sites

Does it matter? mbc isn't going to do anything with it right? that's the same kind of path you'd get if you pulled down a movie genre or a person

Link to comment
Share on other sites

Maybe not.  It just seems incorrect.  Genres and People actually do exist in the IBN along with metadata.

 

I just expected channels to exist in the data directory.

Link to comment
Share on other sites

Minor update - instead of sending all data back with every items request, it will use the same Fields property that the normal library requests use.

Link to comment
Share on other sites

  • 1 month later...
chessdragon136

Hi All

 

Just spent an hour implementing channels and all is well with navigation. However, I'm struggling on video playback with HTTP

How do you decide what bitrate, screensize and other video options to use? I don't see the info stored anywhere, just the id and http. And how can i tell if i can direct stream? 

 

Or is it all trial and error?

 

Thanks

Link to comment
Share on other sites

you look at the media source list same as regular video. often times the media info will be bare, in which case there's no direct stream.

 

bitrate and screensize should not be decided based on the media but rather your device requirements and user quality settings. that goes for channels, regular media, live tv, everything.

 

i would look at the roku algorithm. same code no matter what kind of media

https://github.com/MediaBrowser/MediaBrowser.Roku/blob/master/source/VideoMetadata.brs#L110

Link to comment
Share on other sites

chessdragon136

Ok thats good as that's what I'm doing - just need to find a good base point for bitrate... 

And believe it or not I'm happy with my transcode algorithms at the moment - I just need to factor in http protocol as I rely on video and audio indexes in my player

Link to comment
Share on other sites

the videobitrate param needs to be renamed. it's really your max, e.g., whatever the user's quality setting is. you don't need to look at the media bitrate to determine what bitrate to ask for. you only need to look at it to determine direct stream yes or no

Link to comment
Share on other sites

But I would copy the roku algorithm to a T, particularly if you haven't implemented MediaSources yet. If the user has a downloaded version of a channel video, it will show up in the media source list. So assuming you implement the algorithm, it should wind up picking the downloaded version on it's own, based on the video characteristics.

 

If you are still using the (now obsolete) mediaItem.MediaStreams as the basis for your decision making, you will probably wind up not using the local copy.

Link to comment
Share on other sites

chessdragon136

Ahh ok didn't realise that - Is the max bitrate held somewhere against the users proflie then? 

 

Well having a look mine is similar - I do have MediaSources implemented following your guide on how to select the correct versios -

Mine is designed with the view that I need to support multiple tv years which have differing specifications so its not quite a 1 setup suits all.

Link to comment
Share on other sites

no max bitrate should be in your own settings. e.g, user on lan might want 40mbps. or if they're on wifi they might only want 8mbps. or if they're away from home, maybe 1mbps

  • Like 1
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...