at 23.11-beta 3.0 kB view raw
1diff --git i/ffmpeg/_probe.py w/ffmpeg/_probe.py 2index 41e8168..eb83b54 100644 3--- i/ffmpeg/_probe.py 4+++ w/ffmpeg/_probe.py 5@@ -4,7 +4,7 @@ from ._run import Error 6 from ._utils import convert_kwargs_to_cmd_line_args 7 8 9-def probe(filename, cmd='ffprobe', **kwargs): 10+def probe(filename, cmd='@ffmpeg@/bin/ffprobe', **kwargs): 11 """Run ffprobe on the specified file and return a JSON representation of the output. 12 13 Raises: 14diff --git i/ffmpeg/_run.py w/ffmpeg/_run.py 15index afc504d..9445cca 100644 16--- i/ffmpeg/_run.py 17+++ w/ffmpeg/_run.py 18@@ -172,7 +172,7 @@ def get_args(stream_spec, overwrite_output=False): 19 20 21 @output_operator() 22-def compile(stream_spec, cmd='ffmpeg', overwrite_output=False): 23+def compile(stream_spec, cmd='@ffmpeg@/bin/ffmpeg', overwrite_output=False): 24 """Build command-line for invoking ffmpeg. 25 26 The :meth:`run` function uses this to build the commnad line 27@@ -193,7 +193,7 @@ def compile(stream_spec, cmd='ffmpeg', overwrite_output=False): 28 @output_operator() 29 def run_async( 30 stream_spec, 31- cmd='ffmpeg', 32+ cmd='@ffmpeg@/bin/ffmpeg', 33 pipe_stdin=False, 34 pipe_stdout=False, 35 pipe_stderr=False, 36@@ -289,7 +289,7 @@ def run_async( 37 @output_operator() 38 def run( 39 stream_spec, 40- cmd='ffmpeg', 41+ cmd='@ffmpeg@/bin/ffmpeg', 42 capture_stdout=False, 43 capture_stderr=False, 44 input=None, 45diff --git i/ffmpeg/tests/test_ffmpeg.py w/ffmpeg/tests/test_ffmpeg.py 46index 279a323..8d3b35c 100644 47--- i/ffmpeg/tests/test_ffmpeg.py 48+++ w/ffmpeg/tests/test_ffmpeg.py 49@@ -24,7 +24,7 @@ TEST_OUTPUT_FILE2 = os.path.join(SAMPLE_DATA_DIR, 'out2.mp4') 50 BOGUS_INPUT_FILE = os.path.join(SAMPLE_DATA_DIR, 'bogus') 51 52 53-subprocess.check_call(['ffmpeg', '-version']) 54+subprocess.check_call(['@ffmpeg@/bin/ffmpeg', '-version']) 55 56 57 def test_escape_chars(): 58@@ -423,7 +423,7 @@ def test_filter_text_arg_str_escape(): 59 60 def test__compile(): 61 out_file = ffmpeg.input('dummy.mp4').output('dummy2.mp4') 62- assert out_file.compile() == ['ffmpeg', '-i', 'dummy.mp4', 'dummy2.mp4'] 63+ assert out_file.compile() == ['@ffmpeg@/bin/ffmpeg', '-i', 'dummy.mp4', 'dummy2.mp4'] 64 assert out_file.compile(cmd='ffmpeg.old') == [ 65 'ffmpeg.old', 66 '-i', 67@@ -490,7 +490,7 @@ def test__run__input_output(mocker): 68 @pytest.mark.parametrize('capture_stdout', [True, False]) 69 @pytest.mark.parametrize('capture_stderr', [True, False]) 70 def test__run__error(mocker, capture_stdout, capture_stderr): 71- mocker.patch.object(ffmpeg._run, 'compile', return_value=['ffmpeg']) 72+ mocker.patch.object(ffmpeg._run, 'compile', return_value=['@ffmpeg@/bin/ffmpeg']) 73 stream = _get_complex_filter_example() 74 with pytest.raises(ffmpeg.Error) as excinfo: 75 out, err = ffmpeg.run( 76@@ -684,7 +684,7 @@ def test_pipe(): 77 'pipe:1', 78 ] 79 80- cmd = ['ffmpeg'] + args 81+ cmd = ['@ffmpeg@/bin/ffmpeg'] + args 82 p = subprocess.Popen( 83 cmd, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE 84 )