Skip to main content

Get and save custom variables "to" a usb video device

Project description

XPVI (0.0.4)

Cross Platform Video Info

Get and save custom system-wide variables "to" a usb video device or filepath.

Also works with audio devices, very useful for saving calibration data.

Can also get a device index from it's name and vice-versa.

Install

You will get an error if not admin,

but assuming you are an admin...

=> pip install XPVI

Docs

=> XPVI(.bat or .sh)

...

syntax:

v* (get_all_video_devices)

a* (get_all_audio_devices)

v2i name (get_id_from_video_device)

a2i name (get_id_from_audio_device)

i2v id (get_video_device_from_id)

i2a id (get_audio_device_from_id)

set name key value (set_value)

set name key "NULL" (delete_key)

get name key (get_value)

get name "ALL" (get_values)

Error Handling

Not everyone has FFMPEG, but it's required for this to work.

So in every app that calls the XPVI cli (which is the only official way to interface with it),

it should first call XPVI itself and check if the word "syntax" is contained

(case may change in the future, so check should be case-insensitive)...

If it contains it, there were no errors.

Otherwise, there was an error in the installation

(maybe FFMPEG is missing for example, but we can't be sure)

and so we need to show a message box with the XPVI command's output.

Example

=> XPVI.bat v*

...

[(0, 'c922 Pro Stream Webcam'), (1, 'OBS Virtual Camera')]

Now we know that 'c922 Pro Stream Webcam' is our video device...

=> XPVI.bat v2i "c922 Pro Stream Webcam"

...

0

INDEX = XPVI command output

#Great! We finally have a way to use a specific camera with opencv!

cap = cv2.VideoCapture(INDEX)

... (INSERT CAMERA CALIBRATION CODE) ...

=> XPVI.bat set "c922 Pro Stream Webcam" fx (INSERT FOCAL X DATA)

...

=> XPVI.bat get "c922 Pro Stream Webcam" fx

...

(INSERT FOCAL X DATA)

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

XPVI-0.0.4.tar.gz (4.3 kB view details)

Uploaded Source

File details

Details for the file XPVI-0.0.4.tar.gz.

File metadata

  • Download URL: XPVI-0.0.4.tar.gz
  • Upload date:
  • Size: 4.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.0

File hashes

Hashes for XPVI-0.0.4.tar.gz
Algorithm Hash digest
SHA256 bc83bb49e7e2ba073d627768eb6c072eacc0a7f944c3bb88ed8f95954b54515d
MD5 691a65a0a07bc00e975a90d3ab064c3c
BLAKE2b-256 1308e958cae655a303362cbd7232c2705ce8c83513b91baf557ac8b45d2a1079

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page