From b6e2dcea65124673da047f9b3c92bc5e25980d63 Mon Sep 17 00:00:00 2001 From: Christophe Besson Date: Sun, 23 Aug 2026 22:43:35 +0200 Subject: fix(node,hub): always transcode video audio to stereo AAC, never copy MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit MSE only decodes AAC/Opus, so copying a source's real audio codec left non-AAC files silently unplayable in-browser (E-AC-3 additionally made ffmpeg itself refuse to write the fragmented MP4 header). Audio is now always transcoded to AAC and downmixed to stereo — multichannel AAC is accepted by ffprobe/VLC but silently rejected by some browsers' MSE decoder once real fragments are appended, which forces the SourceBuffer out of its MediaSource with no explicit error. Video stays copy-only. Also: report a clear client-side error instead of a bare STREAM_END when ffmpeg exits nonzero before producing any output, add video-element/ MediaSource error logging on the client for the next time this class of bug needs diagnosing, and fix a hub test that had grown too broad a scan window after an earlier, unrelated transport.js change. Co-Authored-By: Claude Sonnet 5 Claude-Session: https://claude.ai/code/session_016SF6RKNBKg9qejmoMJ9ybA --- packages/meshbay-hub/tests/test_upload_controls_hidden.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'packages/meshbay-hub/tests') diff --git a/packages/meshbay-hub/tests/test_upload_controls_hidden.py b/packages/meshbay-hub/tests/test_upload_controls_hidden.py index 9290a94..955b47d 100644 --- a/packages/meshbay-hub/tests/test_upload_controls_hidden.py +++ b/packages/meshbay-hub/tests/test_upload_controls_hidden.py @@ -109,8 +109,12 @@ def test_the_notice_still_answers_the_operators_own_request(app): caused it — returning early on it would leave that request hanging until it timed out.""" transport = TRANSPORT.read_text(encoding="utf-8") + # Scoped to member_upload_ack's own handler, not everything up to the next + # occurrence of "index_sync" — other handlers with their own, legitimate + # early `return` (index_progress, set_scan_settings_ack: neither is ever a + # reply anyone awaits) now sit between the two in the file. block = transport[transport.index("member_upload_ack"):] - block = block[:block.index("index_sync")] + block = block[:block.index("apps_enabled_ack")] assert "return" not in block -- cgit v1.2.3