HwCodecDetect 0.1.3__tar.gz → 0.1.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.1.3/src/HwCodecDetect.egg-info → hwcodecdetect-0.1.5}/PKG-INFO +30 -9
- {hwcodecdetect-0.1.3 → hwcodecdetect-0.1.5}/README.md +28 -8
- hwcodecdetect-0.1.5/VERSION +1 -0
- hwcodecdetect-0.1.3/src/HwCodecDetect.egg-info/requires.txt → hwcodecdetect-0.1.5/requirements.txt +1 -0
- {hwcodecdetect-0.1.3 → hwcodecdetect-0.1.5}/src/HwCodecDetect/run_tests.py +37 -17
- hwcodecdetect-0.1.5/src/HwCodecDetect/version.py +1 -0
- {hwcodecdetect-0.1.3 → hwcodecdetect-0.1.5/src/HwCodecDetect.egg-info}/PKG-INFO +30 -9
- hwcodecdetect-0.1.5/src/HwCodecDetect.egg-info/requires.txt +3 -0
- hwcodecdetect-0.1.3/VERSION +0 -1
- hwcodecdetect-0.1.3/requirements.txt +0 -2
- hwcodecdetect-0.1.3/src/HwCodecDetect/version.py +0 -1
- {hwcodecdetect-0.1.3 → hwcodecdetect-0.1.5}/LICENSE +0 -0
- {hwcodecdetect-0.1.3 → hwcodecdetect-0.1.5}/MANIFEST.in +0 -0
- {hwcodecdetect-0.1.3 → hwcodecdetect-0.1.5}/pyproject.toml +0 -0
- {hwcodecdetect-0.1.3 → hwcodecdetect-0.1.5}/setup.cfg +0 -0
- {hwcodecdetect-0.1.3 → hwcodecdetect-0.1.5}/setup.py +0 -0
- {hwcodecdetect-0.1.3 → hwcodecdetect-0.1.5}/src/HwCodecDetect/__init__.py +0 -0
- {hwcodecdetect-0.1.3 → hwcodecdetect-0.1.5}/src/HwCodecDetect/install_ffmpeg_if_needed.py +0 -0
- {hwcodecdetect-0.1.3 → hwcodecdetect-0.1.5}/src/HwCodecDetect.egg-info/SOURCES.txt +0 -0
- {hwcodecdetect-0.1.3 → hwcodecdetect-0.1.5}/src/HwCodecDetect.egg-info/dependency_links.txt +0 -0
- {hwcodecdetect-0.1.3 → hwcodecdetect-0.1.5}/src/HwCodecDetect.egg-info/entry_points.txt +0 -0
- {hwcodecdetect-0.1.3 → hwcodecdetect-0.1.5}/src/HwCodecDetect.egg-info/top_level.txt +0 -0
- {hwcodecdetect-0.1.3 → hwcodecdetect-0.1.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.1.
|
|
3
|
+
Version: 0.1.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
|
|
@@ -18,6 +18,7 @@ Description-Content-Type: text/markdown
|
|
|
18
18
|
License-File: LICENSE
|
|
19
19
|
Requires-Dist: colorama
|
|
20
20
|
Requires-Dist: tqdm
|
|
21
|
+
Requires-Dist: psutil
|
|
21
22
|
Dynamic: author
|
|
22
23
|
Dynamic: home-page
|
|
23
24
|
Dynamic: license-file
|
|
@@ -76,22 +77,42 @@ You can install and use HwCodecDetect in two ways.
|
|
|
76
77
|
### Method 1: Install via PyPI (Recommended)
|
|
77
78
|
This is the easiest method if you just want to use the tool quickly.
|
|
78
79
|
|
|
79
|
-
1. Install: Use pip to install
|
|
80
|
+
1. Install: Use pip to install hwcodecdetect from the [official PyPI repository](https://pypi.org/project/hwcodecdetect).
|
|
80
81
|
```bash
|
|
81
|
-
pip install
|
|
82
|
+
pip install hwcodecdetect
|
|
82
83
|
```
|
|
83
84
|
|
|
84
|
-
2. Run: After installation, run the
|
|
85
|
+
2. Run: After installation, run the hwcodecdetect command directly from your terminal.
|
|
85
86
|
```bash
|
|
86
|
-
|
|
87
|
+
hwcodecdetect
|
|
87
88
|
```
|
|
88
89
|
|
|
89
|
-
### Method 2:
|
|
90
|
+
### Method 2: Download and Run Executable (Standalone)
|
|
91
|
+
Use this method if you prefer to run the tool without installing Python dependencies, or if the PyPI installation fails.
|
|
92
|
+
|
|
93
|
+
1. Download: Go to the project's [**Releases page**](https://github.com/whyb/HwCodecDetect/releases) and download the executable file corresponding to your operating system (e.g., `HwCodecDetect-Linux-x64`, `HwCodecDetect-Windows-x64.exe`).
|
|
94
|
+
|
|
95
|
+
2. (Linux/macOS only) Add Execute Permission: If you are on Linux or macOS, you need to grant the downloaded file execute permission.
|
|
96
|
+
```bash
|
|
97
|
+
# Replace 'HwCodecDetect-Linux-x64' with the actual downloaded filename
|
|
98
|
+
chmod +x HwCodecDetect-Linux-x64
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
3. Run: Execute the file directly from your terminal.
|
|
102
|
+
```bash
|
|
103
|
+
# For Linux/macOS
|
|
104
|
+
./HwCodecDetect-Linux-x64
|
|
105
|
+
|
|
106
|
+
# For Windows (e.g., in PowerShell or Command Prompt)
|
|
107
|
+
.\HwCodecDetect-Windows-x64.exe
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
### Method 3: Install from Source
|
|
90
111
|
Use this method if you have cloned the project source code from GitHub and want to run it locally.
|
|
91
112
|
|
|
92
113
|
1. Clone the repository: First, clone the project source code to your local machine.
|
|
93
114
|
```bash
|
|
94
|
-
git clone https://github.com/whyb/HwCodecDetect.git
|
|
115
|
+
git clone https://github.com/whyb/HwCodecDetect.git ./HwCodecDetect
|
|
95
116
|
```
|
|
96
117
|
|
|
97
118
|
2. Install dependencies: Navigate into the project's root directory and use pip to install the required dependencies.
|
|
@@ -100,9 +121,9 @@ Use this method if you have cloned the project source code from GitHub and want
|
|
|
100
121
|
pip install .
|
|
101
122
|
```
|
|
102
123
|
|
|
103
|
-
3. Run: After the installation is complete, run the
|
|
124
|
+
3. Run: After the installation is complete, run the hwcodecdetect command directly.
|
|
104
125
|
```bash
|
|
105
|
-
|
|
126
|
+
hwcodecdetect
|
|
106
127
|
```
|
|
107
128
|
|
|
108
129
|
## Demo
|
|
@@ -51,22 +51,42 @@ You can install and use HwCodecDetect in two ways.
|
|
|
51
51
|
### Method 1: Install via PyPI (Recommended)
|
|
52
52
|
This is the easiest method if you just want to use the tool quickly.
|
|
53
53
|
|
|
54
|
-
1. Install: Use pip to install
|
|
54
|
+
1. Install: Use pip to install hwcodecdetect from the [official PyPI repository](https://pypi.org/project/hwcodecdetect).
|
|
55
55
|
```bash
|
|
56
|
-
pip install
|
|
56
|
+
pip install hwcodecdetect
|
|
57
57
|
```
|
|
58
58
|
|
|
59
|
-
2. Run: After installation, run the
|
|
59
|
+
2. Run: After installation, run the hwcodecdetect command directly from your terminal.
|
|
60
60
|
```bash
|
|
61
|
-
|
|
61
|
+
hwcodecdetect
|
|
62
62
|
```
|
|
63
63
|
|
|
64
|
-
### Method 2:
|
|
64
|
+
### Method 2: Download and Run Executable (Standalone)
|
|
65
|
+
Use this method if you prefer to run the tool without installing Python dependencies, or if the PyPI installation fails.
|
|
66
|
+
|
|
67
|
+
1. Download: Go to the project's [**Releases page**](https://github.com/whyb/HwCodecDetect/releases) and download the executable file corresponding to your operating system (e.g., `HwCodecDetect-Linux-x64`, `HwCodecDetect-Windows-x64.exe`).
|
|
68
|
+
|
|
69
|
+
2. (Linux/macOS only) Add Execute Permission: If you are on Linux or macOS, you need to grant the downloaded file execute permission.
|
|
70
|
+
```bash
|
|
71
|
+
# Replace 'HwCodecDetect-Linux-x64' with the actual downloaded filename
|
|
72
|
+
chmod +x HwCodecDetect-Linux-x64
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
3. Run: Execute the file directly from your terminal.
|
|
76
|
+
```bash
|
|
77
|
+
# For Linux/macOS
|
|
78
|
+
./HwCodecDetect-Linux-x64
|
|
79
|
+
|
|
80
|
+
# For Windows (e.g., in PowerShell or Command Prompt)
|
|
81
|
+
.\HwCodecDetect-Windows-x64.exe
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
### Method 3: Install from Source
|
|
65
85
|
Use this method if you have cloned the project source code from GitHub and want to run it locally.
|
|
66
86
|
|
|
67
87
|
1. Clone the repository: First, clone the project source code to your local machine.
|
|
68
88
|
```bash
|
|
69
|
-
git clone https://github.com/whyb/HwCodecDetect.git
|
|
89
|
+
git clone https://github.com/whyb/HwCodecDetect.git ./HwCodecDetect
|
|
70
90
|
```
|
|
71
91
|
|
|
72
92
|
2. Install dependencies: Navigate into the project's root directory and use pip to install the required dependencies.
|
|
@@ -75,9 +95,9 @@ Use this method if you have cloned the project source code from GitHub and want
|
|
|
75
95
|
pip install .
|
|
76
96
|
```
|
|
77
97
|
|
|
78
|
-
3. Run: After the installation is complete, run the
|
|
98
|
+
3. Run: After the installation is complete, run the hwcodecdetect command directly.
|
|
79
99
|
```bash
|
|
80
|
-
|
|
100
|
+
hwcodecdetect
|
|
81
101
|
```
|
|
82
102
|
|
|
83
103
|
## Demo
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
0.1.5
|
|
@@ -225,7 +225,7 @@ CONCURRENT_ENCODER_COUNT = 8
|
|
|
225
225
|
CONCURRENT_DECODER_COUNT = 16
|
|
226
226
|
available_memory = get_available_memory()
|
|
227
227
|
available_memory_mb = available_memory / (1024 * 1024)
|
|
228
|
-
print(f"Current available system memory is {available_memory_mb:.2f} MB.")
|
|
228
|
+
#print(f"Current available system memory is {available_memory_mb:.2f} MB.")
|
|
229
229
|
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)
|
|
@@ -257,19 +257,33 @@ def _run_encoder_test_single(test_data):
|
|
|
257
257
|
codec, encoder, res_name, res_size, test_dir, verbose = test_data
|
|
258
258
|
file_ext = ".webm" if codec in ["vp8", "vp9"] else ".mp4"
|
|
259
259
|
output_file = os.path.join(test_dir, f"{encoder}_{res_name}{file_ext}")
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
260
|
+
if "vulkan" in encoder:
|
|
261
|
+
command = [
|
|
262
|
+
"ffmpeg",
|
|
263
|
+
"-loglevel", "quiet",
|
|
264
|
+
"-hide_banner",
|
|
265
|
+
"-y",
|
|
266
|
+
"-init_hw_device", "vulkan=vk:0",
|
|
267
|
+
"-f", "lavfi",
|
|
268
|
+
"-i", f"color=white:s={res_size}:d=1",
|
|
269
|
+
"-frames:v", "1",
|
|
270
|
+
"-vf", "format=nv12,hwupload,format=vulkan",
|
|
271
|
+
"-c:v", encoder,
|
|
272
|
+
output_file,
|
|
273
|
+
]
|
|
274
|
+
else:
|
|
275
|
+
command = [
|
|
276
|
+
"ffmpeg",
|
|
277
|
+
"-loglevel", "quiet",
|
|
278
|
+
"-hide_banner",
|
|
279
|
+
"-y",
|
|
280
|
+
"-f", "lavfi",
|
|
281
|
+
"-i", f"color=white:s={res_size}:d=1",
|
|
282
|
+
"-frames:v", "1",
|
|
283
|
+
"-c:v", encoder,
|
|
284
|
+
"-pixel_format", "yuv420p",
|
|
285
|
+
output_file,
|
|
286
|
+
]
|
|
273
287
|
|
|
274
288
|
if "qsv" in encoder:
|
|
275
289
|
command.insert(9, "-dual_gfx")
|
|
@@ -541,7 +555,12 @@ def run_all_tests(args):
|
|
|
541
555
|
print("Cleanup complete.")
|
|
542
556
|
|
|
543
557
|
return
|
|
544
|
-
|
|
558
|
+
|
|
559
|
+
def get_resource_path(relative_path):
|
|
560
|
+
if hasattr(sys, '_MEIPASS'):
|
|
561
|
+
return os.path.join(sys._MEIPASS, relative_path)
|
|
562
|
+
return os.path.join(os.path.abspath("."), relative_path)
|
|
563
|
+
|
|
545
564
|
def main():
|
|
546
565
|
"""Parses arguments and runs the test suite."""
|
|
547
566
|
|
|
@@ -578,9 +597,10 @@ def main():
|
|
|
578
597
|
)
|
|
579
598
|
|
|
580
599
|
try:
|
|
581
|
-
|
|
600
|
+
version_file_path = get_resource_path("VERSION")
|
|
601
|
+
with open(version_file_path, "r", encoding="utf-8") as f:
|
|
582
602
|
version_str = f.read().strip()
|
|
583
|
-
except
|
|
603
|
+
except Exception:
|
|
584
604
|
version_str = "Unknown"
|
|
585
605
|
|
|
586
606
|
parser.add_argument(
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.1.5"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: HwCodecDetect
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.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
|
|
@@ -18,6 +18,7 @@ Description-Content-Type: text/markdown
|
|
|
18
18
|
License-File: LICENSE
|
|
19
19
|
Requires-Dist: colorama
|
|
20
20
|
Requires-Dist: tqdm
|
|
21
|
+
Requires-Dist: psutil
|
|
21
22
|
Dynamic: author
|
|
22
23
|
Dynamic: home-page
|
|
23
24
|
Dynamic: license-file
|
|
@@ -76,22 +77,42 @@ You can install and use HwCodecDetect in two ways.
|
|
|
76
77
|
### Method 1: Install via PyPI (Recommended)
|
|
77
78
|
This is the easiest method if you just want to use the tool quickly.
|
|
78
79
|
|
|
79
|
-
1. Install: Use pip to install
|
|
80
|
+
1. Install: Use pip to install hwcodecdetect from the [official PyPI repository](https://pypi.org/project/hwcodecdetect).
|
|
80
81
|
```bash
|
|
81
|
-
pip install
|
|
82
|
+
pip install hwcodecdetect
|
|
82
83
|
```
|
|
83
84
|
|
|
84
|
-
2. Run: After installation, run the
|
|
85
|
+
2. Run: After installation, run the hwcodecdetect command directly from your terminal.
|
|
85
86
|
```bash
|
|
86
|
-
|
|
87
|
+
hwcodecdetect
|
|
87
88
|
```
|
|
88
89
|
|
|
89
|
-
### Method 2:
|
|
90
|
+
### Method 2: Download and Run Executable (Standalone)
|
|
91
|
+
Use this method if you prefer to run the tool without installing Python dependencies, or if the PyPI installation fails.
|
|
92
|
+
|
|
93
|
+
1. Download: Go to the project's [**Releases page**](https://github.com/whyb/HwCodecDetect/releases) and download the executable file corresponding to your operating system (e.g., `HwCodecDetect-Linux-x64`, `HwCodecDetect-Windows-x64.exe`).
|
|
94
|
+
|
|
95
|
+
2. (Linux/macOS only) Add Execute Permission: If you are on Linux or macOS, you need to grant the downloaded file execute permission.
|
|
96
|
+
```bash
|
|
97
|
+
# Replace 'HwCodecDetect-Linux-x64' with the actual downloaded filename
|
|
98
|
+
chmod +x HwCodecDetect-Linux-x64
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
3. Run: Execute the file directly from your terminal.
|
|
102
|
+
```bash
|
|
103
|
+
# For Linux/macOS
|
|
104
|
+
./HwCodecDetect-Linux-x64
|
|
105
|
+
|
|
106
|
+
# For Windows (e.g., in PowerShell or Command Prompt)
|
|
107
|
+
.\HwCodecDetect-Windows-x64.exe
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
### Method 3: Install from Source
|
|
90
111
|
Use this method if you have cloned the project source code from GitHub and want to run it locally.
|
|
91
112
|
|
|
92
113
|
1. Clone the repository: First, clone the project source code to your local machine.
|
|
93
114
|
```bash
|
|
94
|
-
git clone https://github.com/whyb/HwCodecDetect.git
|
|
115
|
+
git clone https://github.com/whyb/HwCodecDetect.git ./HwCodecDetect
|
|
95
116
|
```
|
|
96
117
|
|
|
97
118
|
2. Install dependencies: Navigate into the project's root directory and use pip to install the required dependencies.
|
|
@@ -100,9 +121,9 @@ Use this method if you have cloned the project source code from GitHub and want
|
|
|
100
121
|
pip install .
|
|
101
122
|
```
|
|
102
123
|
|
|
103
|
-
3. Run: After the installation is complete, run the
|
|
124
|
+
3. Run: After the installation is complete, run the hwcodecdetect command directly.
|
|
104
125
|
```bash
|
|
105
|
-
|
|
126
|
+
hwcodecdetect
|
|
106
127
|
```
|
|
107
128
|
|
|
108
129
|
## Demo
|
hwcodecdetect-0.1.3/VERSION
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
0.1.3
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.1.3"
|
|
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
|