push sheeet
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s

This commit is contained in:
Dark Steveneq
2025-10-09 14:15:47 +02:00
commit 646b892680
49168 changed files with 5897842 additions and 0 deletions

View File

@@ -0,0 +1,65 @@
{
lib,
buildPythonPackage,
fetchFromGitHub,
replaceVars,
fetchpatch2,
setuptools,
pytestCheckHook,
pytest-mock,
ffmpeg,
}:
buildPythonPackage {
pname = "ffmpeg-python";
version = "0.2.0-unstable-2022-07-11";
pyproject = true;
src = fetchFromGitHub {
owner = "kkroening";
repo = "ffmpeg-python";
rev = "df129c7ba30aaa9ffffb81a48f53aa7253b0b4e6";
hash = "sha256-jPiFhYRwfuS+vo6LsLw0+65NWy2A+B+EdC8SewZTRP4=";
};
patches = [
(replaceVars ./ffmpeg-location.patch { inherit ffmpeg; })
# Remove dependency on `future`
# https://github.com/kkroening/ffmpeg-python/pull/795
(fetchpatch2 {
url = "https://github.com/kkroening/ffmpeg-python/commit/dce459d39ace25f03edbabdad1735064787568f7.patch?full_index=1";
hash = "sha256-ZptCFplL88d0p2s741ymHiwyDsDGVFylBJ8FTrZDGMc=";
})
# Fix ffmpeg/tests/test_ffmpeg.py: test_pipe() (v1: ignore duplicate frames)
# https://github.com/kkroening/ffmpeg-python/pull/726
(fetchpatch2 {
url = "https://github.com/kkroening/ffmpeg-python/commit/557ed8e81ff48c5931c9249ec4aae525347ecf85.patch?full_index=1";
hash = "sha256-XrL9yLaBg1tu63OYZauEb/4Ghp2zHtiF6vB+1YYbv1Y=";
})
# Fix `test__probe` on FFmpeg 7
# https://github.com/kkroening/ffmpeg-python/pull/848
(fetchpatch2 {
url = "https://github.com/kkroening/ffmpeg-python/commit/eeaa83398ba1d4e5b470196f7d4c7ca4ba9e8ddf.patch?full_index=1";
hash = "sha256-/qxez4RF/RPRr9nA+wp+XB49L3VNgnMwMQhFD2NwijU=";
})
];
build-system = [ setuptools ];
nativeCheckInputs = [
pytestCheckHook
pytest-mock
];
pythonImportsCheck = [ "ffmpeg" ];
meta = {
description = "Python bindings for FFmpeg - with complex filtering support";
homepage = "https://github.com/kkroening/ffmpeg-python";
license = lib.licenses.asl20;
maintainers = [ lib.maintainers.emily ];
};
}

View File

@@ -0,0 +1,90 @@
diff --git a/ffmpeg/_probe.py b/ffmpeg/_probe.py
index 090d7abf9e..07fb4d9459 100644
--- a/ffmpeg/_probe.py
+++ b/ffmpeg/_probe.py
@@ -4,7 +4,7 @@
from ._utils import convert_kwargs_to_cmd_line_args
-def probe(filename, cmd='ffprobe', timeout=None, **kwargs):
+def probe(filename, cmd='@ffmpeg@/bin/ffprobe', timeout=None, **kwargs):
"""Run ffprobe on the specified file and return a JSON representation of the output.
Raises:
diff --git a/ffmpeg/_run.py b/ffmpeg/_run.py
index f42d1d7309..d3e1df9c80 100644
--- a/ffmpeg/_run.py
+++ b/ffmpeg/_run.py
@@ -174,7 +174,7 @@
@output_operator()
-def compile(stream_spec, cmd='ffmpeg', overwrite_output=False):
+def compile(stream_spec, cmd='@ffmpeg@/bin/ffmpeg', overwrite_output=False):
"""Build command-line for invoking ffmpeg.
The :meth:`run` function uses this to build the command line
@@ -195,7 +195,7 @@
@output_operator()
def run_async(
stream_spec,
- cmd='ffmpeg',
+ cmd='@ffmpeg@/bin/ffmpeg',
pipe_stdin=False,
pipe_stdout=False,
pipe_stderr=False,
@@ -299,7 +299,7 @@
@output_operator()
def run(
stream_spec,
- cmd='ffmpeg',
+ cmd='@ffmpeg@/bin/ffmpeg',
capture_stdout=False,
capture_stderr=False,
input=None,
diff --git a/ffmpeg/tests/test_ffmpeg.py b/ffmpeg/tests/test_ffmpeg.py
index 8dbc271a79..168e662e8d 100644
--- a/ffmpeg/tests/test_ffmpeg.py
+++ b/ffmpeg/tests/test_ffmpeg.py
@@ -26,7 +26,7 @@
BOGUS_INPUT_FILE = os.path.join(SAMPLE_DATA_DIR, 'bogus')
-subprocess.check_call(['ffmpeg', '-version'])
+subprocess.check_call(['@ffmpeg@/bin/ffmpeg', '-version'])
def test_escape_chars():
@@ -450,12 +450,12 @@
# def test_version():
-# subprocess.check_call(['ffmpeg', '-version'])
+# subprocess.check_call(['@ffmpeg@/bin/ffmpeg', '-version'])
def test__compile():
out_file = ffmpeg.input('dummy.mp4').output('dummy2.mp4')
- assert out_file.compile() == ['ffmpeg', '-i', 'dummy.mp4', 'dummy2.mp4']
+ assert out_file.compile() == ['@ffmpeg@/bin/ffmpeg', '-i', 'dummy.mp4', 'dummy2.mp4']
assert out_file.compile(cmd='ffmpeg.old') == [
'ffmpeg.old',
'-i',
@@ -530,7 +530,7 @@
@pytest.mark.parametrize('capture_stdout', [True, False])
@pytest.mark.parametrize('capture_stderr', [True, False])
def test__run__error(mocker, capture_stdout, capture_stderr):
- mocker.patch.object(ffmpeg._run, 'compile', return_value=['ffmpeg'])
+ mocker.patch.object(ffmpeg._run, 'compile', return_value=['@ffmpeg@/bin/ffmpeg'])
stream = _get_complex_filter_example()
with pytest.raises(ffmpeg.Error) as excinfo:
out, err = ffmpeg.run(
@@ -724,7 +724,7 @@
'pipe:1',
]
- cmd = ['ffmpeg'] + args
+ cmd = ['@ffmpeg@/bin/ffmpeg'] + args
p = subprocess.Popen(
cmd,
stdin=subprocess.PIPE,