1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
|
{ lib
, stdenv
, buildPythonPackage
, cython
, fetchFromGitHub
, ffmpeg_5-headless
, numpy
, pillow
, pkg-config
, pytestCheckHook
, pythonOlder
, setuptools
}:
buildPythonPackage rec {
pname = "av";
version = "11.0.0";
pyproject = true;
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "mikeboers";
repo = "PyAV";
rev = "refs/tags/v${version}";
hash = "sha256-pCKP+4ZmZCJcG7/Qy9H6aS4svQdgaRA9S1QVNWFYhSQ=";
};
nativeBuildInputs = [
cython
pkg-config
setuptools
];
buildInputs = [
ffmpeg_5-headless
];
preCheck = ''
# ensure we import the built version
rm -r av
'';
nativeCheckInputs = [
numpy
pillow
pytestCheckHook
];
disabledTests = [
# urlopen fails during DNS resolution
"test_writing_to_custom_io"
"test_decode_close_then_use"
# Tests that want to download FATE data, https://github.com/PyAV-Org/PyAV/issues/955
"test_vobsub"
"test_transcode"
"test_stream_tuples"
"test_stream_seek"
"test_stream_probing"
"test_seek_start"
"test_seek_middle"
"test_seek_int64"
"test_seek_float"
"test_seek_end"
"test_roundtrip"
"test_reading_from_write_readonl"
"test_reading_from_pipe_readonly"
"test_reading_from_file"
"test_reading_from_buffer"
"test_reading_from_buffer_no_see"
"test_parse"
"test_movtext"
"test_encoding_xvid"
"test_encoding_tiff"
"test_encoding_png"
"test_encoding_pcm_s24le"
"test_encoding_mpeg4"
"test_encoding_mpeg1video"
"test_encoding_mp2"
"test_encoding_mjpeg"
"test_encoding_h264"
"test_encoding_dvvideo"
"test_encoding_dnxhd"
"test_encoding_aac"
"test_decoded_video_frame_count"
"test_decoded_time_base"
"test_decoded_motion_vectors"
"test_decode_half"
"test_decode_audio_sample_count"
"test_data"
"test_container_probing"
"test_codec_tag"
"test_selection"
] ++ lib.optionals (stdenv.isDarwin) [
# Segmentation Faults
"test_encoding_with_pts"
"test_bayer_write"
];
disabledTestPaths = [
# urlopen fails during DNS resolution
"tests/test_doctests.py"
"tests/test_timeout.py"
];
pythonImportsCheck = [
"av"
"av.audio"
"av.buffer"
"av.bytesource"
"av.codec"
"av.container"
"av._core"
"av.datasets"
"av.descriptor"
"av.dictionary"
"av.enum"
"av.error"
"av.filter"
"av.format"
"av.frame"
"av.logging"
"av.option"
"av.packet"
"av.plane"
"av.stream"
"av.subtitles"
"av.utils"
"av.video"
];
meta = with lib; {
description = "Pythonic bindings for FFmpeg/Libav";
mainProgram = "pyav";
homepage = "https://github.com/mikeboers/PyAV/";
changelog = "https://github.com/PyAV-Org/PyAV/blob/v${version}/CHANGELOG.rst";
license = licenses.bsd2;
maintainers = with maintainers; [ ];
};
}
|