Get list of Capture Devices easily with Directshow and Python
Project description
capture-device-list
Simplest way to connect DirectShow Windows API with FFmpeg and list all capture devices with alternative names. The user can save the results to a file or print either “videoâ€, “audioâ€, or both “audio, video†devices.
Screenshots
Setting Options
Parameter | Values | Description | Type |
---|---|---|---|
device_type | 'audio' , 'video', 'audio_video' |
Device Type | str |
alt_name | True , False |
Show alternative name | bool |
result_ | True , False |
Return result | bool |
list_all | True , False |
Show all devices | bool |
save | True , False |
Save result to text | bool |
Setting Arguments
Description | Values |
---|---|
Only audio devices | '-audio', '-a' |
Only video devices | '-video', '-v' |
Only audio and video devices | '-audio_video', '-av' |
Show alternative names | '-alternative', '-alt' |
Show all devices | '-list_all', '-l' |
Save to text | '-save', '-s' |
Build
To build this project, follow these commands
git clone https://github.com/egemengulpinar/capture-device-list.git
cd capture-device-list
python setup.py sdist bdist_wheel
Usage with Arguments
First clone the repo and go to directory. After, based on arguments table, follow the syntax below.
python capture_devices.py -list_all -save
# or
python capture_devices.py -audio -alternative -save
Usage with pip
First install the packages using with pip
pip install capture-devices
After, you can import package similarly:
from capture_devices import devices
For using this library, follow these structure:
result = devices.run_with_param(device_type='audio', alt_name=True,result_= True)
print(result)
# or
devices.run_with_param(alt_name=True,list_all=True)
License
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
capture_devices-4.1.tar.gz
(5.3 kB
view hashes)
Built Distribution
Close
Hashes for capture_devices-4.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | aee6b313fd0f25ba498471526433a302117df8fd1f5b8c8b1875179cce536c43 |
|
MD5 | bf9183b48077233cee868f2338e8c4a8 |
|
BLAKE2b-256 | 3ead06cc4a00cd34e7b83a27cacd844e0ddc389c21387d6e234abc680add1f9a |