feat(video): raise video-path size limit to 1.5 GiB (#145)
The 100 MB cap that re-routed larger videos to the file-upload pipeline was a workaround for the width/height=0 → 已过期 bug (fixed in the prior commit), not a real QQ size limit. Real-machine verified on tempserver: 88 MB / 149 MB / 299 MB / 497 MB videos all upload, render and play as normal videos in a group. Raise MAX_VIDEO_SIZE to 1.5 GiB (matching the file-upload ceiling); only videos above that still fall back to the file path. Collapse the redundant MAX_VIDEO_SIZE_HARD (was also 1.5 GiB) into the single constant and drop the now-dead 100 MB warn branches. Note: the whole video is buffered in RAM for the Highway upload, so a 1.5 GiB send costs ~1.5 GiB+ of process memory — that, not a QQ limit, is what bounds the ceiling.
This commit is contained in:
3 files changed
+27
-24
No files matched your search
@@ -620,11 +620,12 @@ export async function sendPrivateMessage(
|
||||
let allFileElements = elements.filter(e => e.type === 'file');
|
||||
let nonFileElements = elements.filter(e => e.type !== 'file');
|
||||
|
||||
// [#145] A video above QQ's ~100 MB video-resource cap (MAX_VIDEO_SIZE)
|
||||
// uploads "successfully" but renders as 视频已过期 on the receiver — the
|
||||
// server accepts the bytes yet never produces a valid video resource. The
|
||||
// on-error fallback below can't catch it (the oversized upload doesn't
|
||||
// throw), so route known-oversized videos to the file path up front.
|
||||
// [#145] Videos up to MAX_VIDEO_SIZE (1.5 GiB) send as real videos; only
|
||||
// above that do we route to the file pipeline (the whole video is buffered
|
||||
// in RAM for the Highway upload, so this bounds memory). The earlier
|
||||
// 100 MB cap was a workaround for the width/height=0 → 已过期 bug (now
|
||||
// fixed) and has been lifted. Route known-oversized videos up front —
|
||||
// the on-error fallback below can't catch them (the upload doesn't throw).
|
||||
{
|
||||
const pre = splitVideoFileFallback(nonFileElements, false);
|
||||
if (pre.fileEls.length > 0) {
|
||||
@@ -723,8 +724,8 @@ export async function sendGroupMessage(
|
||||
let allFileElements = elements.filter(e => e.type === 'file');
|
||||
let nonFileElements = elements.filter(e => e.type !== 'file');
|
||||
|
||||
// [#145] Route known-oversized videos (> MAX_VIDEO_SIZE) to the file path
|
||||
// up front — they upload as a video without error but render expired.
|
||||
// [#145] Route videos above MAX_VIDEO_SIZE (1.5 GiB) to the file path up
|
||||
// front; everything at or below sends as a real video (see sendPrivate).
|
||||
{
|
||||
const pre = splitVideoFileFallback(nonFileElements, false);
|
||||
if (pre.fileEls.length > 0) {
|
||||
|
||||
Reference in new issue
Block a user