feat(hls): carry a held media playlist over --remote and export, inflate gzip segments, add own_stream_only mux opt-in

This commit is contained in:
imSp4rky
2026-12-02 11:12:02 -07:00
parent ccdd14c845
commit 9842a61d3f
27 changed files with 404 additions and 62 deletions
+17
View File
@@ -286,6 +286,23 @@ def test_mp4_names_skip_the_extra_tracks_of_a_3d_video_file(tmp_path: Path, mp4b
assert command[command.index("-name") + 1] == "3=English"
def test_an_mp4_mux_adds_only_the_own_stream_of_each_file(tmp_path: Path, mp4box_commands: list[list[str]]) -> None:
video = stereo_video(tmp_path, stereo=False)
video.data["own_stream_only"] = True
video.path.write_bytes(box(b"moov", box(b"trak") + box(b"trak")))
audio = Audio(url="https://x/a.mp4", language="en", codec=Audio.Codec.EC3, name="English")
audio.path = tmp_path / "a.mp4"
audio.path.write_bytes(b"\x00" * 16)
audio.data["own_stream_only"] = True
source = video.path
Tracks([video, audio])._mux_mp4(title="Film", output_path=tmp_path / "out.mkv")
command = mp4box_commands[0]
adds = [command[i + 1] for i, arg in enumerate(command) if arg == "-add"]
assert adds[0].startswith(f"{source}#video:")
assert "#audio:" in adds[1]
assert command[command.index("-name") + 1] == "2=English"
def test_a_3d_mux_that_loses_its_second_view_warns(
tmp_path: Path, mp4box_commands: list[list[str]], caplog: pytest.LogCaptureFixture
) -> None: