MCPcopy Create free account
hub / github.com/Breakthrough/PySceneDetect / get_mkvmerge_version

Function get_mkvmerge_version

scenedetect/platform.py:304–316  ·  view source on GitHub ↗

Get mkvmerge version identifier, or None if mkvmerge is not found in PATH.

()

Source from the content-addressed store, hash-verified

302
303
304def get_mkvmerge_version() -> str | None:
305 """Get mkvmerge version identifier, or None if mkvmerge is not found in PATH."""
306 tool_name = "mkvmerge"
307 try:
308 output = subprocess.check_output(args=[tool_name, "--version"], text=True)
309 except FileNotFoundError:
310 # mkvmerge doesn't exist on the system
311 return None
312 output_split = output.split()
313 if len(output_split) >= 1 and output_split[0] == tool_name:
314 return " ".join(output_split[1:])
315 # If parsing the version fails, return the entire first line of output.
316 return output.splitlines()[0]
317
318
319def _query_package_version(dist_name: str, fallback_module: str | None) -> str | None:

Callers 1

get_system_version_infoFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected