Skip to content

Commit 3bfb1cb

Browse files
committed
probe to accept PathLike object as url
1 parent f8e4e4d commit 3bfb1cb

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/ffmpegio/probe.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import json, re
77
from fractions import Fraction
88
from functools import lru_cache
9+
from os import PathLike
910

1011
from .path import ffprobe, PIPE
1112
from .utils import parse_stream_spec
@@ -196,7 +197,7 @@ def _exec(
196197
["-show_optional_fields", "always" if keep_optional_fields else "never"]
197198
)
198199

199-
pipe = not isinstance(url, str)
200+
pipe = not isinstance(url, (str, PathLike))
200201
args.append("-" if pipe else url)
201202

202203
if pipe:

0 commit comments

Comments
 (0)