|
8 | 8 |
|
9 | 9 | import copy
|
10 | 10 | import os
|
| 11 | +import shutil |
11 | 12 | import subprocess
|
12 | 13 | from collections import defaultdict
|
13 | 14 | from pathlib import Path
|
@@ -119,6 +120,11 @@ def run_async(self, *, executable="ffmpeg", direct_print=True, join_args=False,
|
119 | 120 | pipe_stdin=False, pipe_stdout=True, pipe_stderr=True, quiet=False,
|
120 | 121 | overwrite=True, progress='') -> subprocess.Popen:
|
121 | 122 | '''Asynchronously invoke ffmpeg for the supplied node graph.'''
|
| 123 | + if shutil.which(executable) is None: |
| 124 | + raise FileNotFoundError(f"Can't find {executable} in $PATH or " |
| 125 | + f"current directory. Please specify a absolute path or " |
| 126 | + f"add {executable} into $PATH.") |
| 127 | + |
122 | 128 | cmd_args_seq = self.compile(
|
123 | 129 | executable=executable,
|
124 | 130 | direct_print=direct_print,
|
@@ -179,9 +185,10 @@ def output(self, *streams_or_source, vn=False, an=False, ar=None, ab=None, ac=No
|
179 | 185 | acodec=None, vcodec=None, codec: str = None, aq_scale=None, vq_scale=None,
|
180 | 186 | aspect=None, fps=None, format=None, pixel_format=None, video_bitrate=None,
|
181 | 187 | audio_bitrate=None, v_profile=None, preset=None, mov_flags=None,
|
182 |
| - shortest=False, frame_size=None, v_frames: int = None, start_position: float = None, |
183 |
| - duration: float = None, video_filter: str = None, audio_filter: str = None, ignore_output=False, |
184 |
| - preview: bool = False, enable_cuda=True, args: list = None, **kwargs) -> OutputStream: |
| 188 | + shortest=False, frame_size=None, v_frames: int = None, duration: Union[float, int, str] = None, |
| 189 | + start_position: Union[float, int, str] = None, video_filter: str = None, |
| 190 | + audio_filter: str = None, ignore_output=False, preview: bool = False, |
| 191 | + enable_cuda=True, args: list = None, **kwargs) -> OutputStream: |
185 | 192 | raise NotImplementedError
|
186 | 193 |
|
187 | 194 | def filter(self, *args, **kwargs) -> FilterableStream:
|
|
0 commit comments