• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

localstack / localstack / 21765279428

06 Feb 2026 08:43PM UTC coverage: 73.535% (-13.3%) from 86.871%
21765279428

Pull #13716

github

web-flow
Merge 0f5988375 into 20cc1b384
Pull Request #13716: Events: improve Store IAM Statement typing

6 of 6 new or added lines in 1 file covered. (100.0%)

9920 existing lines in 273 files now uncovered.

56187 of 76409 relevant lines covered (73.53%)

0.74 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

70.97
/localstack-core/localstack/packages/ffmpeg.py
1
import os
1✔
2

3
from localstack.packages import Package
1✔
4
from localstack.packages.core import ArchiveDownloadAndExtractInstaller
1✔
5
from localstack.utils.platform import Arch, get_arch
1✔
6

7
# Mapping LocalStack architecture to BtbN's naming convention
8
ARCH_MAPPING = {Arch.amd64: "linux64", Arch.arm64: "linuxarm64"}
1✔
9

10
# Download URL template for ffmpeg 7.1 LGPL builds from BtbN GitHub Releases
11
FFMPEG_BASE_URL = "https://github.com/BtbN/FFmpeg-Builds/releases/download/latest"
1✔
12
FFMPEG_STATIC_BIN_URL = FFMPEG_BASE_URL + "/ffmpeg-n{version}-latest-{arch}-lgpl-{version}.tar.xz"
1✔
13
FFMPEG_STATIC_CHECKSUM_URL = FFMPEG_BASE_URL + "/checksums.sha256"
1✔
14

15

16
class FfmpegPackage(Package["FfmpegPackageInstaller"]):
1✔
17
    def __init__(self) -> None:
1✔
18
        super().__init__(name="ffmpeg", default_version="7.1")
1✔
19

20
    def _get_installer(self, version: str) -> "FfmpegPackageInstaller":
1✔
UNCOV
21
        return FfmpegPackageInstaller(version)
×
22

23
    def get_versions(self) -> list[str]:
1✔
UNCOV
24
        return ["7.1"]
×
25

26

27
class FfmpegPackageInstaller(ArchiveDownloadAndExtractInstaller):
1✔
28
    def __init__(self, version: str):
1✔
UNCOV
29
        super().__init__("ffmpeg", version)
×
30

31
    def _get_download_url(self) -> str:
1✔
UNCOV
32
        return FFMPEG_STATIC_BIN_URL.format(arch=ARCH_MAPPING.get(get_arch()), version=self.version)
×
33

34
    def _get_install_marker_path(self, install_dir: str) -> str:
1✔
UNCOV
35
        return os.path.join(install_dir, self._get_archive_subdir())
×
36

37
    def _get_archive_subdir(self) -> str:
1✔
UNCOV
38
        return f"ffmpeg-n{self.version}-latest-{ARCH_MAPPING.get(get_arch())}-lgpl-{self.version}"
×
39

40
    def get_ffmpeg_path(self) -> str:
1✔
UNCOV
41
        return os.path.join(self.get_installed_dir(), "bin", "ffmpeg")  # type: ignore[arg-type]
×
42

43
    def get_ffprobe_path(self) -> str:
1✔
UNCOV
44
        return os.path.join(self.get_installed_dir(), "bin", "ffprobe")  # type: ignore[arg-type]
×
45

46
    def _get_checksum_url(self) -> str | None:
1✔
UNCOV
47
        return FFMPEG_STATIC_CHECKSUM_URL
×
48

49

50
ffmpeg_package = FfmpegPackage()
1✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc