Replies: 1 comment 7 replies
-
|
Sounds good but we should document the minimal duration to keep the data. The 2 main needs are:
Having to redo a decision on seeks would increase the seek delays for end users so if we can avoid it's better. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
As I'm implementing this in Navidrome, I have some questions about the
transcodeParamslifecycle that I think need to be clarified in the spec.Currently the
transcodeParamsdescription says:This leaves three things undefined:
How long is "reasonable"? A client may request a transcode decision when building a playlist/queue and only use the params hours later. Should servers support that? Or is this meant to be short-lived (seconds/minutes)?
What should the server return when
transcodeParamsis expired or invalid? ThegetTranscodeStreamendpoint just says "a standard HTTP error code is returned with a descriptive message." Should this be a specific error code so clients can distinguish "bad params, re-request a decision" from other errors?What should the client do in that case? The expected recovery path is presumably to call
getTranscodeDecisionagain, but this isn't documented.What if the underlying file changes between decision and stream? The media file could be replaced (e.g. upgraded from MP3 to FLAC), or deleted entirely after the decision was made. The
transcodeParamsmay reference a transcoding plan that no longer makes sense for the current file — or a file that no longer exists. Should the server detect this and return an error? Which error?Proposal
Add an optional
validUntilfield to thetranscodeDecisionresponse. This lets the server communicate its expiration policy explicitly. Clients know when to proactively re-request a decision rather than discover it failed at playback time. Servers that don't expire params (e.g. those that encode everything in the params themselves) can simply omit the field. This follows the same pattern we use in other places (e.g.validUntilin playlistentry).Return HTTP 410 Gone when
transcodeParamsis no longer valid (expired, stale due to file changes, etc.). Clients receiving a 410 SHOULD callgetTranscodeDecisionagain and retry.Return HTTP 404 Not Found when the media file no longer exists on the server.
This gives clients a clear, unambiguous recovery path and avoids imposing a fixed duration on servers with different architectures.
Thoughts?
Beta Was this translation helpful? Give feedback.
All reactions