Files
facefusion/facefusion/ffprobe_builder.py
T
Henry Ruhs ba8093e844 Revisit and cleanup ffprobe integration (#1027)
* Revisit and cleanup ffprobe integration

* Revisit and cleanup ffprobe integration
2026-03-17 14:01:49 +01:00

30 lines
698 B
Python

import itertools
import shutil
from typing import List
from facefusion.types import Command
def run(commands : List[Command]) -> List[Command]:
return [ shutil.which('ffprobe'), '-loglevel', 'error' ] + commands
def chain(*commands : List[Command]) -> List[Command]:
return list(itertools.chain(*commands))
def show_entries(entries : List[str]) -> List[Command]:
return [ '-show_entries', 'stream=' + ','.join(entries) ]
def format_to_value() -> List[Command]:
return [ '-of', 'default=noprint_wrappers=1:nokey=1' ]
def format_to_key_value() -> List[Command]:
return [ '-of', 'default=noprint_wrappers=1' ]
def set_input(input_path : str) -> List[Command]:
return [ input_path ]