MCPcopy Create free account
hub / github.com/AggieSportsAnalytics/CourtCheck / _transcode

Function _transcode

backend/tools/transcode_and_reupload.py:39–47  ·  view source on GitHub ↗

Re-encode src (mp4v) → dst (H.264). Returns True on success.

(src: Path, dst: Path)

Source from the content-addressed store, hash-verified

37
38
39def _transcode(src: Path, dst: Path) -> bool:
40 """Re-encode src (mp4v) → dst (H.264). Returns True on success."""
41 result = subprocess.run([
42 "ffmpeg", "-y", "-i", str(src),
43 "-vcodec", "libx264", "-crf", "23", "-preset", "fast",
44 "-movflags", "+faststart",
45 str(dst),
46 ], capture_output=True)
47 return result.returncode == 0 and dst.exists() and dst.stat().st_size > 0
48
49
50def _upload(local_path: Path, dest: str, url_base: str, key: str) -> bool:

Callers 1

_process_clipFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected