diff --git a/ffprobe/ffprobe.py b/ffprobe/ffprobe.py index f1eb3dc..cac4b10 100644 --- a/ffprobe/ffprobe.py +++ b/ffprobe/ffprobe.py @@ -18,9 +18,10 @@ class FFProbe: metadata=FFProbe('multimedia-file.mov') """ - def __init__(self, path_to_video): + def __init__(self, path_to_video, probe_size=False): self.path_to_video = path_to_video - + probe_size_args = f'-probesize {probe_size} ' if probe_size else '' + try: with open(os.devnull, 'w') as tempf: subprocess.check_call(["ffprobe", "-h"], stdout=tempf, stderr=tempf) @@ -29,9 +30,9 @@ def __init__(self, path_to_video): if os.path.isfile(self.path_to_video) or self.path_to_video.startswith('http'): if platform.system() == 'Windows': - cmd = ["ffprobe", "-show_streams", self.path_to_video] + cmd = ["ffprobe", "-show_streams", probe_size_args, self.path_to_video] else: - cmd = ["ffprobe -show_streams " + pipes.quote(self.path_to_video)] + cmd = ["ffprobe -show_streams " + probe_size_args + pipes.quote(self.path_to_video)] p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True) diff --git a/setup.py b/setup.py index 8b496ab..e23fb00 100644 --- a/setup.py +++ b/setup.py @@ -8,7 +8,7 @@ setup( name='ffprobe-python', - version='1.0.3', + version='1.0.4', description=""" A wrapper around ffprobe command to extract metadata from media files. """, @@ -16,9 +16,8 @@ long_description_content_type="text/markdown", author='Simon Hargreaves', author_email='simon@simon-hargreaves.com', - maintainer='Mark Ma', - maintainer_email='519329064@qq.com', - url='https://github.com/gbstack/ffprobe-python', + maintainer='Tom Dyson', + url='https://github.com/tomdyson/ffprobe-python', packages=['ffprobe'], keywords='ffmpeg, ffprobe, mpeg, mp4', classifiers=[