Support path-like objects as well

This commit is contained in:
Harsh 2021-05-16 11:53:08 +05:30 committed by GitHub
parent f3079726fa
commit 4dfd03dd3b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2,6 +2,7 @@ from __future__ import unicode_literals
from past.builtins import basestring from past.builtins import basestring
from ._utils import basestring from ._utils import basestring
import os
from .nodes import ( from .nodes import (
filter_operator, filter_operator,
@ -23,6 +24,8 @@ def input(filename, **kwargs):
Official documentation: `Main options <https://ffmpeg.org/ffmpeg.html#Main-options>`__ Official documentation: `Main options <https://ffmpeg.org/ffmpeg.html#Main-options>`__
""" """
if isinstance(filename, os.PathLike):
filename = str(filename)
kwargs['filename'] = filename kwargs['filename'] = filename
fmt = kwargs.pop('f', None) fmt = kwargs.pop('f', None)
if fmt: if fmt: