vpstream 0.2.0__tar.gz → 0.2.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. {vpstream-0.2.0 → vpstream-0.2.1}/CHANGELOG.md +8 -0
  2. {vpstream-0.2.0 → vpstream-0.2.1}/PKG-INFO +5 -3
  3. {vpstream-0.2.0 → vpstream-0.2.1}/README.md +4 -2
  4. {vpstream-0.2.0 → vpstream-0.2.1}/pyproject.toml +1 -1
  5. {vpstream-0.2.0 → vpstream-0.2.1}/src/vpstream/ffmpeg_install.py +13 -3
  6. {vpstream-0.2.0 → vpstream-0.2.1}/src/vpstream/tests/test_ffmpeg_install.py +14 -1
  7. {vpstream-0.2.0 → vpstream-0.2.1}/.gitignore +0 -0
  8. {vpstream-0.2.0 → vpstream-0.2.1}/LICENSE +0 -0
  9. {vpstream-0.2.0 → vpstream-0.2.1}/src/vpstream/__init__.py +0 -0
  10. {vpstream-0.2.0 → vpstream-0.2.1}/src/vpstream/__main__.py +0 -0
  11. {vpstream-0.2.0 → vpstream-0.2.1}/src/vpstream/assets/__init__.py +0 -0
  12. {vpstream-0.2.0 → vpstream-0.2.1}/src/vpstream/assets/caps.html +0 -0
  13. {vpstream-0.2.0 → vpstream-0.2.1}/src/vpstream/assets/caps.js +0 -0
  14. {vpstream-0.2.0 → vpstream-0.2.1}/src/vpstream/assets/hls.js.LICENSE +0 -0
  15. {vpstream-0.2.0 → vpstream-0.2.1}/src/vpstream/assets/hls.js.version +0 -0
  16. {vpstream-0.2.0 → vpstream-0.2.1}/src/vpstream/assets/hls.min.js +0 -0
  17. {vpstream-0.2.0 → vpstream-0.2.1}/src/vpstream/bench.py +0 -0
  18. {vpstream-0.2.0 → vpstream-0.2.1}/src/vpstream/caps/__init__.py +0 -0
  19. {vpstream-0.2.0 → vpstream-0.2.1}/src/vpstream/caps/clips.py +0 -0
  20. {vpstream-0.2.0 → vpstream-0.2.1}/src/vpstream/caps/server.py +0 -0
  21. {vpstream-0.2.0 → vpstream-0.2.1}/src/vpstream/cli.py +0 -0
  22. {vpstream-0.2.0 → vpstream-0.2.1}/src/vpstream/ffargs.py +0 -0
  23. {vpstream-0.2.0 → vpstream-0.2.1}/src/vpstream/probe.py +0 -0
  24. {vpstream-0.2.0 → vpstream-0.2.1}/src/vpstream/selftest.py +0 -0
  25. {vpstream-0.2.0 → vpstream-0.2.1}/src/vpstream/subtitles.py +0 -0
  26. {vpstream-0.2.0 → vpstream-0.2.1}/src/vpstream/tests/__init__.py +0 -0
  27. {vpstream-0.2.0 → vpstream-0.2.1}/src/vpstream/tests/conftest.py +0 -0
  28. {vpstream-0.2.0 → vpstream-0.2.1}/src/vpstream/tests/data/three-cues.sup +0 -0
  29. {vpstream-0.2.0 → vpstream-0.2.1}/src/vpstream/tests/fakes.py +0 -0
  30. {vpstream-0.2.0 → vpstream-0.2.1}/src/vpstream/tests/test_assets.py +0 -0
  31. {vpstream-0.2.0 → vpstream-0.2.1}/src/vpstream/tests/test_bench.py +0 -0
  32. {vpstream-0.2.0 → vpstream-0.2.1}/src/vpstream/tests/test_caps.py +0 -0
  33. {vpstream-0.2.0 → vpstream-0.2.1}/src/vpstream/tests/test_cli.py +0 -0
  34. {vpstream-0.2.0 → vpstream-0.2.1}/src/vpstream/tests/test_ffargs.py +0 -0
  35. {vpstream-0.2.0 → vpstream-0.2.1}/src/vpstream/tests/test_integration.py +0 -0
  36. {vpstream-0.2.0 → vpstream-0.2.1}/src/vpstream/tests/test_probe.py +0 -0
  37. {vpstream-0.2.0 → vpstream-0.2.1}/src/vpstream/tests/test_subtitles.py +0 -0
  38. {vpstream-0.2.0 → vpstream-0.2.1}/src/vpstream/tools.py +0 -0
@@ -2,6 +2,14 @@
2
2
 
3
3
  <!-- version list -->
4
4
 
5
+ ## v0.2.1 (2026-11-10)
6
+
7
+ ### Bug Fixes
8
+
9
+ - Install fallback fonts for burned-in subtitles ([#4](https://github.com/skj-skj/vpstream/pull/4),
10
+ [`edc367d`](https://github.com/skj-skj/vpstream/commit/edc367d79ac70e990145162921282a691d33cabd))
11
+
12
+
5
13
  ## v0.2.0 (2026-11-09)
6
14
 
7
15
  ### Features
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: vpstream
3
- Version: 0.2.0
3
+ Version: 0.2.1
4
4
  Summary: On-demand video streaming from a VPS, controlled over SSH or a private dashboard
5
5
  License-Expression: MIT
6
6
  License-File: LICENSE
@@ -62,8 +62,10 @@ build when there is one, including a new major version.
62
62
  is run and must have libx264, libx265, an AV1 encoder and the zscale, tonemap, subtitles,
63
63
  overlay and scale2ref filters. If anything fails, nothing on the system is changed.
64
64
  - **Libraries:** the builds need glibc 2.28 or newer (Ubuntu 20.04 and later) on x86-64 or
65
- ARM64. On apt systems, the packages they use (`libgcc-s1`, `fontconfig`, `fonts-dejavu-core`)
66
- are installed when missing.
65
+ ARM64. On apt systems, the packages they use are installed when missing: `libgcc-s1`,
66
+ `fontconfig`, and the fonts burned-in subtitles fall back to (`fonts-dejavu-core`,
67
+ `fonts-liberation`, and `fonts-noto-cjk` for Chinese, Japanese and Korean, about 90 MB).
68
+ Running `vpstream install ffmpeg` again adds any that are missing.
67
69
  - **An existing ffmpeg:** you are asked first, `This will uninstall the existing ffmpeg (...).
68
70
  Do you want to proceed? [y/N]`; the question lists every package apt would remove with it.
69
71
  An apt or snap ffmpeg is removed after the new one is in place. An ffmpeg from elsewhere is
@@ -43,8 +43,10 @@ build when there is one, including a new major version.
43
43
  is run and must have libx264, libx265, an AV1 encoder and the zscale, tonemap, subtitles,
44
44
  overlay and scale2ref filters. If anything fails, nothing on the system is changed.
45
45
  - **Libraries:** the builds need glibc 2.28 or newer (Ubuntu 20.04 and later) on x86-64 or
46
- ARM64. On apt systems, the packages they use (`libgcc-s1`, `fontconfig`, `fonts-dejavu-core`)
47
- are installed when missing.
46
+ ARM64. On apt systems, the packages they use are installed when missing: `libgcc-s1`,
47
+ `fontconfig`, and the fonts burned-in subtitles fall back to (`fonts-dejavu-core`,
48
+ `fonts-liberation`, and `fonts-noto-cjk` for Chinese, Japanese and Korean, about 90 MB).
49
+ Running `vpstream install ffmpeg` again adds any that are missing.
48
50
  - **An existing ffmpeg:** you are asked first, `This will uninstall the existing ffmpeg (...).
49
51
  Do you want to proceed? [y/N]`; the question lists every package apt would remove with it.
50
52
  An apt or snap ffmpeg is removed after the new one is in place. An ffmpeg from elsewhere is
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "vpstream"
7
- version = "0.2.0"
7
+ version = "0.2.1"
8
8
  description = "On-demand video streaming from a VPS, controlled over SSH or a private dashboard"
9
9
  readme = "README.md"
10
10
  license = "MIT"
@@ -36,8 +36,16 @@ MARKER = "vpstream-build.json"
36
36
  ARCHES = {"x86_64": "linux64", "amd64": "linux64", "aarch64": "linuxarm64", "arm64": "linuxarm64"}
37
37
  # The builds link the C library dynamically.
38
38
  MIN_GLIBC = (2, 28)
39
- # libgcc_s is the other library they link; libass reads /etc/fonts and needs a font.
40
- APT_PACKAGES = ("libgcc-s1", "fontconfig", "fonts-dejavu-core")
39
+ # libgcc_s is the other library they link; libass reads /etc/fonts and needs fonts. Burned-in
40
+ # subtitles fall back to these when a file does not carry its font: Liberation stands in for
41
+ # Arial and Times New Roman, Noto CJK draws Chinese, Japanese and Korean.
42
+ APT_PACKAGES = (
43
+ "libgcc-s1",
44
+ "fontconfig",
45
+ "fonts-dejavu-core",
46
+ "fonts-liberation",
47
+ "fonts-noto-cjk",
48
+ )
41
49
  # What bench, caps and prepare use; each tuple needs one of its names.
42
50
  REQUIRED_ENCODERS = (("libx264",), ("libx265",), ("libsvtav1", "libaom-av1"))
43
51
  REQUIRED_FILTERS = ("overlay", "scale2ref", "subtitles", "tonemap", "zscale")
@@ -320,6 +328,7 @@ class Setup:
320
328
  existing = find_existing(self.runner, self.layout)
321
329
  ours = [e for e in existing if e.owner == "vpstream"]
322
330
  if ours and not update:
331
+ self._install_packages()
323
332
  version = f"{ours[0].version} " if ours[0].version else ""
324
333
  return (
325
334
  f"ffmpeg {version}is already installed by vpstream. "
@@ -337,6 +346,7 @@ class Setup:
337
346
  build = latest_build(self.http.get_json(RELEASES_API), arch)
338
347
  current = version_key(ours[0].version) if ours else None
339
348
  if current and current >= build.key:
349
+ self._install_packages()
340
350
  return f"ffmpeg {ours[0].version} is already the newest stable build"
341
351
 
342
352
  removals = self._removals(existing)
@@ -392,7 +402,7 @@ class Setup:
392
402
  self.progress(f"installing {', '.join(missing)}")
393
403
  self._system(
394
404
  *APT_GET, "install", "-y", "--no-install-recommends", *missing,
395
- what="installing the libraries ffmpeg needs",
405
+ what="installing the libraries and fonts ffmpeg needs",
396
406
  ) # fmt: skip
397
407
 
398
408
  def _check_space(self, build: Build, tmp: Path) -> None:
@@ -293,6 +293,8 @@ def test_missing_libraries_are_installed_with_apt(tmp_path: Path) -> None:
293
293
  "--no-install-recommends",
294
294
  "fontconfig",
295
295
  "fonts-dejavu-core",
296
+ "fonts-liberation",
297
+ "fonts-noto-cjk",
296
298
  ]
297
299
  ]
298
300
  # Every system change goes through sudo.
@@ -300,6 +302,17 @@ def test_missing_libraries_are_installed_with_apt(tmp_path: Path) -> None:
300
302
  assert changes and all(c[0] == "sudo" for c in changes)
301
303
 
302
304
 
305
+ def test_running_again_adds_packages_that_are_missing(env: Env) -> None:
306
+ env.run()
307
+ env.runner.tools |= {"apt-get", "dpkg-query"}
308
+ for pkg in fi.APT_PACKAGES[:-1]:
309
+ env.runner.on("dpkg-query", "-W", "-f=${Status}", pkg, stdout="install ok installed")
310
+ assert "already installed by vpstream" in env.run()
311
+ assert env.run(update=True).endswith("is already the newest stable build")
312
+ installs = [c for c in env.system_calls("apt-get") if "install" in c]
313
+ assert len(installs) == 2 and all(c[-1] == fi.APT_PACKAGES[-1] for c in installs)
314
+
315
+
303
316
  def test_without_sudo_a_normal_user_is_refused(env: Env) -> None:
304
317
  with pytest.raises(fi.SetupError, match="needs root"):
305
318
  env.run(is_root=False)
@@ -417,7 +430,7 @@ def test_a_build_this_system_cannot_run_changes_nothing(env: Env) -> None:
417
430
  def test_a_failed_system_step_is_reported(env: Env) -> None:
418
431
  env.runner.tools |= {"apt-get", "dpkg-query"}
419
432
  env.runner.on("apt-get", "install", returncode=100, stdout="E: Unable to locate package")
420
- with pytest.raises(fi.SetupError, match=r"libraries ffmpeg needs.*Unable to locate"):
433
+ with pytest.raises(fi.SetupError, match=r"libraries and fonts ffmpeg needs.*Unable to locate"):
421
434
  env.run()
422
435
 
423
436
 
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes