mirror of
https://github.com/facefusion/facefusion.git
synced 2026-07-28 12:59:03 +02:00
* probe video metadata via ffprobe in vision Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Tbcd6VWCiU4BQP1gywPr2a * probe video metadata via ffprobe in vision Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Tbcd6VWCiU4BQP1gywPr2a --------- Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
34 lines
827 B
Python
34 lines
827 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 select_stream(stream : str) -> List[Command]:
|
|
return [ '-select_streams', stream ]
|
|
|
|
|
|
def show_stream_entries(entries : List[str]) -> List[Command]:
|
|
return [ '-show_entries', 'stream=' + ','.join(entries) ]
|
|
|
|
|
|
def show_format_entries(entries : List[str]) -> List[Command]:
|
|
return [ '-show_entries', 'format=' + ','.join(entries) ]
|
|
|
|
|
|
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 ]
|