diff --git a/ffmpeg/_ffmpeg.py b/ffmpeg/_ffmpeg.py index 007624b..8275408 100644 --- a/ffmpeg/_ffmpeg.py +++ b/ffmpeg/_ffmpeg.py @@ -2,6 +2,7 @@ from __future__ import unicode_literals from past.builtins import basestring from ._utils import basestring +import os from .nodes import ( filter_operator, @@ -23,6 +24,8 @@ def input(filename, **kwargs): Official documentation: `Main options `__ """ + if getattr(os, "PathLike", None) and isinstance(filename, os.PathLike): + filename = str(filename) kwargs['filename'] = filename fmt = kwargs.pop('f', None) if fmt: