Skip to content

Commit 5acc6da

Browse files
Added ffmpeg.probe 'cmd' argument
ffmpeg.<stream>.run() method has a `cmd` argument for selecting `ffmpeg` executable. This simple hack adds this feature to the probe command
1 parent b6f150c commit 5acc6da

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)