MCPcopy Create free account
hub / github.com/FastLED/FastLED / run_ffmpeg

Function run_ffmpeg

ci/tools/generate_audio_fixtures.py:100–109  ·  view source on GitHub ↗

Run ffmpeg with error handling.

(ffmpeg: str, args: list[str], desc: str = "")

Source from the content-addressed store, hash-verified

98
99
100def run_ffmpeg(ffmpeg: str, args: list[str], desc: str = "") -> None:
101 """Run ffmpeg with error handling."""
102 cmd = [ffmpeg, "-y", "-hide_banner", "-loglevel", "error", *args]
103 if desc:
104 print(f" {desc}...")
105 result = subprocess.run(cmd, capture_output=True, text=True)
106 if result.returncode != 0:
107 print(f" FAILED: {' '.join(cmd)}", file=sys.stderr)
108 print(f" stderr: {result.stderr}", file=sys.stderr)
109 raise RuntimeError(f"ffmpeg failed: {result.stderr[:200]}")
110
111
112def download_and_trim(

Callers 3

download_and_trimFunction · 0.85
generate_synthetic_stemFunction · 0.85
create_mixFunction · 0.85

Calls 2

printFunction · 0.50
runMethod · 0.45

Tested by

no test coverage detected