2023-09-29, 08:14 AM
Well, not trying to trivialize the task at hand, but I don't see why - since everything needed is already in place:
- Jellyfin can already detect multiple versions of the same movie
- Jellyfin can already determine video format (encoding, resolution, etc)
- Jellyfin already decides if transcoding is needed or not (based on many different things so it rarely gets it wrong)
And in my opinion, that's all you need. Just iterate through all versions available, use the already existing checks to determine which don't need transcoding, then serve the version with the highest specs/resolution.
Granted, I haven't looked at the source code myself, but in a nutshell that's how to do it with the already existing functionality.
- Jellyfin can already detect multiple versions of the same movie
- Jellyfin can already determine video format (encoding, resolution, etc)
- Jellyfin already decides if transcoding is needed or not (based on many different things so it rarely gets it wrong)
And in my opinion, that's all you need. Just iterate through all versions available, use the already existing checks to determine which don't need transcoding, then serve the version with the highest specs/resolution.
Granted, I haven't looked at the source code myself, but in a nutshell that's how to do it with the already existing functionality.