mirror of
https://github.com/kkroening/ffmpeg-python.git
synced 2025-04-05 20:11:11 +08:00
Support path-like objects as well
This commit is contained in:
parent
f3079726fa
commit
4dfd03dd3b
@ -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 <https://ffmpeg.org/ffmpeg.html#Main-options>`__
|
||||
"""
|
||||
if isinstance(filename, os.PathLike):
|
||||
filename = str(filename)
|
||||
kwargs['filename'] = filename
|
||||
fmt = kwargs.pop('f', None)
|
||||
if fmt:
|
||||
|
Loading…
x
Reference in New Issue
Block a user