Support hour-long uploads and videos: raise body limit, stream uploads to disk, cache up to 3 h, add deferred-ideas note
This commit is contained in:
@@ -1105,7 +1105,7 @@ const media = createMediaCache({
|
||||
ffprobe: process.env.FFPROBE_PATH || 'ffprobe',
|
||||
maxBytes: envNum('MEDIA_CACHE_MAX_BYTES', 10 * 1024 ** 3),
|
||||
minFreeBytes: envNum('MEDIA_MIN_FREE_BYTES', 5 * 1024 ** 3),
|
||||
autoMaxSeconds: envNum('MEDIA_AUTO_MAX_SECONDS', 3600),
|
||||
autoMaxSeconds: envNum('MEDIA_AUTO_MAX_SECONDS', 3 * 3600),
|
||||
saveMaxSeconds: MAX_SAVE_SECONDS,
|
||||
transcode: {
|
||||
enabled: process.env.MEDIA_TRANSCODE !== '0',
|
||||
@@ -2156,6 +2156,10 @@ async function main() {
|
||||
// 0 disables the idle timeout entirely (verified with a 300s request);
|
||||
// runaway downloads are bounded by MAX_SAVE_SECONDS + kill-on-disconnect.
|
||||
idleTimeout: 0,
|
||||
// Bun's default request-body cap is 128 MB, which silently rejected every
|
||||
// upload / device intake of a long video with a 413. Streaming routes
|
||||
// enforce their own per-route limits (uploads 4 GB, intake P2P_INTAKE_MAX_BYTES).
|
||||
maxRequestBodySize: 5 * 1024 ** 3,
|
||||
});
|
||||
|
||||
console.log(`[ytplayer] Listening → http://localhost:${PORT}`);
|
||||
|
||||
Reference in New Issue
Block a user