diff options
| author | Christophe Besson <cbesson@gmail.com> | 2026-09-17 10:12:31 +0200 |
|---|---|---|
| committer | Christophe Besson <cbesson@gmail.com> | 2026-09-17 10:12:31 +0200 |
| commit | a98445ce246509b0d2600df14907f72b448a6d10 (patch) | |
| tree | 023e1c09d8fa42f67f5da8ff32a22f271359d843 /packages/meshbay-node/tests/test_stream_audio_transcode.py | |
| parent | f4fd6db8faa15bf02f38a14b652cc46936f8d6bf (diff) | |
| download | meshbay-a98445ce246509b0d2600df14907f72b448a6d10.tar.gz | |
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 <noreply@anthropic.com>
Diffstat (limited to 'packages/meshbay-node/tests/test_stream_audio_transcode.py')
| -rw-r--r-- | packages/meshbay-node/tests/test_stream_audio_transcode.py | 27 |
1 files changed, 14 insertions, 13 deletions
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" |