2023-09-30, 08:21 AM
I would love to do it. The only thing holding me back is that the time to get familiar with the inner workings of Jellyfin (just to find out where the parts are that serve up the media files) would probably take a lot longer than it would take adding that feature. I really don't have much spare time (working on several other projects). So if someone could point me towards the proper source code, that would save me a lot of time.
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.
Like I said, everything needed to do something like this is already there. When a request is made to play a movie, the server already iterates through all available versions, it already retrieves the information about codecs needed, resolution of the video, internal URLs, etc. Again, of every version. Then it picks the default file (the first in its internal sorted list), checks if it needs transcoding, then starts serving that video (with out without transcoding). Looking at the communication between the client and the server, I think that's a pretty accurate depiction of what is happening behind the scenes.
Now in my opinion, all you have to do is move the transcoding check to within the loop, and just keep track of which versions need transcoding or not. And instead of serving the first file of the list, serve the one that doesn't need transcoding. And if there's more than one version that doesn't need transcoding, pick the one with the highest resolution.
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)
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.
Quote:I would also say that it's a terrible idea, in general, to make assumptions about what's involved in adding any feature to any code base--jellyfin or otherwise--with which you are not familiar. Such assumptions are rarely accurate.
Like I said, everything needed to do something like this is already there. When a request is made to play a movie, the server already iterates through all available versions, it already retrieves the information about codecs needed, resolution of the video, internal URLs, etc. Again, of every version. Then it picks the default file (the first in its internal sorted list), checks if it needs transcoding, then starts serving that video (with out without transcoding). Looking at the communication between the client and the server, I think that's a pretty accurate depiction of what is happening behind the scenes.
Now in my opinion, all you have to do is move the transcoding check to within the loop, and just keep track of which versions need transcoding or not. And instead of serving the first file of the list, serve the one that doesn't need transcoding. And if there's more than one version that doesn't need transcoding, pick the one with the highest resolution.
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)