pub fn expected_download_bytes(
quality: &str,
runtime_ticks: Option<i64>,
source_size: Option<i64>,
) -> Option<u64>Expand description
The size a download for quality is expected to produce, in bytes.
- A preset re-encodes both streams at fixed rates, so the size is rate ×
runtime. Jellyfin encodes to a target bitrate (
-b:vwith-maxrate), so the average lands near the cap rather than well under it. originalcopies the picture and at most re-encodes the audio, so the output is the source’s size give or take the audio track — and when no transcode is needed at all it is exactly the source’s size.
None when the inputs needed are missing; the caller then has no total and
the bar is indeterminate, which is honest and was the status quo.
TRACES: UR-071 | DR-290 | UT-252