HwCodecDetect 0.0.4__tar.gz → 0.0.5__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {hwcodecdetect-0.0.4/src/HwCodecDetect.egg-info → hwcodecdetect-0.0.5}/PKG-INFO +11 -1
- {hwcodecdetect-0.0.4 → hwcodecdetect-0.0.5}/README.md +10 -0
- hwcodecdetect-0.0.5/VERSION +1 -0
- {hwcodecdetect-0.0.4 → hwcodecdetect-0.0.5}/pyproject.toml +1 -1
- {hwcodecdetect-0.0.4 → hwcodecdetect-0.0.5}/src/HwCodecDetect/run_tests.py +24 -12
- hwcodecdetect-0.0.5/src/HwCodecDetect/version.py +1 -0
- {hwcodecdetect-0.0.4 → hwcodecdetect-0.0.5/src/HwCodecDetect.egg-info}/PKG-INFO +11 -1
- hwcodecdetect-0.0.4/VERSION +0 -1
- hwcodecdetect-0.0.4/src/HwCodecDetect/version.py +0 -1
- {hwcodecdetect-0.0.4 → hwcodecdetect-0.0.5}/LICENSE +0 -0
- {hwcodecdetect-0.0.4 → hwcodecdetect-0.0.5}/MANIFEST.in +0 -0
- {hwcodecdetect-0.0.4 → hwcodecdetect-0.0.5}/setup.cfg +0 -0
- {hwcodecdetect-0.0.4 → hwcodecdetect-0.0.5}/setup.py +0 -0
- {hwcodecdetect-0.0.4 → hwcodecdetect-0.0.5}/src/HwCodecDetect/__init__.py +0 -0
- {hwcodecdetect-0.0.4 → hwcodecdetect-0.0.5}/src/HwCodecDetect/install_ffmpeg_if_needed.py +0 -0
- {hwcodecdetect-0.0.4 → hwcodecdetect-0.0.5}/src/HwCodecDetect.egg-info/SOURCES.txt +0 -0
- {hwcodecdetect-0.0.4 → hwcodecdetect-0.0.5}/src/HwCodecDetect.egg-info/dependency_links.txt +0 -0
- {hwcodecdetect-0.0.4 → hwcodecdetect-0.0.5}/src/HwCodecDetect.egg-info/entry_points.txt +0 -0
- {hwcodecdetect-0.0.4 → hwcodecdetect-0.0.5}/src/HwCodecDetect.egg-info/requires.txt +0 -0
- {hwcodecdetect-0.0.4 → hwcodecdetect-0.0.5}/src/HwCodecDetect.egg-info/top_level.txt +0 -0
- {hwcodecdetect-0.0.4 → hwcodecdetect-0.0.5}/src/HwCodecDetect.egg-info/zip-safe +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: HwCodecDetect
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.5
|
|
4
4
|
Summary: A cross-platform tool to automatically detect and test hardware video decoders/encoders using FFmpeg.
|
|
5
5
|
Home-page: https://github.com/whyb/HwCodecDetect
|
|
6
6
|
Author: whyb
|
|
@@ -23,6 +23,15 @@ Dynamic: license-file
|
|
|
23
23
|
Dynamic: requires-python
|
|
24
24
|
|
|
25
25
|
# FFmpeg Hardware Codec Test Script(HwCodecDetect)
|
|
26
|
+
<p align="center">
|
|
27
|
+
<a href="https://pypi.org/project/hwcodecdetect">
|
|
28
|
+
<img src="https://badgen.net/pypi/v/hwcodecdetect?color=yellow" />
|
|
29
|
+
</a>
|
|
30
|
+
<a href="https://pypi.org/project/hwcodecdetect">
|
|
31
|
+
<img src="https://static.pepy.tech/badge/hwcodecdetect" />
|
|
32
|
+
</a>
|
|
33
|
+
</p>
|
|
34
|
+
|
|
26
35
|
[中文版](https://github.com/whyb/HwCodecDetect/blob/main/README.zh.md)
|
|
27
36
|
|
|
28
37
|
Today's hardware-accelerated video codec landscape is a "field of a hundred schools of thought." To leverage the immense power of GPUs, hardware manufacturers have introduced their own acceleration frameworks and encoding standards, such as NVIDIA's NVEnc/NVDec, Intel's QSV, and AMD's AMF. Additionally, operating systems provide universal APIs like Microsoft's Media Foundation, DXVA, and D3D12VA, while the open-source community has developed cross-platform standards like VAAPI and Vulkan.
|
|
@@ -52,6 +61,7 @@ The script automatically tests and reports on the following major hardware decod
|
|
|
52
61
|
| AMF (Advanced Media Framework) | H.264、H.265、AV1 |
|
|
53
62
|
| DXVA2 (DirectX Video Acceleration) | H.264、H.265、MJPEG、MPEG-1、MPEG-2、MPEG-4、VP8 |
|
|
54
63
|
| D3D11VA (Direct3D 11 Video Acceleration) | H.264、H.265、AV1、MJPEG、MPEG-1、MPEG-2、MPEG-4、VP8、VP9 |
|
|
64
|
+
| Vulkan | H.264、H.265、AV1 |
|
|
55
65
|
|
|
56
66
|
|
|
57
67
|
## How to Use
|
|
@@ -1,4 +1,13 @@
|
|
|
1
1
|
# FFmpeg Hardware Codec Test Script(HwCodecDetect)
|
|
2
|
+
<p align="center">
|
|
3
|
+
<a href="https://pypi.org/project/hwcodecdetect">
|
|
4
|
+
<img src="https://badgen.net/pypi/v/hwcodecdetect?color=yellow" />
|
|
5
|
+
</a>
|
|
6
|
+
<a href="https://pypi.org/project/hwcodecdetect">
|
|
7
|
+
<img src="https://static.pepy.tech/badge/hwcodecdetect" />
|
|
8
|
+
</a>
|
|
9
|
+
</p>
|
|
10
|
+
|
|
2
11
|
[中文版](https://github.com/whyb/HwCodecDetect/blob/main/README.zh.md)
|
|
3
12
|
|
|
4
13
|
Today's hardware-accelerated video codec landscape is a "field of a hundred schools of thought." To leverage the immense power of GPUs, hardware manufacturers have introduced their own acceleration frameworks and encoding standards, such as NVIDIA's NVEnc/NVDec, Intel's QSV, and AMD's AMF. Additionally, operating systems provide universal APIs like Microsoft's Media Foundation, DXVA, and D3D12VA, while the open-source community has developed cross-platform standards like VAAPI and Vulkan.
|
|
@@ -28,6 +37,7 @@ The script automatically tests and reports on the following major hardware decod
|
|
|
28
37
|
| AMF (Advanced Media Framework) | H.264、H.265、AV1 |
|
|
29
38
|
| DXVA2 (DirectX Video Acceleration) | H.264、H.265、MJPEG、MPEG-1、MPEG-2、MPEG-4、VP8 |
|
|
30
39
|
| D3D11VA (Direct3D 11 Video Acceleration) | H.264、H.265、AV1、MJPEG、MPEG-1、MPEG-2、MPEG-4、VP8、VP9 |
|
|
40
|
+
| Vulkan | H.264、H.265、AV1 |
|
|
31
41
|
|
|
32
42
|
|
|
33
43
|
## How to Use
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
0.0.5
|
|
@@ -58,12 +58,15 @@ DECODER_TITLES = {
|
|
|
58
58
|
("d3d11va", "mpeg4"): "Direct3D 11 Video Acceleration MPEG-4 Decoder(D3D11VA)",
|
|
59
59
|
("d3d11va", "vp8"): "Direct3D 11 Video Acceleration VP8 Decoder(D3D11VA)",
|
|
60
60
|
("d3d11va", "vp9"): "Direct3D 11 Video Acceleration VP9 Decoder(D3D11VA)",
|
|
61
|
+
("h264_vulkan", "h264"): "Vulkan Hardware H264 Decoder",
|
|
62
|
+
("hevc_vulkan", "h265"): "Vulkan Hardware H265 Decoder",
|
|
63
|
+
("av1_vulkan", "av1"): "Vulkan Hardware AV1 Decoder",
|
|
61
64
|
}
|
|
62
65
|
|
|
63
66
|
DECODERS = {
|
|
64
|
-
"h264": {"lib": "libx264", "hw_decoders": ["h264_cuvid", "h264_qsv", "dxva2", "d3d11va"]},
|
|
65
|
-
"h265": {"lib": "libx265", "hw_decoders": ["hevc_cuvid", "hevc_qsv", "d3d11va"]},
|
|
66
|
-
"av1": {"lib": "librav1e", "hw_decoders": ["av1_cuvid", "av1_qsv", "dxva2", "d3d11va"]},
|
|
67
|
+
"h264": {"lib": "libx264", "hw_decoders": ["h264_cuvid", "h264_qsv", "dxva2", "d3d11va", "h264_vulkan"]},
|
|
68
|
+
"h265": {"lib": "libx265", "hw_decoders": ["hevc_cuvid", "hevc_qsv", "d3d11va", "hevc_vulkan"]},
|
|
69
|
+
"av1": {"lib": "librav1e", "hw_decoders": ["av1_cuvid", "av1_qsv", "dxva2", "d3d11va", "av1_vulkan"]},
|
|
67
70
|
"mjpeg": {"lib": "mjpeg", "hw_decoders": ["mjpeg_cuvid", "mjpeg_qsv", "dxva2", "d3d11va"]},
|
|
68
71
|
"mpeg1": {"lib": "mpeg1video", "hw_decoders": ["mpeg1_cuvid", "dxva2", "d3d11va"]},
|
|
69
72
|
"mpeg2": {"lib": "mpeg2video", "hw_decoders": ["mpeg2_cuvid", "mpeg2_qsv", "dxva2", "d3d11va"]},
|
|
@@ -191,9 +194,9 @@ def _run_decoder_tests(test_dir):
|
|
|
191
194
|
"""
|
|
192
195
|
results = defaultdict(dict)
|
|
193
196
|
|
|
194
|
-
GREEN =
|
|
195
|
-
RED =
|
|
196
|
-
RESET =
|
|
197
|
+
GREEN = Fore.GREEN
|
|
198
|
+
RED = Fore.RED
|
|
199
|
+
RESET = Style.RESET_ALL
|
|
197
200
|
|
|
198
201
|
print("\n--- Running Decoder Tests ---")
|
|
199
202
|
|
|
@@ -209,19 +212,19 @@ def _run_decoder_tests(test_dir):
|
|
|
209
212
|
print(f" {res_name}: {RED}skipped due to earlier failure{RESET}")
|
|
210
213
|
continue
|
|
211
214
|
file_ext = ".webm" if codec in ["vp8", "vp9"] else ".mp4"
|
|
212
|
-
|
|
215
|
+
|
|
213
216
|
# We need to find *any* existing file for this codec/resolution combo
|
|
214
217
|
# A simple approach is to check if a file with the correct codec and resolution exists
|
|
215
218
|
found_file = False
|
|
216
219
|
test_file_path = os.path.join(test_dir, f"{codec}_{res_name}{file_ext}")
|
|
217
|
-
|
|
220
|
+
|
|
218
221
|
# Try to use any file already generated from encoder tests
|
|
219
222
|
for filename in os.listdir(test_dir):
|
|
220
223
|
if filename.startswith(f"{codec}_") and f"_{res_name}" in filename:
|
|
221
224
|
test_file_path = os.path.join(test_dir, filename)
|
|
222
225
|
found_file = True
|
|
223
226
|
break
|
|
224
|
-
|
|
227
|
+
|
|
225
228
|
# If no file found, generate one using CPU encoder
|
|
226
229
|
if not found_file:
|
|
227
230
|
cpu_lib = ALL_CODECS[codec]["lib"]
|
|
@@ -237,7 +240,16 @@ def _run_decoder_tests(test_dir):
|
|
|
237
240
|
continue
|
|
238
241
|
|
|
239
242
|
# Run the actual decoder test
|
|
240
|
-
if
|
|
243
|
+
if "vulkan" in hw_decoder:
|
|
244
|
+
command = [
|
|
245
|
+
"ffmpeg", "-loglevel", "quiet", "-hide_banner", "-y",
|
|
246
|
+
"-init_hw_device", "vulkan=vk:0",
|
|
247
|
+
"-hwaccel", "vulkan",
|
|
248
|
+
"-hwaccel_output_format", "vulkan",
|
|
249
|
+
"-i", test_file_path,
|
|
250
|
+
"-f", "null", "null",
|
|
251
|
+
]
|
|
252
|
+
elif hw_decoder in ["dxva2", "d3d11va"] and codec in ["h264", "h265", "vp8"]:
|
|
241
253
|
command = [
|
|
242
254
|
"ffmpeg", "-loglevel", "quiet", "-hide_banner", "-y",
|
|
243
255
|
"-hwaccel", hw_decoder, "-i", test_file_path,
|
|
@@ -251,13 +263,13 @@ def _run_decoder_tests(test_dir):
|
|
|
251
263
|
"-c:v", "libx264", "-preset", "ultrafast",
|
|
252
264
|
"-f", "null", "null",
|
|
253
265
|
]
|
|
254
|
-
|
|
266
|
+
|
|
255
267
|
status = "succeeded" if _run_ffmpeg_command(command) else "failed"
|
|
256
268
|
results[title][res_name] = status
|
|
257
269
|
|
|
258
270
|
if res_name == "240p" and status == "failed":
|
|
259
271
|
skip_rest = True
|
|
260
|
-
|
|
272
|
+
|
|
261
273
|
color_code = GREEN if status == "succeeded" else RED
|
|
262
274
|
print(f" {res_name}: {color_code}{status}{RESET}")
|
|
263
275
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.0.5"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: HwCodecDetect
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.5
|
|
4
4
|
Summary: A cross-platform tool to automatically detect and test hardware video decoders/encoders using FFmpeg.
|
|
5
5
|
Home-page: https://github.com/whyb/HwCodecDetect
|
|
6
6
|
Author: whyb
|
|
@@ -23,6 +23,15 @@ Dynamic: license-file
|
|
|
23
23
|
Dynamic: requires-python
|
|
24
24
|
|
|
25
25
|
# FFmpeg Hardware Codec Test Script(HwCodecDetect)
|
|
26
|
+
<p align="center">
|
|
27
|
+
<a href="https://pypi.org/project/hwcodecdetect">
|
|
28
|
+
<img src="https://badgen.net/pypi/v/hwcodecdetect?color=yellow" />
|
|
29
|
+
</a>
|
|
30
|
+
<a href="https://pypi.org/project/hwcodecdetect">
|
|
31
|
+
<img src="https://static.pepy.tech/badge/hwcodecdetect" />
|
|
32
|
+
</a>
|
|
33
|
+
</p>
|
|
34
|
+
|
|
26
35
|
[中文版](https://github.com/whyb/HwCodecDetect/blob/main/README.zh.md)
|
|
27
36
|
|
|
28
37
|
Today's hardware-accelerated video codec landscape is a "field of a hundred schools of thought." To leverage the immense power of GPUs, hardware manufacturers have introduced their own acceleration frameworks and encoding standards, such as NVIDIA's NVEnc/NVDec, Intel's QSV, and AMD's AMF. Additionally, operating systems provide universal APIs like Microsoft's Media Foundation, DXVA, and D3D12VA, while the open-source community has developed cross-platform standards like VAAPI and Vulkan.
|
|
@@ -52,6 +61,7 @@ The script automatically tests and reports on the following major hardware decod
|
|
|
52
61
|
| AMF (Advanced Media Framework) | H.264、H.265、AV1 |
|
|
53
62
|
| DXVA2 (DirectX Video Acceleration) | H.264、H.265、MJPEG、MPEG-1、MPEG-2、MPEG-4、VP8 |
|
|
54
63
|
| D3D11VA (Direct3D 11 Video Acceleration) | H.264、H.265、AV1、MJPEG、MPEG-1、MPEG-2、MPEG-4、VP8、VP9 |
|
|
64
|
+
| Vulkan | H.264、H.265、AV1 |
|
|
55
65
|
|
|
56
66
|
|
|
57
67
|
## How to Use
|
hwcodecdetect-0.0.4/VERSION
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
0.0.4
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.0.4"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|