8000 Merge pull request #123 from laurentalacoque/master · yan-code1/ffmpeg-python@d47890a · GitHub
[go: up one dir, main page]

Skip to content

Commit d47890a

Browse files
authored
Merge pull request kkroening#123 from laurentalacoque/master
Added ffmpeg.probe 'cmd' argument
2 parents b6f150c + 5acc6da commit d47890a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ffmpeg/_probe.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from ._run import Error
44

55

6-
def probe(filename):
6+
def probe(filename, cmd='ffprobe'):
77
"""Run ffprobe on the specified file and return a JSON representation of the output.
88
99
Raises:
@@ -12,7 +12,7 @@ def probe(filename):
1212
The stderr output can be retrieved by accessing the
1313
``stderr`` property of the exception.
1414
"""
15-
args = ['ffprobe', '-show_format', '-show_streams', '-of', 'json', filename]
15+
args = [cmd, '-show_format', '-show_streams', '-of', 'json', filename]
1616
p = subprocess.Popen(args, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
1717
out, err = p.communicate()
1818
if p.returncode != 0:

0 commit comments

Comments
 (0)
0