From a98445ce246509b0d2600df14907f72b448a6d10 Mon Sep 17 00:00:00 2001 From: Christophe Besson Date: Thu, 17 Sep 2026 10:12:31 +0200 Subject: feat: let the viewer pick the audio track The streaming path mapped 0:a:0 unconditionally, so a dubbed film played in whichever language was muxed first and the others were unreachable. The node now enumerates the tracks in stream_init and honours audio_track in stream_req; switching is the seek path, since one ffmpeg carries one track. MNP 3.2, additive: the player draws its selector from the node's own list and never from a version number, so an older node is never asked for a track it would ignore. MNP_MIN_SUPPORTED does not move. Co-Authored-By: Claude Opus 5 --- .../tests/test_stream_audio_transcode.py | 27 +++++++++++----------- 1 file changed, 14 insertions(+), 13 deletions(-) (limited to 'packages/meshbay-node/tests/test_stream_audio_transcode.py') diff --git a/packages/meshbay-node/tests/test_stream_audio_transcode.py b/packages/meshbay-node/tests/test_stream_audio_transcode.py index 959cc91..92518ba 100644 --- a/packages/meshbay-node/tests/test_stream_audio_transcode.py +++ b/packages/meshbay-node/tests/test_stream_audio_transcode.py @@ -150,15 +150,15 @@ async def test_probe_video_reports_aac_regardless_of_source_audio_codec(tmp_path clip = tmp_path / "clip.mkv" _make_clip(clip, acodec="eac3", channels=6) - codec, duration, has_audio, width, height, raw_codec = await _probe_video(str(clip)) + probe = await _probe_video(str(clip)) - assert has_audio is True - assert duration > 0 - assert codec is not None - assert "eac3" not in codec and "ec-3" not in codec - assert "mp4a.40.2" in codec - assert (width, height) == (320, 240) - assert raw_codec == "h264" + assert probe.has_audio is True + assert probe.duration > 0 + assert probe.codec is not None + assert "eac3" not in probe.codec and "ec-3" not in probe.codec + assert "mp4a.40.2" in probe.codec + assert (probe.width, probe.height) == (320, 240) + assert probe.raw_codec_name == "h264" async def test_probe_video_handles_no_audio_track(tmp_path): @@ -170,10 +170,11 @@ async def test_probe_video_handles_no_audio_track(tmp_path): check=True, capture_output=True, ) - codec, duration, has_audio, width, height, raw_codec = await _probe_video(str(clip)) + probe = await _probe_video(str(clip)) - assert has_audio is False - assert codec is not None and "," not in codec, \ + assert probe.has_audio is False + assert probe.audio_tracks == [] + assert probe.codec is not None and "," not in probe.codec, \ "no audio track must not produce a dangling ',' or a fake audio codec" - assert (width, height) == (320, 240) - assert raw_codec == "h264" + assert (probe.width, probe.height) == (320, 240) + assert probe.raw_codec_name == "h264" -- cgit v1.2.3