Jellyfin Forum
Have Jellyfin automatically play supported version of a movie - Printable Version

+- Jellyfin Forum (https://forum.jellyfin.org)
+-- Forum: Support (https://forum.jellyfin.org/f-support)
+--- Forum: Troubleshooting (https://forum.jellyfin.org/f-troubleshooting)
+--- Thread: Have Jellyfin automatically play supported version of a movie (/t-have-jellyfin-automatically-play-supported-version-of-a-movie)

Pages: 1 2


RE: Have Jellyfin automatically play supported version of a movie - skribe - 2023-09-30

Quote: I disagree that there isn't much interest for such a feature. A quick search on the internet results in a buttload of posts on several sites/forums where people are asking about just that.

So, just to clarify, I don't mean that there is a lack of interest among a group of users in having this feature. There definitely is. What I meant by "a lack of interest relative to the intended purpose" is that I think there is a lack of interest among current active contributors in developing this feature in the context of their vision of what the server needs most. And that's OK. Again, I do not believe this feature would be out of scope for Jellyfin. I can't speak for the project team beyond just being familiar with general discussion, but I really don't see this being a feature that would be rejected if a group of contributors submitted a well-developed PR. If you (or anyone else) want to embark on that process, just head to the meta repository and bring it up for discussion (https://github.com/jellyfin/jellyfin-meta/discussions).

Quote: Again, I don't think it's all that difficult. But I won't know for sure until I have had a look at the source code (which I would love to do if I would know where to look for this source code)

Yeah, this all might be true. I honestly don't know. Venson, above, would have a better idea. He has a lot more familiarity with the server code. But, as you say, the first step would be to poke around yourself and take a look. I was mostly saying that it can be surprising, sometimes, how seemingly simple things work once you actually start poking at them.

Quote: Oh, and I would like to add that more and more people are looking for low cost hardware to run the Jellyfin server on. I use a Raspberry Pi because of the cost of electricity. As mentioned in my first post, in my neck of the woods, running a small laptop would cost me between $40-$80 per month. The Pi only $4-$8. And that laptop would probably be able to only transcode one stream at a time. If you want to transcode multiple streams, then you probably need hardware that has even higher power consumption. And then you are completely missing the goal of such a media server in the first place. Because, let's be honest. Most people use Jellyfin as an alternative to having to have a subscription to multiple streaming services. So if the energy costs of your hardware are higher than the combined costs of those subscriptions, your are missing your goal.

I think that I wouldn't necessarily agree with you that this is even the goal. I don't think, broadly, that Jellyfin aims to be a lower cost alternative to streaming services. I just don't think that's the objective. If you look at the project site, for example, "streaming services" aren't mentioned once. Jellyfin is, in my mind, more about personal control, flexibility, and ownership--even if that comes at a cost premium over commercial streaming. It's certainly true that a large group of users have tried to use it for that purpose, and I think that it's been successful for at least some of them. People's attempts to run Jellyfin on low powered hardware has become common enough, in fact, that, as Venson points out above, we've added warnings to the hardware guide and the documentation that it's not supported or recommended. But, ultimately, I think that it is fine if commercial streaming is cheaper, at the cost of ownership, flexibility, and control. I just don't think that being cheaper than commercial streaming is actually the goal that you think it is.

But, again, I don't think a group of people who wanted to work on this sort of thing would be met with hostility, I just don't think it necessarily matches the aims of the already thinly stretched contributors that we have now. I'm just trying to be helpful and realistic about where I think you should focus your energy here. I'm mostly just parroting the perspectives that I have seen expressed when this sort of thing has come up before.


RE: Have Jellyfin automatically play supported version of a movie - Zippy1970 - 2023-10-01

(2023-09-30, 10:11 AM)Venson Wrote: RPi is just so underpowered that even a single transcode will bring it to its knees.

Which is why I and many others are looking for ways to completely bypass transcoding. Because transcoding is the single thing the RPi cannot handle. For everything else, it's more than adequate. And it's cheap to buy and cheap to use. And the easiest way to bypass transcoding is by storing multiple versions. And jellyfin offers the ability to do just that for exactly that reason.

Quote:To be absolutly clear here: Jellyfin is __not__ here to replace any streaming service. Jellyfin is a __HOME__ media server, not an online streaming replacement.

Ok, I'm not going to be disrespectful and tell you to get of your high horse because I understand why you are saying that. But I suspect you know very well that the majority (if not all) of Jellyfin users use it as a replacement for streaming services. Heck, the Jellyfin documentation only talks about movies/tv series/movie databases/theme song database/fanart etc. It is targeted at people wanting to store just that. If it were targeted at people wanting to store their home movies, it would have a much different feature set. Much different.

Quote:As Skribe already said, you are free to implement a feature that automatically selects the right version into the server and PR it. No one bothered with that yet so it is not there. We (the jellyfin team) are not the only ones working on Jellyfin, everyone can and many people outside the regular contributes do. There is no general red line, what the team implements or dont. Everyone is free to work on everything they like to and if they dont have time or dont feel like it, they will not to anything at all. Jellyfin is a FOSS project after all.

I'm not entirely sure if I hit a nerve there. English is not my native language so I'm not really good at reading between the lines here. But it feels like you think I condemn the fact this feature isn't implemented yet. I don't. I just thought it was curious since it was requested so many times in the past. And the functionality to do it is already in place.

And again, I would love to do it myself but I have never used github. So it would take quite some time to get familiar with it. Probably a lot longer than it would take me to implement the feature. That's why I asked if someone could point me in the right direction where to start. I just want to work on that small feature, and I really don't want to learn the complete inner workings of Jellyfin and/or github first. But if that's what it takes, that's also fine.


RE: Have Jellyfin automatically play supported version of a movie - Zippy1970 - 2023-10-03

I had a few minutes to quickly look at the source code and it's actually the web client who decides which version is played. In fact, AFAICT, it already checks which version supports Direct Play and it should pick that version over a Direct Stream or Transcoded version. So the feature is already there. Why it's not working, I don't know.


RE: Have Jellyfin automatically play supported version of a movie - usrnammit - 2023-10-03

The web client only controls how are the files sorted in the "Version:" dropdown. This sorting behaviour is described here:
https://jellyfin.org/docs/general/server/media/movies/

However this is only relevant if you're starting playback from the Movie details page (where the dropdown is). If you instead start playback from a library view, the version selection is controlled by this:
https://github.com/jellyfin/jellyfin/blob/master/Jellyfin.Api/Helpers/MediaInfoHelper.cs#L337

As far as I can tell the first two DirectPlay/DirectStream checks don't actually do anything and the files seem to just get sorted by bitrate in descending order. For my own purposes I just reversed the order to always get the smaller file by default (and leave the high bitrate one as an "opt-in" that has to be manually selected) which was fairly trivial but a proper smart version selector will be more complicated.


RE: Have Jellyfin automatically play supported version of a movie - Zippy1970 - 2023-10-03

(2023-10-03, 10:32 AM)usrnammit Wrote: As far as I can tell the first two DirectPlay/DirectStream checks don't actually do anything and the files seem to just get sorted by bitrate in descending order.

Actually, it's first sorted by DirectPlay capabilities, then DirectStream and then bitrate (but only if a Max Bitrate has been set). So if there's a DirectPlay media source available, it should be at the top of the list. Only when it can't find a DirectPlay/DirectStream media source (and no Max Bitrate has been set), the list is kept as is.

I'm assuming this list is used to determine which media source should be played when playing from the library. If so, it's bugged. Since (on my end anyway) it always plays the first in the unordered list. Even if that one needs transcoding, and others don't.


RE: Have Jellyfin automatically play supported version of a movie - usrnammit - 2023-10-03

I don't think the SupportsDirectPlay and SupportsDirectStream properties do what you think they do. They are True by default for all media files and overridden only by user permissions to transcode (or lack thereof). I can't find any code indicating that player capabilities are a consideration.

This effectively means what I said - DirectPlay/DirectStream checks don't do anything (because their value will be the same for all media files). I don't think you can claim this is a bug, since version selection based on player capability was never an advertised feature.

Anyway, you wanted to be pointed in the right direction, hopefully this can get you started. Good luck! Smiling-face


RE: Have Jellyfin automatically play supported version of a movie - Zippy1970 - 2023-10-03

(2023-10-03, 02:07 PM)usrnammit Wrote: I don't think the SupportsDirectPlay and SupportsDirectStream properties do what you think they do. They are True by default for all media files and overridden only by user permissions to transcode (or lack thereof). I can't find any code indicating that player capabilities are a consideration.

Aaaaah ok. That actually explains what I saw when I looked at the communication between client and server. I noticed the server always returned true for these properties.

Quote:Anyway, you wanted to be pointed in the right direction, hopefully this can get you started. Good luck! Smiling-face

Thanks!


RE: Have Jellyfin automatically play supported version of a movie - Zippy1970 - 2023-10-04

The thing I don't get is that the server always returns true for both "SupportsDirectPlay" and "SupportsDirectStream". Yet there are several functions both server and client side that "examine" which of the available versions are the most optimal for playback. It favors SupportsDirectPlay over SupportsDirectStream over SupportsTranscoding.

So it iterates through the available sources but will always return the first in the list since SupportsDirectPlay is always true. This seems weird and unintended.