HwCodecDetect 0.1.5__tar.gz → 0.1.8__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.1.5/src/HwCodecDetect.egg-info → hwcodecdetect-0.1.8}/PKG-INFO +9 -3
- {hwcodecdetect-0.1.5 → hwcodecdetect-0.1.8}/README.md +8 -2
- hwcodecdetect-0.1.8/VERSION +1 -0
- {hwcodecdetect-0.1.5 → hwcodecdetect-0.1.8}/src/HwCodecDetect/run_tests.py +31 -6
- hwcodecdetect-0.1.8/src/HwCodecDetect/version.py +1 -0
- {hwcodecdetect-0.1.5 → hwcodecdetect-0.1.8/src/HwCodecDetect.egg-info}/PKG-INFO +9 -3
- hwcodecdetect-0.1.5/VERSION +0 -1
- hwcodecdetect-0.1.5/src/HwCodecDetect/version.py +0 -1
- {hwcodecdetect-0.1.5 → hwcodecdetect-0.1.8}/LICENSE +0 -0
- {hwcodecdetect-0.1.5 → hwcodecdetect-0.1.8}/MANIFEST.in +0 -0
- {hwcodecdetect-0.1.5 → hwcodecdetect-0.1.8}/pyproject.toml +0 -0
- {hwcodecdetect-0.1.5 → hwcodecdetect-0.1.8}/requirements.txt +0 -0
- {hwcodecdetect-0.1.5 → hwcodecdetect-0.1.8}/setup.cfg +0 -0
- {hwcodecdetect-0.1.5 → hwcodecdetect-0.1.8}/setup.py +0 -0
- {hwcodecdetect-0.1.5 → hwcodecdetect-0.1.8}/src/HwCodecDetect/__init__.py +0 -0
- {hwcodecdetect-0.1.5 → hwcodecdetect-0.1.8}/src/HwCodecDetect/install_ffmpeg_if_needed.py +0 -0
- {hwcodecdetect-0.1.5 → hwcodecdetect-0.1.8}/src/HwCodecDetect.egg-info/SOURCES.txt +0 -0
- {hwcodecdetect-0.1.5 → hwcodecdetect-0.1.8}/src/HwCodecDetect.egg-info/dependency_links.txt +0 -0
- {hwcodecdetect-0.1.5 → hwcodecdetect-0.1.8}/src/HwCodecDetect.egg-info/entry_points.txt +0 -0
- {hwcodecdetect-0.1.5 → hwcodecdetect-0.1.8}/src/HwCodecDetect.egg-info/requires.txt +0 -0
- {hwcodecdetect-0.1.5 → hwcodecdetect-0.1.8}/src/HwCodecDetect.egg-info/top_level.txt +0 -0
- {hwcodecdetect-0.1.5 → hwcodecdetect-0.1.8}/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.1.
|
|
3
|
+
Version: 0.1.8
|
|
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
|
|
@@ -35,6 +35,9 @@ Dynamic: requires-python
|
|
|
35
35
|
<a href="https://pypi.org/project/hwcodecdetect">
|
|
36
36
|
<img src="https://static.pepy.tech/badge/hwcodecdetect" />
|
|
37
37
|
</a>
|
|
38
|
+
<a href="https://deepwiki.com/whyb/HwCodecDetect">
|
|
39
|
+
<img src="https://img.shields.io/badge/DeepWiki-whyb%2FHwCodecDetect-yellow.svg?logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAAyCAYAAAAnWDnqAAAAAXNSR0IArs4c6QAAA05JREFUaEPtmUtyEzEQhtWTQyQLHNak2AB7ZnyXZMEjXMGeK/AIi+QuHrMnbChYY7MIh8g01fJoopFb0uhhEqqcbWTp06/uv1saEDv4O3n3dV60RfP947Mm9/SQc0ICFQgzfc4CYZoTPAswgSJCCUJUnAAoRHOAUOcATwbmVLWdGoH//PB8mnKqScAhsD0kYP3j/Yt5LPQe2KvcXmGvRHcDnpxfL2zOYJ1mFwrryWTz0advv1Ut4CJgf5uhDuDj5eUcAUoahrdY/56ebRWeraTjMt/00Sh3UDtjgHtQNHwcRGOC98BJEAEymycmYcWwOprTgcB6VZ5JK5TAJ+fXGLBm3FDAmn6oPPjR4rKCAoJCal2eAiQp2x0vxTPB3ALO2CRkwmDy5WohzBDwSEFKRwPbknEggCPB/imwrycgxX2NzoMCHhPkDwqYMr9tRcP5qNrMZHkVnOjRMWwLCcr8ohBVb1OMjxLwGCvjTikrsBOiA6fNyCrm8V1rP93iVPpwaE+gO0SsWmPiXB+jikdf6SizrT5qKasx5j8ABbHpFTx+vFXp9EnYQmLx02h1QTTrl6eDqxLnGjporxl3NL3agEvXdT0WmEost648sQOYAeJS9Q7bfUVoMGnjo4AZdUMQku50McDcMWcBPvr0SzbTAFDfvJqwLzgxwATnCgnp4wDl6Aa+Ax283gghmj+vj7feE2KBBRMW3FzOpLOADl0Isb5587h/U4gGvkt5v60Z1VLG8BhYjbzRwyQZemwAd6cCR5/XFWLYZRIMpX39AR0tjaGGiGzLVyhse5C9RKC6ai42ppWPKiBagOvaYk8lO7DajerabOZP46Lby5wKjw1HCRx7p9sVMOWGzb/vA1hwiWc6jm3MvQDTogQkiqIhJV0nBQBTU+3okKCFDy9WwferkHjtxib7t3xIUQtHxnIwtx4mpg26/HfwVNVDb4oI9RHmx5WGelRVlrtiw43zboCLaxv46AZeB3IlTkwouebTr1y2NjSpHz68WNFjHvupy3q8TFn3Hos2IAk4Ju5dCo8B3wP7VPr/FGaKiG+T+v+TQqIrOqMTL1VdWV1DdmcbO8KXBz6esmYWYKPwDL5b5FA1a0hwapHiom0r/cKaoqr+27/XcrS5UwSMbQAAAABJRU5ErkJggg==" />
|
|
40
|
+
</a>
|
|
38
41
|
</p>
|
|
39
42
|
|
|
40
43
|
[中文版](https://github.com/whyb/HwCodecDetect/blob/main/README.zh.md)
|
|
@@ -126,6 +129,9 @@ Use this method if you have cloned the project source code from GitHub and want
|
|
|
126
129
|
hwcodecdetect
|
|
127
130
|
```
|
|
128
131
|
|
|
129
|
-
##
|
|
132
|
+
## Final effect
|
|
130
133
|
Here are some possible results from a local test run:
|
|
131
|
-

|
|
135
|
+
|
|
136
|
+
## Star History
|
|
137
|
+
[](https://www.star-history.com/#whyb/HwCodecDetect&type=date&legend=top-left)
|
|
@@ -9,6 +9,9 @@
|
|
|
9
9
|
<a href="https://pypi.org/project/hwcodecdetect">
|
|
10
10
|
<img src="https://static.pepy.tech/badge/hwcodecdetect" />
|
|
11
11
|
</a>
|
|
12
|
+
<a href="https://deepwiki.com/whyb/HwCodecDetect">
|
|
13
|
+
<img src="https://img.shields.io/badge/DeepWiki-whyb%2FHwCodecDetect-yellow.svg?logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAAyCAYAAAAnWDnqAAAAAXNSR0IArs4c6QAAA05JREFUaEPtmUtyEzEQhtWTQyQLHNak2AB7ZnyXZMEjXMGeK/AIi+QuHrMnbChYY7MIh8g01fJoopFb0uhhEqqcbWTp06/uv1saEDv4O3n3dV60RfP947Mm9/SQc0ICFQgzfc4CYZoTPAswgSJCCUJUnAAoRHOAUOcATwbmVLWdGoH//PB8mnKqScAhsD0kYP3j/Yt5LPQe2KvcXmGvRHcDnpxfL2zOYJ1mFwrryWTz0advv1Ut4CJgf5uhDuDj5eUcAUoahrdY/56ebRWeraTjMt/00Sh3UDtjgHtQNHwcRGOC98BJEAEymycmYcWwOprTgcB6VZ5JK5TAJ+fXGLBm3FDAmn6oPPjR4rKCAoJCal2eAiQp2x0vxTPB3ALO2CRkwmDy5WohzBDwSEFKRwPbknEggCPB/imwrycgxX2NzoMCHhPkDwqYMr9tRcP5qNrMZHkVnOjRMWwLCcr8ohBVb1OMjxLwGCvjTikrsBOiA6fNyCrm8V1rP93iVPpwaE+gO0SsWmPiXB+jikdf6SizrT5qKasx5j8ABbHpFTx+vFXp9EnYQmLx02h1QTTrl6eDqxLnGjporxl3NL3agEvXdT0WmEost648sQOYAeJS9Q7bfUVoMGnjo4AZdUMQku50McDcMWcBPvr0SzbTAFDfvJqwLzgxwATnCgnp4wDl6Aa+Ax283gghmj+vj7feE2KBBRMW3FzOpLOADl0Isb5587h/U4gGvkt5v60Z1VLG8BhYjbzRwyQZemwAd6cCR5/XFWLYZRIMpX39AR0tjaGGiGzLVyhse5C9RKC6ai42ppWPKiBagOvaYk8lO7DajerabOZP46Lby5wKjw1HCRx7p9sVMOWGzb/vA1hwiWc6jm3MvQDTogQkiqIhJV0nBQBTU+3okKCFDy9WwferkHjtxib7t3xIUQtHxnIwtx4mpg26/HfwVNVDb4oI9RHmx5WGelRVlrtiw43zboCLaxv46AZeB3IlTkwouebTr1y2NjSpHz68WNFjHvupy3q8TFn3Hos2IAk4Ju5dCo8B3wP7VPr/FGaKiG+T+v+TQqIrOqMTL1VdWV1DdmcbO8KXBz6esmYWYKPwDL5b5FA1a0hwapHiom0r/cKaoqr+27/XcrS5UwSMbQAAAABJRU5ErkJggg==" />
|
|
14
|
+
</a>
|
|
12
15
|
</p>
|
|
13
16
|
|
|
14
17
|
[中文版](https://github.com/whyb/HwCodecDetect/blob/main/README.zh.md)
|
|
@@ -100,6 +103,9 @@ Use this method if you have cloned the project source code from GitHub and want
|
|
|
100
103
|
hwcodecdetect
|
|
101
104
|
```
|
|
102
105
|
|
|
103
|
-
##
|
|
106
|
+
## Final effect
|
|
104
107
|
Here are some possible results from a local test run:
|
|
105
|
-

|
|
109
|
+
|
|
110
|
+
## Star History
|
|
111
|
+
[](https://www.star-history.com/#whyb/HwCodecDetect&type=date&legend=top-left)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
0.1.8
|
|
@@ -230,8 +230,8 @@ if available_memory > 0:
|
|
|
230
230
|
# Estimate based on available memory (assume each ffmpeg's process needs 256MB)
|
|
231
231
|
CONCURRENT_ENCODER_COUNT = max(1, available_memory_mb // 256)
|
|
232
232
|
CONCURRENT_DECODER_COUNT = max(1, available_memory_mb // 256)
|
|
233
|
-
CONCURRENT_ENCODER_COUNT = min(CONCURRENT_ENCODER_COUNT,
|
|
234
|
-
CONCURRENT_DECODER_COUNT = min(CONCURRENT_DECODER_COUNT,
|
|
233
|
+
CONCURRENT_ENCODER_COUNT = min(CONCURRENT_ENCODER_COUNT, 8)
|
|
234
|
+
CONCURRENT_DECODER_COUNT = min(CONCURRENT_DECODER_COUNT, 8)
|
|
235
235
|
|
|
236
236
|
|
|
237
237
|
def _run_ffmpeg_command(command, verbose):
|
|
@@ -271,6 +271,20 @@ def _run_encoder_test_single(test_data):
|
|
|
271
271
|
"-c:v", encoder,
|
|
272
272
|
output_file,
|
|
273
273
|
]
|
|
274
|
+
elif "d3d12va" in encoder:
|
|
275
|
+
command = [
|
|
276
|
+
"ffmpeg",
|
|
277
|
+
"-loglevel", "quiet",
|
|
278
|
+
"-hide_banner",
|
|
279
|
+
"-y",
|
|
280
|
+
"-init_hw_device", "d3d12va:0",
|
|
281
|
+
"-f", "lavfi",
|
|
282
|
+
"-i", f"color=white:s={res_size}:d=1",
|
|
283
|
+
"-frames:v", "1",
|
|
284
|
+
"-vf", "format=nv12,hwupload",
|
|
285
|
+
"-c:v", encoder,
|
|
286
|
+
output_file,
|
|
287
|
+
]
|
|
274
288
|
else:
|
|
275
289
|
command = [
|
|
276
290
|
"ffmpeg",
|
|
@@ -295,6 +309,14 @@ def _run_encoder_test_single(test_data):
|
|
|
295
309
|
success, stdout, stderr = _run_ffmpeg_command(command, verbose)
|
|
296
310
|
status = "succeeded" if success else "failed"
|
|
297
311
|
|
|
312
|
+
# If encoding failed, clean up the output file so decoder tests don't try to use a corrupt file
|
|
313
|
+
if not success and os.path.exists(output_file):
|
|
314
|
+
try:
|
|
315
|
+
os.remove(output_file)
|
|
316
|
+
except OSError:
|
|
317
|
+
pass
|
|
318
|
+
|
|
319
|
+
|
|
298
320
|
if verbose:
|
|
299
321
|
info_str = f"codec: {codec}, encoder: {encoder}, resolution: {res_size}, status: {status}"
|
|
300
322
|
command_str = " ".join(shlex.quote(arg) for arg in command)
|
|
@@ -354,9 +376,12 @@ def _run_decoder_test_single(test_data):
|
|
|
354
376
|
found_file = False
|
|
355
377
|
for filename in os.listdir(test_dir):
|
|
356
378
|
if filename.startswith(f"{codec}_") and f"_{res_name}" in filename:
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
379
|
+
candidate_path = os.path.join(test_dir, filename)
|
|
380
|
+
# Ensure the file is valid (at least has some content)
|
|
381
|
+
if os.path.exists(candidate_path) and os.path.getsize(candidate_path) > 0:
|
|
382
|
+
test_file_path = candidate_path
|
|
383
|
+
found_file = True
|
|
384
|
+
break
|
|
360
385
|
|
|
361
386
|
if not found_file:
|
|
362
387
|
cpu_lib = ALL_CODECS[codec]["lib"]
|
|
@@ -386,7 +411,7 @@ def _run_decoder_test_single(test_data):
|
|
|
386
411
|
"-i", test_file_path,
|
|
387
412
|
"-f", "null", "null",
|
|
388
413
|
]
|
|
389
|
-
elif hw_decoder in ["dxva2", "d3d11va"] and codec in ["h264", "h265", "vp8"]:
|
|
414
|
+
elif hw_decoder in ["dxva2", "d3d11va"] and codec in ["h264", "h265", "vp8", "vp9", "av1", "mjpeg", "mpeg1", "mpeg2", "mpeg4"]:
|
|
390
415
|
command = [
|
|
391
416
|
"ffmpeg", "-loglevel", "quiet", "-hide_banner", "-y",
|
|
392
417
|
"-hwaccel", hw_decoder, "-i", test_file_path,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.1.8"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: HwCodecDetect
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.8
|
|
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
|
|
@@ -35,6 +35,9 @@ Dynamic: requires-python
|
|
|
35
35
|
<a href="https://pypi.org/project/hwcodecdetect">
|
|
36
36
|
<img src="https://static.pepy.tech/badge/hwcodecdetect" />
|
|
37
37
|
</a>
|
|
38
|
+
<a href="https://deepwiki.com/whyb/HwCodecDetect">
|
|
39
|
+
<img src="https://img.shields.io/badge/DeepWiki-whyb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Tr1y2NjSpHz68WNFjHvupy3q8TFn3Hos2IAk4Ju5dCo8B3wP7VPr/FGaKiG+T+v+TQqIrOqMTL1VdWV1DdmcbO8KXBz6esmYWYKPwDL5b5FA1a0hwapHiom0r/cKaoqr+27/XcrS5UwSMbQAAAABJRU5ErkJggg==" />
|
|
40
|
+
</a>
|
|
38
41
|
</p>
|
|
39
42
|
|
|
40
43
|
[中文版](https://github.com/whyb/HwCodecDetect/blob/main/README.zh.md)
|
|
@@ -126,6 +129,9 @@ Use this method if you have cloned the project source code from GitHub and want
|
|
|
126
129
|
hwcodecdetect
|
|
127
130
|
```
|
|
128
131
|
|
|
129
|
-
##
|
|
132
|
+
## Final effect
|
|
130
133
|
Here are some possible results from a local test run:
|
|
131
|
-

|
|
135
|
+
|
|
136
|
+
## Star History
|
|
137
|
+
[](https://www.star-history.com/#whyb/HwCodecDetect&type=date&legend=top-left)
|
hwcodecdetect-0.1.5/VERSION
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
0.1.5
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.1.5"
|
|
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
|
|
File without changes
|
|
File without changes
|