audiobookshelf icon indicating copy to clipboard operation
audiobookshelf copied to clipboard

[Enhancement]: Keep transcodes until book is finished

Open DieselTech opened this issue 3 years ago • 2 comments

Describe the feature/enhancement

Whenever the player that requested the transcode stops playing, the file is removed. When the next time the file is requested the server has to transcode it again. Each time it starts the transcode there is a wait time until enough has been buffered to start up.

Not only does the waste resources doing it each time, but it makes the user wait. I think either keeping the transcode until the book is marked as complete or making it a setting that can be toggled on by the server owner.

DieselTech avatar Jun 22 '22 18:06 DieselTech

Completely agree, we need a better strategy for persisting transcodes that will require updating the data model.

Right now if you have 2 users listening to the same book that needs to be transcoded then they will each transcode the same book. The reason it is not as easy as just having the user use the existing transcode is because if your progress on that book is 50% then you will only transcode half of the audiobook. There are many edge cases with that like checking if it is currently being transcoded, but we could start with just requiring each user to have their own transcode.

I would be interested in finding out how other media servers are persisting transcodes first. How they are handling transcodes for multi-user, how long they are persisting transcodes if at all, and if they have a limit on the number of transcodes persisting or some settings.

advplyr avatar Jun 22 '22 22:06 advplyr

having the user use the existing transcode

I agree. If a transcode is even needed, it's likely for a particular reason like codec support. I don't think sharing transcodes is the way to go because that is just assuming the device can just play the file. The better solution is to have the transcode be per user.

DieselTech avatar Jun 22 '22 23:06 DieselTech