mirror of
https://github.com/facefusion/facefusion.git
synced 2026-05-31 01:49:29 +02:00
8ee40517a4
* follow the todos * extend to support bit_rate and more * simplify like crazy * simplify like crazy * minor changes * clean testing * clean testing * kill pipe resolver helpers * kill pipe resolver helpers * bit rate seems to be different on CI * use .splitlines() over .split(os.linesep) * skip test for windows * hack testing
30 lines
704 B
Python
30 lines
704 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 [ '-i', input_path ]
|