From e1167b82301dc487a91a771dea80e5aac70afcb4 Mon Sep 17 00:00:00 2001 From: abhiTronix Date: Wed, 27 Oct 2021 10:07:50 +0530 Subject: [PATCH 01/25] =?UTF-8?q?=E2=9A=A1=EF=B8=8F=20Setup.py:=20Added=20?= =?UTF-8?q?rule=20to=20replace=20GitHub=20heading=20links=20in=20descripti?= =?UTF-8?q?on.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - ✏️ Docs: Fixed GitHub links. --- README.md | 4 ++-- setup.py | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index db35bf03a..19ab946a6 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ limitations under the License.
-[Releases][release]   |   [Gears][gears]   |   [Documentation][docs]   |   [Installation][installation]   |   [License](#license) +[Releases][release]   |   [Gears][gears]   |   [Documentation][docs]   |   [Installation][installation]   |   [License](#copyright) [![Build Status][github-cli]][github-flow] [![Codecov branch][codecov]][code] [![Azure DevOps builds (branch)][azure-badge]][azure-pipeline] @@ -618,7 +618,7 @@ NetGear_Async provides complete server-client handling and options to use variab NetGear_Async now supports additional [**bidirectional data transmission**][btm_netgear_async] between receiver(client) and sender(server) while transferring video-frames. Users can easily build complex applications such as like [Real-Time Video Chat][rtvc] in just few lines of code. -NetGear_Async as of now supports [all four ZeroMQ messaging patterns](#attributes-and-parameters-wrench): +NetGear_Async as of now supports all four ZeroMQ messaging patterns: * [**`zmq.PAIR`**][zmq-pair] _(ZMQ Pair Pattern)_ * [**`zmq.REQ/zmq.REP`**][zmq-req-rep] _(ZMQ Request/Reply Pattern)_ * [**`zmq.PUB/zmq.SUB`**][zmq-pub-sub] _(ZMQ Publish/Subscribe Pattern)_ diff --git a/setup.py b/setup.py index 08c01e8cd..9693839b7 100644 --- a/setup.py +++ b/setup.py @@ -79,6 +79,9 @@ def latest_version(package_name): long_description = long_description.replace( # patch for images "docs/overrides/assets", "https://abhitronix.github.io/vidgear/latest/assets" ) + long_description = long_description.replace( + "(#", "(https://github.com/abhiTronix/vidgear#" + ) # patch for unicodes long_description = long_description.replace("➶", ">>") long_description = long_description.replace("©", "(c)") From 738d90914d1136b1462bbb00e3dda3d654092f72 Mon Sep 17 00:00:00 2001 From: abhiTronix Date: Mon, 1 Nov 2021 10:22:32 +0530 Subject: [PATCH 02/25] =?UTF-8?q?=F0=9F=93=9D=20Docs:=20Fixed=20typos,=20l?= =?UTF-8?q?ine-endings=20and=20example=20code.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/FUNDING.yml | 2 +- .github/ISSUE_TEMPLATE/bug_report.md | 134 ++++++------ .github/ISSUE_TEMPLATE/proposal.md | 58 ++--- .github/ISSUE_TEMPLATE/question.md | 84 ++++---- .github/PULL_REQUEST_TEMPLATE.md | 68 +++--- .github/config.yml | 38 ++-- codecov.yml | 70 +++--- contributing.md | 204 +++++++++--------- .../netgear/advanced/bidirectional_mode.md | 2 +- docs/gears/netgear/advanced/compression.md | 2 +- docs/gears/netgear/advanced/multi_client.md | 6 +- docs/gears/netgear/advanced/multi_server.md | 6 +- docs/gears/netgear/advanced/secure_mode.md | 2 +- docs/gears/netgear/usage.md | 6 +- .../advanced/bidirectional_mode.md | 2 +- docs/gears/netgear_async/usage.md | 2 +- docs/help/netgear_ex.md | 4 +- docs/help/stabilizer_ex.md | 22 +- docs/overrides/assets/README.md | 16 +- setup.cfg | 28 +-- 20 files changed, 377 insertions(+), 379 deletions(-) diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml index 26d6f75be..566711e4a 100644 --- a/.github/FUNDING.yml +++ b/.github/FUNDING.yml @@ -1,2 +1,2 @@ -ko_fi: abhitronix +ko_fi: abhitronix liberapay: abhiTronix \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 44fd156b5..d7dc437eb 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -1,68 +1,68 @@ ---- -name: Bug report -about: Create a bug-report for VidGear -labels: ':beetle: BUG' -assignees: 'abhiTronix' ---- - - - -## Description - - -_Kindly explain the issue here._ - - -### Acknowledgment - - - -- [ ] I have searched the [issues](https://github.com/abhiTronix/vidgear/issues) for my issue and found nothing related or helpful. -- [ ] I have read the [Documentation](https://abhitronix.github.io/vidgear/latest). -- [ ] I have read the [Issue Guidelines](https://abhitronix.github.io/vidgear/latest/contribution/issue/#submitting-an-issue-guidelines). - - -### Environment - - -* VidGear version: -* Branch: -* Python version: -* PiP version: -* Operating System and version: - -### Expected Behavior - - -### Actual Behavior - - - -### Possible Fix - - -### Steps to reproduce - - - -(Write your steps here:) - -1. -2. -3. - - -### Optional +--- +name: Bug report +about: Create a bug-report for VidGear +labels: ':beetle: BUG' +assignees: 'abhiTronix' +--- + + + +## Description + + +_Kindly explain the issue here._ + + +### Acknowledgment + + + +- [ ] I have searched the [issues](https://github.com/abhiTronix/vidgear/issues) for my issue and found nothing related or helpful. +- [ ] I have read the [Documentation](https://abhitronix.github.io/vidgear/latest). +- [ ] I have read the [Issue Guidelines](https://abhitronix.github.io/vidgear/latest/contribution/issue/#submitting-an-issue-guidelines). + + +### Environment + + +* VidGear version: +* Branch: +* Python version: +* PiP version: +* Operating System and version: + +### Expected Behavior + + +### Actual Behavior + + + +### Possible Fix + + +### Steps to reproduce + + + +(Write your steps here:) + +1. +2. +3. + + +### Optional \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/proposal.md b/.github/ISSUE_TEMPLATE/proposal.md index a75eefaa4..fa951c500 100644 --- a/.github/ISSUE_TEMPLATE/proposal.md +++ b/.github/ISSUE_TEMPLATE/proposal.md @@ -1,30 +1,30 @@ ---- -name: Proposal -about: Suggest an idea for improving VidGear -labels: 'PROPOSAL :envelope_with_arrow:' ---- - - - -## Detailed Description - - -_Kindly explain the issue here._ - - -### Context - - - - - -### Your Current Environment - -* VidGear version: -* Branch: -* Python version: -* Operating System and version: - - -### Any Other Important Information +--- +name: Proposal +about: Suggest an idea for improving VidGear +labels: 'PROPOSAL :envelope_with_arrow:' +--- + + + +## Detailed Description + + +_Kindly explain the issue here._ + + +### Context + + + + + +### Your Current Environment + +* VidGear version: +* Branch: +* Python version: +* Operating System and version: + + +### Any Other Important Information \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/question.md b/.github/ISSUE_TEMPLATE/question.md index 3da69a789..83da1e007 100644 --- a/.github/ISSUE_TEMPLATE/question.md +++ b/.github/ISSUE_TEMPLATE/question.md @@ -1,43 +1,43 @@ ---- -name: Question -about: Have any questions regarding VidGear? -labels: 'QUESTION :question:' ---- - - - - -## Question - - -_Kindly describe the issue here._ - - -### Acknowledgment - - - -- [ ] I have searched the [issues](https://github.com/abhiTronix/vidgear/issues) for my issue and found nothing related or helpful. -- [ ] I have read the [FAQs](https://abhitronix.github.io/vidgear/latest/help/get_help/#frequently-asked-questions). -- [ ] I have read the [Documentation](https://abhitronix.github.io/vidgear/latest). - - - -### Context - - - - - - -### Your Environment - -* VidGear version: -* Branch: -* Python version: -* PiP version: -* Operating System and version: - - -### Optional +--- +name: Question +about: Have any questions regarding VidGear? +labels: 'QUESTION :question:' +--- + + + + +## Question + + +_Kindly describe the issue here._ + + +### Acknowledgment + + + +- [ ] I have searched the [issues](https://github.com/abhiTronix/vidgear/issues) for my issue and found nothing related or helpful. +- [ ] I have read the [FAQs](https://abhitronix.github.io/vidgear/latest/help/get_help/#frequently-asked-questions). +- [ ] I have read the [Documentation](https://abhitronix.github.io/vidgear/latest). + + + +### Context + + + + + + +### Your Environment + +* VidGear version: +* Branch: +* Python version: +* PiP version: +* Operating System and version: + + +### Optional \ No newline at end of file diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index c3c1a176e..eec67f900 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,35 +1,35 @@ - - - -## Description - -_Kindly explain the changes you made here._ - - - -### Requirements / Checklist - - - -- [ ] I have read the [PR Guidelines](https://abhitronix.github.io/vidgear/latest/contribution/PR/#submitting-pull-requestpr-guidelines). -- [ ] I have read the [Documentation](https://abhitronix.github.io/vidgear/latest). -- [ ] I have updated the documentation accordingly(if required). - - -### Related Issue - - - - - -### Context - - -### Types of changes - -- [ ] Bug fix (non-breaking change which fixes an issue) -- [ ] New feature (non-breaking change which adds functionality) -- [ ] Breaking change (fix or feature that would cause existing functionality to change) - -### Screenshots (if available): + + + +## Description + +_Kindly explain the changes you made here._ + + + +### Requirements / Checklist + + + +- [ ] I have read the [PR Guidelines](https://abhitronix.github.io/vidgear/latest/contribution/PR/#submitting-pull-requestpr-guidelines). +- [ ] I have read the [Documentation](https://abhitronix.github.io/vidgear/latest). +- [ ] I have updated the documentation accordingly(if required). + + +### Related Issue + + + + + +### Context + + +### Types of changes + +- [ ] Bug fix (non-breaking change which fixes an issue) +- [ ] New feature (non-breaking change which adds functionality) +- [ ] Breaking change (fix or feature that would cause existing functionality to change) + +### Screenshots (if available): \ No newline at end of file diff --git a/.github/config.yml b/.github/config.yml index b118fb12d..ae3c9516e 100644 --- a/.github/config.yml +++ b/.github/config.yml @@ -1,19 +1,19 @@ -newPRWelcomeComment: | - Thanks so much for opening your first PR here, a maintainer will get back to you shortly! - - ### In the meantime: - - Read our [Pull Request(PR) Guidelines](https://abhitronix.github.io/vidgear/latest/contribution/PR/#submitting-pull-requestpr-guidelines) for submitting a valid PR for VidGear. - - Submit a [issue](https://abhitronix.github.io/vidgear/latest/contribution/issue/#submitting-an-issue-guidelines) beforehand for your Pull Request. - - Go briefly through our [PR FAQ section](https://abhitronix.github.io/vidgear/latest/contribution/PR/#frequently-asked-questions). - -firstPRMergeComment: | - Congrats on merging your first pull request here! :tada: You're awesome! - ![Alt Text](https://media.giphy.com/media/d2Z9QYzA2aidiWn6/giphy.gif) - -newIssueWelcomeComment: | - Thanks for opening this issue, a maintainer will get back to you shortly! - - ### In the meantime: - - Read our [Issue Guidelines](https://abhitronix.github.io/vidgear/latest/contribution/issue/#submitting-an-issue-guidelines), and update your issue accordingly. Please note that your issue will be fixed much faster if you spend about half an hour preparing it, including the exact reproduction steps and a demo. - - Go comprehensively through our dedicated [FAQ & Troubleshooting section](https://abhitronix.github.io/vidgear/latest/help/get_help/#frequently-asked-questions). - - For any quick questions and typos, please refrain from opening an issue, as you can reach us on [Gitter](https://gitter.im/vidgear/community) community channel. +newPRWelcomeComment: | + Thanks so much for opening your first PR here, a maintainer will get back to you shortly! + + ### In the meantime: + - Read our [Pull Request(PR) Guidelines](https://abhitronix.github.io/vidgear/latest/contribution/PR/#submitting-pull-requestpr-guidelines) for submitting a valid PR for VidGear. + - Submit a [issue](https://abhitronix.github.io/vidgear/latest/contribution/issue/#submitting-an-issue-guidelines) beforehand for your Pull Request. + - Go briefly through our [PR FAQ section](https://abhitronix.github.io/vidgear/latest/contribution/PR/#frequently-asked-questions). + +firstPRMergeComment: | + Congrats on merging your first pull request here! :tada: You're awesome! + ![Alt Text](https://media.giphy.com/media/d2Z9QYzA2aidiWn6/giphy.gif) + +newIssueWelcomeComment: | + Thanks for opening this issue, a maintainer will get back to you shortly! + + ### In the meantime: + - Read our [Issue Guidelines](https://abhitronix.github.io/vidgear/latest/contribution/issue/#submitting-an-issue-guidelines), and update your issue accordingly. Please note that your issue will be fixed much faster if you spend about half an hour preparing it, including the exact reproduction steps and a demo. + - Go comprehensively through our dedicated [FAQ & Troubleshooting section](https://abhitronix.github.io/vidgear/latest/help/get_help/#frequently-asked-questions). + - For any quick questions and typos, please refrain from opening an issue, as you can reach us on [Gitter](https://gitter.im/vidgear/community) community channel. diff --git a/codecov.yml b/codecov.yml index 79b67eb93..12a628887 100644 --- a/codecov.yml +++ b/codecov.yml @@ -1,36 +1,36 @@ -# Copyright (c) 2019 Abhishek Thakur(@abhiTronix) - -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at - -# http://www.apache.org/licenses/LICENSE-2.0 - -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -codecov: - require_ci_to_pass: yes - branch: testing - -coverage: - status: - patch: off - project: - default: - threshold: 5% - branches: - - testing - if_ci_failed: error - -ignore: - - "vidgear/tests" - - "docs" - - "scripts" - - "vidgear/gears/__init__.py" #trivial - - "vidgear/gears/asyncio/__main__.py" #trivial - - "setup.py" +# Copyright (c) 2019 Abhishek Thakur(@abhiTronix) + +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at + +# http://www.apache.org/licenses/LICENSE-2.0 + +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +codecov: + require_ci_to_pass: yes + branch: testing + +coverage: + status: + patch: off + project: + default: + threshold: 5% + branches: + - testing + if_ci_failed: error + +ignore: + - "vidgear/tests" + - "docs" + - "scripts" + - "vidgear/gears/__init__.py" #trivial + - "vidgear/gears/asyncio/__main__.py" #trivial + - "setup.py" - "**/*.md" \ No newline at end of file diff --git a/contributing.md b/contributing.md index 24215443b..9fb57ab58 100644 --- a/contributing.md +++ b/contributing.md @@ -1,103 +1,103 @@ - - -VidGear Contribution - - -# Contribution Overview - - -Contributions are welcome, We'd love your contribution to VidGear in order to fix bugs or to implement new features! - -> 💡 If you're looking for something to work on, check for the [PR WELCOMED :mailbox_with_mail:](https://github.com/abhiTronix/vidgear/issues?q=is%3Aissue+is%3Aopen+label%3A%22PR+WELCOMED+%3Amailbox_with_mail%3A%22) labeled issues on our GitHub Repository. - -  - -## Submission Contexts - -### Got a question or problem? - -For quick questions, please refrain from opening an issue, instead read our [FAQ & Troubleshooting](https://abhitronix.github.io/vidgear/latest/help/get_help/#frequently-asked-questions) section or you can reach us on [Gitter](https://gitter.im/vidgear/community) community channel. - - -### Found a typo? - -There's no need to contribute for some typos. Just reach us on [Gitter ➶](https://gitter.im/vidgear/community) community channel, We will correct them in (less than) no time. - - -### Found a bug? - -If you encountered a bug, you can help us by submitting an issue in our GitHub repository. Even better, you can submit a Pull Request(PR) with a fix, but make sure to read the [guidelines ➶](#submission-guidelines). - - -### Request for a feature/improvement? - -> 💡 You can [subscribe our GitHub Repository](https://github.com/abhiTronix/vidgear/watchers) to receive notifications through email for new pull requests, commits and issues that are created in VidGear. _Learn more about it [here ➶](https://help.github.com/en/github/managing-subscriptions-and-notifications-on-github/viewing-your-subscriptions)_ - -You can request our GitHub Repository for a new feature/improvement based on the type of request: - -> Please [submit an issue with a proposal template](https://github.com/abhiTronix/vidgear/issues/new?labels=issue%3A+proposal&template=proposal.md) for your request to explain how it benefits everyone in the community. - -* **Major Feature Requests:** If you require a major feature for VidGear, then first [open an issue](https://abhitronix.github.io/vidgear/latest/contribution/issue/) and outline your proposal so that it can be discussed. This will also allow us to better coordinate our efforts, prevent duplication of work, and help you to craft the change so that it is successfully accepted into the project. The purposed feature, if accepted, may take time based on its complexity and availability/time-schedule of our maintainers, but once it's completed, you will be notified right away. Please be patient! - -* **Minor Feature Requests:** Small features and bugs resolved on priority. You just have to [submit an issue](https://abhitronix.github.io/vidgear/latest/contribution/issue/) to our GitHub Repository. - -  - -## Submission Guidelines - -- [Submitting an Issue Guidelines](https://abhitronix.github.io/vidgear/latest/contribution/issue/) -- [Submitting Pull Request(PR) Guidelines](https://abhitronix.github.io/vidgear/latest/contribution/PR/) - - -  - -## Community Channel - -If you've come up with some new idea, or looking for the fastest way troubleshoot your problems, then please **join our [Gitter community channel][gitter]**. - -  - -## Become a Stargazer - -You can be a [**Stargazer 🌟**][stargazer] by starring this framework, it helps us a lot and **you're making it easier for others to find & trust this library.** Thanks! - -  - - -## Love using VidGear? - -> VidGear relies on your support :heart: - -Donations help keep VidGear's Development alive. Giving a little means a lot, even the smallest contribution can make a huge difference. - - -[![ko-fi][kofi-badge]][kofi] - - - -[Coffee-badge]:https://abhitronix.github.io/img/vidgear/orange_img.png -[coffee]:https://www.buymeacoffee.com/2twOXFvlA -[kofi-badge]:https://www.ko-fi.com/img/githubbutton_sm.svg -[kofi]: https://ko-fi.com/W7W8WTYO -[gitter]:https://gitter.im/vidgear/community + + +VidGear Contribution + + +# Contribution Overview + + +Contributions are welcome, We'd love your contribution to VidGear in order to fix bugs or to implement new features! + +> 💡 If you're looking for something to work on, check for the [PR WELCOMED :mailbox_with_mail:](https://github.com/abhiTronix/vidgear/issues?q=is%3Aissue+is%3Aopen+label%3A%22PR+WELCOMED+%3Amailbox_with_mail%3A%22) labeled issues on our GitHub Repository. + +  + +## Submission Contexts + +### Got a question or problem? + +For quick questions, please refrain from opening an issue, instead read our [FAQ & Troubleshooting](https://abhitronix.github.io/vidgear/latest/help/get_help/#frequently-asked-questions) section or you can reach us on [Gitter](https://gitter.im/vidgear/community) community channel. + + +### Found a typo? + +There's no need to contribute for some typos. Just reach us on [Gitter ➶](https://gitter.im/vidgear/community) community channel, We will correct them in (less than) no time. + + +### Found a bug? + +If you encountered a bug, you can help us by submitting an issue in our GitHub repository. Even better, you can submit a Pull Request(PR) with a fix, but make sure to read the [guidelines ➶](#submission-guidelines). + + +### Request for a feature/improvement? + +> 💡 You can [subscribe our GitHub Repository](https://github.com/abhiTronix/vidgear/watchers) to receive notifications through email for new pull requests, commits and issues that are created in VidGear. _Learn more about it [here ➶](https://help.github.com/en/github/managing-subscriptions-and-notifications-on-github/viewing-your-subscriptions)_ + +You can request our GitHub Repository for a new feature/improvement based on the type of request: + +> Please [submit an issue with a proposal template](https://github.com/abhiTronix/vidgear/issues/new?labels=issue%3A+proposal&template=proposal.md) for your request to explain how it benefits everyone in the community. + +* **Major Feature Requests:** If you require a major feature for VidGear, then first [open an issue](https://abhitronix.github.io/vidgear/latest/contribution/issue/) and outline your proposal so that it can be discussed. This will also allow us to better coordinate our efforts, prevent duplication of work, and help you to craft the change so that it is successfully accepted into the project. The purposed feature, if accepted, may take time based on its complexity and availability/time-schedule of our maintainers, but once it's completed, you will be notified right away. Please be patient! + +* **Minor Feature Requests:** Small features and bugs resolved on priority. You just have to [submit an issue](https://abhitronix.github.io/vidgear/latest/contribution/issue/) to our GitHub Repository. + +  + +## Submission Guidelines + +- [Submitting an Issue Guidelines](https://abhitronix.github.io/vidgear/latest/contribution/issue/) +- [Submitting Pull Request(PR) Guidelines](https://abhitronix.github.io/vidgear/latest/contribution/PR/) + + +  + +## Community Channel + +If you've come up with some new idea, or looking for the fastest way troubleshoot your problems, then please **join our [Gitter community channel][gitter]**. + +  + +## Become a Stargazer + +You can be a [**Stargazer 🌟**][stargazer] by starring this framework, it helps us a lot and **you're making it easier for others to find & trust this library.** Thanks! + +  + + +## Love using VidGear? + +> VidGear relies on your support :heart: + +Donations help keep VidGear's Development alive. Giving a little means a lot, even the smallest contribution can make a huge difference. + + +[![ko-fi][kofi-badge]][kofi] + + + +[Coffee-badge]:https://abhitronix.github.io/img/vidgear/orange_img.png +[coffee]:https://www.buymeacoffee.com/2twOXFvlA +[kofi-badge]:https://www.ko-fi.com/img/githubbutton_sm.svg +[kofi]: https://ko-fi.com/W7W8WTYO +[gitter]:https://gitter.im/vidgear/community [stargazer]: https://github.com/abhiTronix/vidgear/stargazers \ No newline at end of file diff --git a/docs/gears/netgear/advanced/bidirectional_mode.md b/docs/gears/netgear/advanced/bidirectional_mode.md index e2952da80..e091a55be 100644 --- a/docs/gears/netgear/advanced/bidirectional_mode.md +++ b/docs/gears/netgear/advanced/bidirectional_mode.md @@ -213,7 +213,7 @@ client.close() Open a terminal on Client System _(where you want to display the input frames received from the Server)_ and execute the following python code: -!!! info "Note down the local IP-address of this system(required at all Server's end) and also replace it in the following code. You can follow [this FAQ](../../../../help/netgear_faqs/#how-to-find-local-ip-address-on-different-os-platforms) for this purpose." +!!! info "Note down the local IP-address of this system(required at Server's end) and also replace it in the following code. You can follow [this FAQ](../../../../help/netgear_faqs/#how-to-find-local-ip-address-on-different-os-platforms) for this purpose." !!! tip "You can terminate client anytime by pressing ++ctrl+"C"++ on your keyboard!" diff --git a/docs/gears/netgear/advanced/compression.md b/docs/gears/netgear/advanced/compression.md index 7d92c1405..a9eae6941 100644 --- a/docs/gears/netgear/advanced/compression.md +++ b/docs/gears/netgear/advanced/compression.md @@ -334,7 +334,7 @@ client.close() Open a terminal on Client System _(where you want to display the input frames received from the Server)_ and execute the following python code: -!!! info "Note down the local IP-address of this system(required at all Server's end) and also replace it in the following code. You can follow [this FAQ](../../../../help/netgear_faqs/#how-to-find-local-ip-address-on-different-os-platforms) for this purpose." +!!! info "Note down the local IP-address of this system(required at Server's end) and also replace it in the following code. You can follow [this FAQ](../../../../help/netgear_faqs/#how-to-find-local-ip-address-on-different-os-platforms) for this purpose." !!! note "If compression is enabled at Server, then Client will automatically enforce Frame Compression with its performance attributes." diff --git a/docs/gears/netgear/advanced/multi_client.md b/docs/gears/netgear/advanced/multi_client.md index 2c0546dc9..76063be91 100644 --- a/docs/gears/netgear/advanced/multi_client.md +++ b/docs/gears/netgear/advanced/multi_client.md @@ -95,7 +95,7 @@ Now, Open the terminal on a Server System _(with a webcam connected to it at ind !!! info "Important Notes" - * Note down the local IP-address of this system(required at all Server's end) and also replace it in the following code. You can follow [this FAQ](../../../../help/netgear_faqs/#how-to-find-local-ip-address-on-different-os-platforms) for this purpose. + * Note down the local IP-address of this system(required at all Client(s) end) and also replace it in the following code. You can follow [this FAQ](../../../../help/netgear_faqs/#how-to-find-local-ip-address-on-different-os-platforms) for this purpose. * Also, assign the tuple/list of port address of all Client you are going to connect to this system. !!! warning "Frame/Data transmission will **NOT START** untill all given Client(s) are connected to this Server." @@ -295,7 +295,7 @@ Now, Open the terminal on a Server System _(with a webcam connected to it at ind !!! info "Important Notes" - * Note down the local IP-address of this system(required at all Server's end) and also replace it in the following code. You can follow [this FAQ](../../../../help/netgear_faqs/#how-to-find-local-ip-address-on-different-os-platforms) for this purpose. + * Note down the local IP-address of this system(required at all Client(s) end) and also replace it in the following code. You can follow [this FAQ](../../../../help/netgear_faqs/#how-to-find-local-ip-address-on-different-os-platforms) for this purpose. * Also, assign the tuple/list of port address of all Client you are going to connect to this system. !!! warning "Frame/Data transmission will **NOT START** untill all given Client(s) are connected to this Server." @@ -498,7 +498,7 @@ Now, Open the terminal on a Server System _(with a webcam connected to it at ind !!! info "Important Notes" - * Note down the local IP-address of this system(required at all Server's end) and also replace it in the following code. You can follow [this FAQ](../../../../help/netgear_faqs/#how-to-find-local-ip-address-on-different-os-platforms) for this purpose. + * Note down the local IP-address of this system(required at all Client(s) end) and also replace it in the following code. You can follow [this FAQ](../../../../help/netgear_faqs/#how-to-find-local-ip-address-on-different-os-platforms) for this purpose. * Also, assign the tuple/list of port address of all Client you are going to connect to this system. !!! warning "Frame/Data transmission will **NOT START** untill all given Client(s) are connected to this Server." diff --git a/docs/gears/netgear/advanced/multi_server.md b/docs/gears/netgear/advanced/multi_server.md index 4f2fc9585..d42f09974 100644 --- a/docs/gears/netgear/advanced/multi_server.md +++ b/docs/gears/netgear/advanced/multi_server.md @@ -96,7 +96,7 @@ Open a terminal on Client System _(where you want to display the input frames re !!! info "Important Notes" - * Note down the local IP-address of this system(required at all Server's end) and also replace it in the following code. You can follow [this FAQ](../../../../help/netgear_faqs/#how-to-find-local-ip-address-on-different-os-platforms) for this purpose. + * Note down the local IP-address of this system(required at all Server(s) end) and also replace it in the following code. You can follow [this FAQ](../../../../help/netgear_faqs/#how-to-find-local-ip-address-on-different-os-platforms) for this purpose. * Also, assign the tuple/list of port address of all Servers you are going to connect to this system. !!! tip "You can terminate client anytime by pressing ++ctrl+"C"++ on your keyboard!" @@ -293,7 +293,7 @@ Open a terminal on Client System _(where you want to display the input frames re !!! info "Important Notes" - * Note down the local IP-address of this system(required at all Server's end) and also replace it in the following code. You can follow [this FAQ](../../../../help/netgear_faqs/#how-to-find-local-ip-address-on-different-os-platforms) for this purpose. + * Note down the local IP-address of this system(required at all Server(s) end) and also replace it in the following code. You can follow [this FAQ](../../../../help/netgear_faqs/#how-to-find-local-ip-address-on-different-os-platforms) for this purpose. * Also, assign the tuple/list of port address of all Servers you are going to connect to this system. !!! tip "You can terminate client anytime by pressing ++ctrl+"C"++ on your keyboard!" @@ -496,7 +496,7 @@ Open a terminal on Client System _(where you want to display the input frames re !!! info "Important Notes" - * Note down the local IP-address of this system(required at all Server's end) and also replace it in the following code. You can follow [this FAQ](../../../../help/netgear_faqs/#how-to-find-local-ip-address-on-different-os-platforms) for this purpose. + * Note down the local IP-address of this system(required at all Server(s) end) and also replace it in the following code. You can follow [this FAQ](../../../../help/netgear_faqs/#how-to-find-local-ip-address-on-different-os-platforms) for this purpose. * Also, assign the tuple/list of port address of all Servers you are going to connect to this system. !!! tip "You can terminate client anytime by pressing ++ctrl+"C"++ on your keyboard!" diff --git a/docs/gears/netgear/advanced/secure_mode.md b/docs/gears/netgear/advanced/secure_mode.md index 02b006dab..fa225e25c 100644 --- a/docs/gears/netgear/advanced/secure_mode.md +++ b/docs/gears/netgear/advanced/secure_mode.md @@ -227,7 +227,7 @@ client.close() Open a terminal on Client System _(where you want to display the input frames received from the Server)_ and execute the following python code: -!!! info "Note down the local IP-address of this system(required at all Server's end) and also replace it in the following code. You can follow [this FAQ](../../../../help/netgear_faqs/#how-to-find-local-ip-address-on-different-os-platforms) for this purpose." +!!! info "Note down the local IP-address of this system(required at Server's end) and also replace it in the following code. You can follow [this FAQ](../../../../help/netgear_faqs/#how-to-find-local-ip-address-on-different-os-platforms) for this purpose." !!! danger "You need to paste the Public+Secret Keypairs _(generated at the Server End)_ at the `$HOME/.vidgear/keys` directory of your Client machine for a successful authentication!" diff --git a/docs/gears/netgear/usage.md b/docs/gears/netgear/usage.md index 3f1fb64f7..1756208cf 100644 --- a/docs/gears/netgear/usage.md +++ b/docs/gears/netgear/usage.md @@ -130,7 +130,7 @@ client.close() Open a terminal on Client System _(where you want to display the input frames received from the Server)_ and execute the following python code: -!!! info "Note down the local IP-address of this system(required at all Server's end) and also replace it in the following code. You can follow [this FAQ](../../../help/netgear_faqs/#how-to-find-local-ip-address-on-different-os-platforms) for this purpose." +!!! info "Note down the local IP-address of this system(required at Server's end) and also replace it in the following code. You can follow [this FAQ](../../../help/netgear_faqs/#how-to-find-local-ip-address-on-different-os-platforms) for this purpose." !!! tip "You can terminate client anytime by pressing ++ctrl+"C"++ on your keyboard!" @@ -247,7 +247,7 @@ You can easily use NetGear directly with any Video Processing library such as Op Open a terminal on Client System _(where you want to display the input frames received from the Server)_ and execute the following python code: -!!! info "Note down the local IP-address of this system(required at all Server's end) and also replace it in the following code. You can follow [this FAQ](../../../help/netgear_faqs/#how-to-find-local-ip-address-on-different-os-platforms) for this purpose." +!!! info "Note down the local IP-address of this system(required at Server's end) and also replace it in the following code. You can follow [this FAQ](../../../help/netgear_faqs/#how-to-find-local-ip-address-on-different-os-platforms) for this purpose." !!! tip "You can terminate client anytime by pressing ++ctrl+"C"++ on your keyboard!" @@ -364,7 +364,7 @@ You can use any VideoCapture Gear in the similar manner. Let's implement given u Open a terminal on Client System _(where you want to display the input frames received from the Server)_ and execute the following python code: -!!! info "Note down the local IP-address of this system(required at all Server's end) and also replace it in the following code. You can follow [this FAQ](../../../help/netgear_faqs/#how-to-find-local-ip-address-on-different-os-platforms) for this purpose." +!!! info "Note down the local IP-address of this system(required at Server's end) and also replace it in the following code. You can follow [this FAQ](../../../help/netgear_faqs/#how-to-find-local-ip-address-on-different-os-platforms) for this purpose." !!! tip "You can terminate client anytime by pressing ++ctrl+"C"++ on your keyboard!" diff --git a/docs/gears/netgear_async/advanced/bidirectional_mode.md b/docs/gears/netgear_async/advanced/bidirectional_mode.md index c4d7d57a5..a05323eed 100644 --- a/docs/gears/netgear_async/advanced/bidirectional_mode.md +++ b/docs/gears/netgear_async/advanced/bidirectional_mode.md @@ -226,7 +226,7 @@ if __name__ == "__main__": Open a terminal on Client System _(where you want to display the input frames received from the Server)_ and execute the following python code: -!!! info "Note down the local IP-address of this system(required at all Server's end) and also replace it in the following code. You can follow [this FAQ](../../../../help/netgear_faqs/#how-to-find-local-ip-address-on-different-os-platforms) for this purpose." +!!! info "Note down the local IP-address of this system(required at Server's end) and also replace it in the following code. You can follow [this FAQ](../../../../help/netgear_faqs/#how-to-find-local-ip-address-on-different-os-platforms) for this purpose." !!! tip "You can terminate client anytime by pressing ++ctrl+"C"++ on your keyboard!" diff --git a/docs/gears/netgear_async/usage.md b/docs/gears/netgear_async/usage.md index 674b7a63b..fba5ce319 100644 --- a/docs/gears/netgear_async/usage.md +++ b/docs/gears/netgear_async/usage.md @@ -128,7 +128,7 @@ if __name__ == "__main__": Open a terminal on Client System _(where you want to display the input frames received from the Server)_ and execute the following python code: -!!! info "Note down the local IP-address of this system(required at all Server's end) and also replace it in the following code. You can follow [this FAQ](../../../help/netgear_faqs/#how-to-find-local-ip-address-on-different-os-platforms) for this purpose." +!!! info "Note down the local IP-address of this system(required at Server's end) and also replace it in the following code. You can follow [this FAQ](../../../help/netgear_faqs/#how-to-find-local-ip-address-on-different-os-platforms) for this purpose." !!! warning "Client will throw TimeoutError if it fails to connect to the Server in given [`timeout`](../params/#timeout) value!" diff --git a/docs/help/netgear_ex.md b/docs/help/netgear_ex.md index 8c349f456..2af3512f3 100644 --- a/docs/help/netgear_ex.md +++ b/docs/help/netgear_ex.md @@ -39,7 +39,7 @@ Open a terminal on Client System where you want to display the input frames _(an !!! alert "High CPU utilization may occur on Client's end. User discretion is advised." -!!! info "Note down the local IP-address of this system(required at all Server's end) and also replace it in the following code. You can follow [this FAQ](../netgear_faqs/#how-to-find-local-ip-address-on-different-os-platforms) for this purpose." +!!! info "Note down the local IP-address of this system(required at Server's end) and also replace it in the following code. You can follow [this FAQ](../netgear_faqs/#how-to-find-local-ip-address-on-different-os-platforms) for this purpose." ```python # import necessary libs @@ -191,7 +191,7 @@ Open a terminal on Client System where you want to display the input frames _(an !!! alert "High CPU utilization may occur on Client's end. User discretion is advised." -!!! info "Note down the local IP-address of this system(required at all Server's end) and also replace it in the following code. You can follow [this FAQ](../netgear_faqs/#how-to-find-local-ip-address-on-different-os-platforms) for this purpose." +!!! info "Note down the local IP-address of this system(required at Server's end) and also replace it in the following code. You can follow [this FAQ](../netgear_faqs/#how-to-find-local-ip-address-on-different-os-platforms) for this purpose." ```python # import required libraries diff --git a/docs/help/stabilizer_ex.md b/docs/help/stabilizer_ex.md index 7d27c6dfa..45323d890 100644 --- a/docs/help/stabilizer_ex.md +++ b/docs/help/stabilizer_ex.md @@ -70,9 +70,9 @@ In this example code, we will merging the audio from a Audio Device _(for e.g. W ```python # assign appropriate input audio-source output_params = { + "-f": "dshow", # !!! warning: always keep this line above "-i" parameter !!! "-i":"audio=Microphone (USB2.0 Camera)", "-thread_queue_size": "512", - "-f": "dshow", "-ac": "2", "-acodec": "aac", "-ar": "44100", @@ -117,12 +117,11 @@ In this example code, we will merging the audio from a Audio Device _(for e.g. W ```python # assign appropriate input audio-source output_params = { - "-i": "hw:1", "-thread_queue_size": "512", - "-f": "alsa", "-ac": "2", - "-acodec": "aac", - "-ar": "44100", + "-ar": "48000", + "-f": "alsa", # !!! warning: always keep this line above "-i" parameter !!! + "-i": "hw:1", } ``` @@ -160,12 +159,11 @@ In this example code, we will merging the audio from a Audio Device _(for e.g. W ```python # assign appropriate input audio-source output_params = { - "-audio_device_index": "0", "-thread_queue_size": "512", - "-f": "avfoundation", "-ac": "2", - "-acodec": "aac", - "-ar": "44100", + "-ar": "48000", + "-f": "avfoundation", # !!! warning: always keep this line above "-audio_device_index" parameter !!! + "-audio_device_index": "0", } ``` @@ -191,10 +189,10 @@ stab = Stabilizer(smoothing_radius=30, crop_n_zoom=True, border_size=5, logging= # change with your webcam soundcard, plus add additional required FFmpeg parameters for your writer output_params = { "-thread_queue_size": "512", - "-f": "alsa", - "-ac": "1", + "-ac": "2", "-ar": "48000", - "-i": "plughw:CARD=CAMERA,DEV=0", + "-f": "alsa", # !!! warning: always keep this line above "-i" parameter !!! + "-i": "hw:1", } # Define writer with defined parameters and suitable output filename for e.g. `Output.mp4 diff --git a/docs/overrides/assets/README.md b/docs/overrides/assets/README.md index e25d7aae5..c179e4011 100755 --- a/docs/overrides/assets/README.md +++ b/docs/overrides/assets/README.md @@ -1,9 +1,9 @@ -# VidGear Docs Assets - -The files under this folder contains VidGear Docs assets, which contains primary design elements, that brings standard and quality to its visual design experience. All these files are not covered under VidGear's [Apache License](https://github.com/abhiTronix/vidgear/blob/master/LICENSE), and are provided separately under [Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License](http://creativecommons.org/licenses/by-nc-sa/4.0/). - -  - -## License - +# VidGear Docs Assets + +The files under this folder contains VidGear Docs assets, which contains primary design elements, that brings standard and quality to its visual design experience. All these files are not covered under VidGear's [Apache License](https://github.com/abhiTronix/vidgear/blob/master/LICENSE), and are provided separately under [Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License](http://creativecommons.org/licenses/by-nc-sa/4.0/). + +  + +## License + Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License. \ No newline at end of file diff --git a/setup.cfg b/setup.cfg index ea5b40312..bb88fc269 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,14 +1,14 @@ -[metadata] -# This includes the license file(s) in the wheel. -# https://wheel.readthedocs.io/en/stable/user_guide.html#including-license-files-in-the-generated-wheel-file -license_files = LICENSE -description_file = README.md - -[bdist_wheel] -# This flag says to generate wheels that support both Python 2 and Python -# 3. If your code will not run unchanged on both Python 2 and 3, you will -# need to generate separate wheels for each Python version that you -# support. Removing this line (or setting universal to 0) will prevent -# bdist_wheel from trying to make a universal wheel. For more see: -# https://packaging.python.org/guides/distributing-packages-using-setuptools/#wheels -universal=0 +[metadata] +# This includes the license file(s) in the wheel. +# https://wheel.readthedocs.io/en/stable/user_guide.html#including-license-files-in-the-generated-wheel-file +license_files = LICENSE +description_file = README.md + +[bdist_wheel] +# This flag says to generate wheels that support both Python 2 and Python +# 3. If your code will not run unchanged on both Python 2 and 3, you will +# need to generate separate wheels for each Python version that you +# support. Removing this line (or setting universal to 0) will prevent +# bdist_wheel from trying to make a universal wheel. For more see: +# https://packaging.python.org/guides/distributing-packages-using-setuptools/#wheels +universal=0 From 54ee8a0e9ad16d9fdc8f4164a2d834b802c07fbc Mon Sep 17 00:00:00 2001 From: abhiTronix Date: Mon, 1 Nov 2021 12:16:10 +0530 Subject: [PATCH 03/25] =?UTF-8?q?=F0=9F=93=9D=20Docs:=20Added=20example=20?= =?UTF-8?q?for=20real-time=20file=20audio=20encoding(Fixes=20#209)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 📝 Added example to add real-time file audio encoding with VideoGear and Stabilizer class. - 🎨 Added warning for using `-disable_force_termination` flag for short duration videos. - ✏️ Fixed context and typos. Setup: - 🔖 Bumped version to `0.2.4` --- docs/gears/streamgear/params.md | 2 +- docs/gears/streamgear/rtfm/usage.md | 4 +- docs/gears/streamgear/ssm/usage.md | 2 +- docs/gears/writegear/compression/params.md | 4 +- docs/gears/writegear/compression/usage.md | 14 ++-- docs/help/stabilizer_ex.md | 82 +++++++++++++++++++++- docs/help/videogear_ex.md | 63 +++++++++++++++++ docs/help/writegear_ex.md | 2 +- vidgear/version.py | 2 +- 9 files changed, 161 insertions(+), 14 deletions(-) diff --git a/docs/gears/streamgear/params.md b/docs/gears/streamgear/params.md index ad1ab9470..f5c7f1afb 100644 --- a/docs/gears/streamgear/params.md +++ b/docs/gears/streamgear/params.md @@ -223,7 +223,7 @@ StreamGear API provides some exclusive internal parameters to easily generate St * **`-audio`** _(string/list)_: This attribute takes external custom audio path _(as `string`)_ or audio device name followed by suitable demuxer _(as `list`)_ as audio source input for all StreamGear streams. Its value be one of the following: - !!! failure "Make sure this audio-source is compatible with provided video -source, otherwise you encounter multiple errors, or even no output at all!" + !!! failure "Make sure this audio-source is compatible with provided video -source, otherwise you could encounter multiple errors, or even no output at all!" * **Audio Filename** _(string)_: Valid path to Audio file as follows: ```python diff --git a/docs/gears/streamgear/rtfm/usage.md b/docs/gears/streamgear/rtfm/usage.md index 039a869b9..605d8fe31 100644 --- a/docs/gears/streamgear/rtfm/usage.md +++ b/docs/gears/streamgear/rtfm/usage.md @@ -739,7 +739,7 @@ In Real-time Frames Mode, if you want to add audio to your streams, you've to us The complete example is as follows: -!!! failure "Make sure this `-audio` audio-source it compatible with provided video-source, otherwise you encounter multiple errors or no output at all." +!!! failure "Make sure this `-audio` audio-source it compatible with provided video-source, otherwise you could encounter multiple errors or no output at all." !!! warning "You **MUST** use [`-input_framerate`](../../params/#a-exclusive-parameters) attribute to set exact value of input framerate when using external audio in Real-time Frames mode, otherwise audio delay will occur in output streams." @@ -997,7 +997,7 @@ The complete example is as follows: !!! fail "If audio still doesn't work then reach us out on [Gitter ➶](https://gitter.im/vidgear/community) Community channel" -!!! danger "Make sure this `-audio` audio-source it compatible with provided video-source, otherwise you encounter multiple errors or no output at all." +!!! danger "Make sure this `-audio` audio-source it compatible with provided video-source, otherwise you could encounter multiple errors or no output at all." !!! warning "You **MUST** use [`-input_framerate`](../../params/#a-exclusive-parameters) attribute to set exact value of input framerate when using external audio in Real-time Frames mode, otherwise audio delay will occur in output streams." diff --git a/docs/gears/streamgear/ssm/usage.md b/docs/gears/streamgear/ssm/usage.md index 91dc2a1c2..156d3fa10 100644 --- a/docs/gears/streamgear/ssm/usage.md +++ b/docs/gears/streamgear/ssm/usage.md @@ -197,7 +197,7 @@ By default, if input video-source _(i.e. `-video_source`)_ contains any audio, t The complete example is as follows: -!!! failure "Make sure this `-audio` audio-source it compatible with provided video-source, otherwise you encounter multiple errors or no output at all." +!!! failure "Make sure this `-audio` audio-source it compatible with provided video-source, otherwise you could encounter multiple errors or no output at all." !!! tip "You can also assign a valid Audio URL as input, rather than filepath. More details can be found [here ➶](../../params/#a-exclusive-parameters)" diff --git a/docs/gears/writegear/compression/params.md b/docs/gears/writegear/compression/params.md index 76e6d3ed1..eccda15b1 100644 --- a/docs/gears/writegear/compression/params.md +++ b/docs/gears/writegear/compression/params.md @@ -165,7 +165,9 @@ This parameter allows us to exploit almost all FFmpeg supported parameters effor } ``` - * **`-disable_force_termination`** _(bool)_: sets a special flag to disable the default forced-termination behaviour in WriteGear API when `-i` FFmpeg parameter is used _(For more details, see issue: #149)_. Its usage is as follows: + * **`-disable_force_termination`** _(bool)_: sets a special flag to manually disable the default forced-termination behaviour in WriteGear API when `-i` FFmpeg parameter is used _(For more details, see issue: #149)_. Its usage is as follows: + + !!! warning "`-disable_force_termination` flag is a absolute necessity when video duration is too short(<60sec), otherwise WriteGear will not produce any valid output." ```python output_params = {"-disable_force_termination": True} # disable the default forced-termination behaviour diff --git a/docs/gears/writegear/compression/usage.md b/docs/gears/writegear/compression/usage.md index a397054c9..b5a974c33 100644 --- a/docs/gears/writegear/compression/usage.md +++ b/docs/gears/writegear/compression/usage.md @@ -31,11 +31,14 @@ limitations under the License. * While providing additional av-source with `-i` FFmpeg parameter in `output_params` make sure it don't interfere with WriteGear's frame pipeline otherwise it will break things! + * Use [`-disable_force_termination`](../params/#supported-parameters) flag when video duration is too short(<60sec), otherwise WriteGear will not produce any valid output. + * Heavy resolution multimedia files take time to render which can last up to _0.1-1 seconds_. Kindly wait till the WriteGear API terminates itself, and **DO NOT** try to kill the process instead. * Always use `writer.close()` at the very end of the main code. **NEVER USE IT INBETWEEN CODE** to avoid undesired behavior. +   @@ -146,7 +149,7 @@ writer.close() ## Using Compression Mode with controlled FrameRate -WriteGear API provides [`-input_framerate`](../../params/#supported-parameters) attribute for its `options` dictionary parameter in Compression Mode, which allow us to control/set the constant framerate of the output video. +WriteGear API provides [`-input_framerate`](../params/#supported-parameters) attribute for its `options` dictionary parameter in Compression Mode, which allow us to control/set the constant framerate of the output video. ??? tip "Advanced Tip for setting constant framerate" @@ -217,7 +220,7 @@ writer.close() ## Using Compression Mode for Streaming URLs -In Compression Mode, WriteGear also allows URL strings _(as output)_ for network streaming with its [`output_filename`](../../params/#output_filename) parameter. +In Compression Mode, WriteGear also allows URL strings _(as output)_ for network streaming with its [`output_filename`](../params/#output_filename) parameter. In this example, we will stream live camera feed directly to Twitch: @@ -294,7 +297,7 @@ writer.close() ## Using Compression Mode with Hardware encoders -By default, WriteGear API uses `libx264` encoder for encoding output files in Compression Mode. But you can easily change encoder to your suitable [supported encoder](../../params/#supported-encoders) by passing `-vcodec` FFmpeg parameter as an attribute with its [*output_param*](../../params/#output_params) dictionary parameter. In addition to this, you can also specify the additional properties/features of your system's GPU easily. +By default, WriteGear API uses `libx264` encoder for encoding output files in Compression Mode. But you can easily change encoder to your suitable [supported encoder](../params/#supported-encoders) by passing `-vcodec` FFmpeg parameter as an attribute with its [*output_param*](../params/#output_params) dictionary parameter. In addition to this, you can also specify the additional properties/features of your system's GPU easily. ??? warning "User Discretion Advised" @@ -574,9 +577,9 @@ In this example code, we will merging the audio from a Audio Device _(for e.g. W !!! fail "If audio still doesn't work then reach us out on [Gitter ➶](https://gitter.im/vidgear/community) Community channel" -!!! danger "Make sure this `-i` audio-source it compatible with provided video-source, otherwise you encounter multiple errors or no output at all." +!!! danger "Make sure this `-i` audio-source it compatible with provided video-source, otherwise you could encounter multiple errors or no output at all." -!!! warning "You **MUST** use [`-input_framerate`](../../params/#a-exclusive-parameters) attribute to set exact value of input framerate when using external audio in Real-time Frames mode, otherwise audio delay will occur in output streams." +!!! warning "You **MUST** use [`-input_framerate`](../params/#supported-parameters) attribute to set exact value of input framerate when using external audio in Real-time Frames mode, otherwise audio delay will occur in output streams." ```python hl_lines="11-15" # import required libraries @@ -589,6 +592,7 @@ stream = VideoGear(source=0).start() # change with your webcam soundcard, plus add additional required FFmpeg parameters for your writer output_params = { + "-input_framerate": stream.framerate, "-thread_queue_size": "512", "-ac": "2", "-ar": "48000", diff --git a/docs/help/stabilizer_ex.md b/docs/help/stabilizer_ex.md index 45323d890..36b03df4e 100644 --- a/docs/help/stabilizer_ex.md +++ b/docs/help/stabilizer_ex.md @@ -170,9 +170,9 @@ In this example code, we will merging the audio from a Audio Device _(for e.g. W !!! fail "If audio still doesn't work then reach us out on [Gitter ➶](https://gitter.im/vidgear/community) Community channel" -!!! danger "Make sure this `-i` audio-source it compatible with provided video-source, otherwise you encounter multiple errors or no output at all." +!!! danger "Make sure this `-i` audio-source it compatible with provided video-source, otherwise you could encounter multiple errors or no output at all." -!!! warning "You **MUST** use [`-input_framerate`](../../gears/writegear/compression/params/#a-exclusive-parameters) attribute to set exact value of input framerate when using external audio in Real-time Frames mode, otherwise audio delay will occur in output streams." +!!! warning "You **MUST** use [`-input_framerate`](../../gears/writegear/compression/params/#supported-parameters) attribute to set exact value of input framerate when using external audio in Real-time Frames mode, otherwise audio delay will occur in output streams." ```python # import required libraries @@ -188,6 +188,7 @@ stab = Stabilizer(smoothing_radius=30, crop_n_zoom=True, border_size=5, logging= # change with your webcam soundcard, plus add additional required FFmpeg parameters for your writer output_params = { + "-input_framerate": stream.get(cv2.CAP_PROP_FPS), "-thread_queue_size": "512", "-ac": "2", "-ar": "48000", @@ -195,6 +196,83 @@ output_params = { "-i": "hw:1", } +# Define writer with defined parameters and suitable output filename for e.g. `Output.mp4 +writer = WriteGear(output_filename="Output.mp4", logging=True, **output_params) + +# loop over +while True: + + # read frames from stream + (grabbed, frame) = stream.read() + + # check for frame if not grabbed + if not grabbed: + break + + # send current frame to stabilizer for processing + stabilized_frame = stab.stabilize(frame) + + # wait for stabilizer which still be initializing + if stabilized_frame is None: + continue + + # {do something with the stabilized frame here} + + # write stabilized frame to writer + writer.write(stabilized_frame) + + +# clear stabilizer resources +stab.clean() + +# safely close video stream +stream.release() + +# safely close writer +writer.close() +``` + +  + +## Saving Stabilizer Class output with File Audio Input + +In this example code, we will be directly merging the audio from a Video-File _(to be stabilized)_ with its processed stabilized frames into a compressed video output in real time: + +??? new "New in v0.2.4" + This example was added in `v0.2.4`. + +!!! danger "Make sure this input video-file _(to be stabilized)_ contains valid audio source, otherwise you could encounter multiple errors or no output at all." + +!!! warning "You **MUST** use [`-input_framerate`](../../gears/writegear/compression/params/#supported-parameters) attribute to set exact value of input framerate when using external audio in Real-time Frames mode, otherwise audio delay will occur in output streams." + +!!! alert "Use [`-disable_force_termination`](../../gears/writegear/compression/params/#supported-parameters) flag when video duration is too short(<60sec), otherwise WriteGear will not produce any valid output." + +```python +# import required libraries +from vidgear.gears import WriteGear +from vidgear.gears.stabilizer import Stabilizer +import cv2 + +# Give suitable video file path to be stabilized +unstablized_videofile = "test.mp4" + +# open stream on given path +stream = cv2.VideoCapture(unstablized_videofile) + +# initiate stabilizer object with defined parameters +stab = Stabilizer(smoothing_radius=30, crop_n_zoom=True, border_size=5, logging=True) + +# define required FFmpeg optimizing parameters for your writer +output_params = { + "-i": unstablized_videofile, + "-c:a": "aac", + "-input_framerate": stream.get(cv2.CAP_PROP_FPS), + "-clones": ["-shortest"], + # !!! Uncomment following line if video duration is too short(<60sec). !!! + #"-disable_force_termination": True, +} + + # Define writer with defined parameters and suitable output filename for e.g. `Output.mp4 writer = WriteGear(output_filename="Output.mp4", logging=True, **output_params) diff --git a/docs/help/videogear_ex.md b/docs/help/videogear_ex.md index 96d008a79..9222b9fe5 100644 --- a/docs/help/videogear_ex.md +++ b/docs/help/videogear_ex.md @@ -217,4 +217,67 @@ if __name__ == "__main__": stream.stop() ``` +  + + +## Using VideoGear for Real-time Stabilization with Audio Encoding + +In this example code, we will be directly merging the audio from a Video-File _(to be stabilized)_ with its processed stabilized frames into a compressed video output in real time: + +??? new "New in v0.2.4" + This example was added in `v0.2.4`. + +!!! danger "Make sure this input video-file _(to be stabilized)_ contains valid audio source, otherwise you could encounter multiple errors or no output at all." + +!!! warning "You **MUST** use `-input_framerate` attribute to set exact value of input framerate when using external audio in Real-time Frames mode, otherwise audio delay will occur in output streams." + +!!! alert "Use `-disable_force_termination` flag when video duration is too short(<60sec), otherwise WriteGear will not produce any valid output." + +```python +# import required libraries +from vidgear.gears import WriteGear +from vidgear.gears import VideoGear +import cv2 + +# Give suitable video file path to be stabilized +unstablized_videofile = "test.mp4" + +# open any valid video path with stabilization enabled(`stabilize = True`) +stream_stab = VideoGear(source=unstablized_videofile, stabilize=True, logging=True).start() + +# define required FFmpeg optimizing parameters for your writer +output_params = { + "-i": unstablized_videofile, + "-c:a": "aac", + "-input_framerate": stream_stab.framerate, + "-clones": ["-shortest"], + # !!! Uncomment following line if video duration is too short(<60sec). !!! + #"-disable_force_termination": True, +} + +# Define writer with defined parameters and suitable output filename for e.g. `Output.mp4 +writer = WriteGear(output_filename="Output.mp4", logging=True, **output_params) + +# loop over +while True: + + # read frames from stream + frame_stab = stream_stab.read() + + # check for frame if not grabbed + if frame_stab is None: + break + + # {do something with the stabilized frame here} + + # write stabilized frame to writer + writer.write(frame_stab) + +# safely close streams +stream_stab.stop() + +# safely close writer +writer.close() +``` +   \ No newline at end of file diff --git a/docs/help/writegear_ex.md b/docs/help/writegear_ex.md index 9cef5e1e7..fc2b52f47 100644 --- a/docs/help/writegear_ex.md +++ b/docs/help/writegear_ex.md @@ -172,7 +172,7 @@ You can also use WriteGear for merging external audio with live video-source: ??? new "New in v0.2.1" This example was added in `v0.2.1`. -!!! failure "Make sure this `-i` audio-source it compatible with provided video-source, otherwise you encounter multiple errors or no output at all." +!!! failure "Make sure this `-i` audio-source it compatible with provided video-source, otherwise you could encounter multiple errors or no output at all." ```python hl_lines="11-12" # import required libraries diff --git a/vidgear/version.py b/vidgear/version.py index 4f7052b12..7a17bddfb 100644 --- a/vidgear/version.py +++ b/vidgear/version.py @@ -1 +1 @@ -__version__ = "0.2.3" \ No newline at end of file +__version__ = "0.2.4" \ No newline at end of file From 49bad2cc20fca8877ac6efcc7ca5c1bd12add7c9 Mon Sep 17 00:00:00 2001 From: abhiTronix Date: Mon, 1 Nov 2021 19:14:53 +0530 Subject: [PATCH 04/25] =?UTF-8?q?=F0=9F=94=8A=20Maintenance:=20Fixed=20log?= =?UTF-8?q?ger=20formatting?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 🔊 Renamed Asyncio Helper logger name. - 💄 Changed logging colors. --- setup.py | 2 +- vidgear/gears/asyncio/helper.py | 2 +- vidgear/gears/helper.py | 7 ++++--- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/setup.py b/setup.py index 9693839b7..67b3b1636 100644 --- a/setup.py +++ b/setup.py @@ -103,7 +103,7 @@ def latest_version(package_name): "requests", "pyzmq{}".format(latest_version("pyzmq")), "simplejpeg{}".format(latest_version("simplejpeg")), - "colorlog", + "colorlog{}".format(latest_version("colorlog")), "tqdm", "Pillow", "pyscreenshot{}".format(latest_version("pyscreenshot")), diff --git a/vidgear/gears/asyncio/helper.py b/vidgear/gears/asyncio/helper.py index ebe3ce722..1b392a4ed 100755 --- a/vidgear/gears/asyncio/helper.py +++ b/vidgear/gears/asyncio/helper.py @@ -39,7 +39,7 @@ from ..helper import logger_handler, mkdir_safe # define logger -logger = log.getLogger("Helper Asyncio") +logger = log.getLogger("Helper_Async") logger.propagate = False logger.addHandler(logger_handler()) logger.setLevel(log.DEBUG) diff --git a/vidgear/gears/helper.py b/vidgear/gears/helper.py index b8797cdab..eda2b2e40 100755 --- a/vidgear/gears/helper.py +++ b/vidgear/gears/helper.py @@ -39,6 +39,7 @@ from contextlib import closing from pathlib import Path from colorlog import ColoredFormatter +from colorlog.escape_codes import esc from distutils.version import LooseVersion from requests.adapters import HTTPAdapter from requests.packages.urllib3.util.retry import Retry @@ -54,13 +55,13 @@ def logger_handler(): """ # logging formatter formatter = ColoredFormatter( - "{green}{asctime}{reset} :: {bold_blue}{name:^14}{reset} :: {log_color}{levelname:^7}{reset} :: {message}", + "{green}{asctime}{reset} :: {bold_purple}{name:^13}{reset} :: {log_color}{levelname:^8}{reset} :: {message}", datefmt="%H:%M:%S", reset=True, log_colors={ - "INFO": "bold_green", + "INFO": "bold_cyan", "DEBUG": "bold_yellow", - "WARNING": "bold_purple", + "WARNING": "bold_red,fg_thin_yellow", "ERROR": "bold_red", "CRITICAL": "bold_red,bg_white", }, From 8612ac9ab50a3fee7103966cc508a61311f9e87a Mon Sep 17 00:00:00 2001 From: abhiTronix Date: Tue, 16 Nov 2021 08:50:42 +0530 Subject: [PATCH 05/25] =?UTF-8?q?=F0=9F=93=9D=20Docs:=20Fixed=20Typos=20an?= =?UTF-8?q?d=20context?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 💄 Added bouncing heart animation through pure CSS. - 💄 Added donation link in page footer with heart animation. - 💄 Added `permalink_title` entry to mkdocs.yml. - 📝 Updated zenodo badge. - 📝 Updated BibTex for project citation. - 🐛 Replaced incorrect parameters docs. - 📝 Fixed missing docs for parameters. - 🎨 Fixed example code indentation. - 📝 Fixed line-endings. - ✏️ Fixed several typos. ⚰️ Helper: Removed unused imports. --- docs/gears/netgear_async/params.md | 19 +- docs/gears/webgear/params.md | 8 +- docs/gears/webgear_rtc/params.md | 36 +- docs/help.md | 2 +- docs/help/get_help.md | 24 +- docs/help/videogear_ex.md | 4 +- docs/help/writegear_ex.md | 5 +- docs/index.md | 34 +- docs/overrides/assets/LICENSE | 350 +++++++++---------- docs/overrides/assets/stylesheets/custom.css | 81 ++--- docs/overrides/main.html | 12 + mkdocs.yml | 3 +- vidgear/gears/helper.py | 1 - 13 files changed, 271 insertions(+), 308 deletions(-) diff --git a/docs/gears/netgear_async/params.md b/docs/gears/netgear_async/params.md index bbdab2ed8..42f3840da 100644 --- a/docs/gears/netgear_async/params.md +++ b/docs/gears/netgear_async/params.md @@ -165,17 +165,16 @@ This parameter provides the flexibility to alter various NetGear_Async API's int * **`bidirectional_mode`** (_boolean_) : This internal attribute activates the exclusive [**Bidirectional Mode**](../advanced/bidirectional_mode/), if enabled(`True`). + The desired attributes can be passed to NetGear_Async API as follows: -The desired attributes can be passed to NetGear_Async API as follows: - -```python -# formatting parameters as dictionary attributes -options = { - "bidirectional_mode": True, -} -# assigning it -NetGear_Async(logging=True, **options) -``` + ```python + # formatting parameters as dictionary attributes + options = { + "bidirectional_mode": True, + } + # assigning it + NetGear_Async(logging=True, **options) + ```   diff --git a/docs/gears/webgear/params.md b/docs/gears/webgear/params.md index 041f40216..89c49412c 100644 --- a/docs/gears/webgear/params.md +++ b/docs/gears/webgear/params.md @@ -87,7 +87,7 @@ This parameter can be used to pass user-defined parameter to WebGear API by form * **`jpeg_compression_quality`**: _(int/float)_ This attribute controls the JPEG quantization factor. Its value varies from `10` to `100` (the higher is the better quality but performance will be lower). Its default value is `90`. Its usage is as follows: ??? new "New in v0.2.2" - `enable_infinite_frames` attribute was added in `v0.2.2`. + `jpeg_compression_quality` attribute was added in `v0.2.2`. ```python # activate jpeg encoding and set quality 95% @@ -99,7 +99,7 @@ This parameter can be used to pass user-defined parameter to WebGear API by form * **`jpeg_compression_fastdct`**: _(bool)_ This attribute if True, WebGear API uses fastest DCT method that speeds up decoding by 4-5% for a minor loss in quality. Its default value is also `True`, and its usage is as follows: ??? new "New in v0.2.2" - `enable_infinite_frames` attribute was added in `v0.2.2`. + `jpeg_compression_fastdct` attribute was added in `v0.2.2`. ```python # activate jpeg encoding and enable fast dct @@ -111,7 +111,7 @@ This parameter can be used to pass user-defined parameter to WebGear API by form * **`jpeg_compression_fastupsample`**: _(bool)_ This attribute if True, WebGear API use fastest color upsampling method. Its default value is `False`, and its usage is as follows: ??? new "New in v0.2.2" - `enable_infinite_frames` attribute was added in `v0.2.2`. + `jpeg_compression_fastupsample` attribute was added in `v0.2.2`. ```python # activate jpeg encoding and enable fast upsampling @@ -125,7 +125,7 @@ This parameter can be used to pass user-defined parameter to WebGear API by form !!! info "Supported `jpeg_compression_colorspace` colorspace values are `RGB`, `BGR`, `RGBX`, `BGRX`, `XBGR`, `XRGB`, `GRAY`, `RGBA`, `BGRA`, `ABGR`, `ARGB`, `CMYK`. More information can be found [here ➶](https://gitlab.com/jfolz/simplejpeg)" ??? new "New in v0.2.2" - `enable_infinite_frames` attribute was added in `v0.2.2`. + `jpeg_compression_colorspace` attribute was added in `v0.2.2`. ```python # Specify incoming frames are `grayscale` diff --git a/docs/gears/webgear_rtc/params.md b/docs/gears/webgear_rtc/params.md index 50acfc6c6..ab598c1e0 100644 --- a/docs/gears/webgear_rtc/params.md +++ b/docs/gears/webgear_rtc/params.md @@ -84,42 +84,15 @@ This parameter can be used to pass user-defined parameter to WebGear_RTC API by WebGear_RTC(logging=True, **options) ``` -* **`jpeg_compression_quality`** _(int/float)_ : This attribute controls the JPEG quantization factor. Its value varies from `10` to `100` (the higher is the better quality but performance will be lower). Its default value is `90`. Its usage is as follows: - - ```python - # activate jpeg encoding and set quality 95% - options = {"jpeg_compression": True, "jpeg_compression_quality": 95} - ``` - -* **`jpeg_compression_fastdct`** _(bool)_ : This attribute if True, WebGear API uses fastest DCT method that speeds up decoding by 4-5% for a minor loss in quality. Its default value is also `True`, and its usage is as follows: - - ```python - # activate jpeg encoding and enable fast dct - options = {"jpeg_compression": True, "jpeg_compression_fastdct": True} - ``` - -* **`jpeg_compression_fastupsample`** _(bool)_ : This attribute if True, WebGear API use fastest color upsampling method. Its default value is `False`, and its usage is as follows: - - ```python - # activate jpeg encoding and enable fast upsampling - options = {"jpeg_compression": True, "jpeg_compression_fastupsample": True} - ``` - -* **`jpeg_compression_colorspace`** _(str)_ : This internal attribute is used to specify incoming frames colorspace with compression. Its usage is as follows: - - !!! info "Supported colorspace values are `RGB`, `BGR`, `RGBX`, `BGRX`, `XBGR`, `XRGB`, `GRAY`, `RGBA`, `BGRA`, `ABGR`, `ARGB`, `CMYK`. More information can be found [here ➶](https://gitlab.com/jfolz/simplejpeg)" - - ```python - # Specify incoming frames are `grayscale` - options = {"jpeg_compression": "GRAY"} - ``` - * **`enable_live_broadcast`** _(boolean)_ : WebGear_RTC by default only supports one-to-one peer connection with a single consumer/client, Hence this boolean attribute can be used to enable live broadcast to multiple peer consumers/clients at same time. Its default value is `False`. Its usage is as follows: !!! note "`enable_infinite_frames` is enforced by default when this attribute is enabled(`True`)." !!! tip "For accessing WebGear_RTC on different Client Devices on the network, use `"0.0.0.0"` as host value instead of `"localhost"` on Host Machine. More information can be found [here ➶](../../../help/webgear_rtc_faqs/#is-it-possible-to-stream-on-a-different-device-on-the-network-with-webgear_rtc)" + ??? new "New in v0.2.2" + `enable_live_broadcast` attribute was added in `v0.2.2`. + ```python # enable live boadcast to multiple consumers. options = {"enable_live_broadcast": True} @@ -135,6 +108,9 @@ This parameter can be used to pass user-defined parameter to WebGear_RTC API by !!! warning "`enable_infinite_frames` is disabled when `enable_live_broadcast` attribute is enabled(`True`)." + ??? new "New in v0.2.1" + `enable_infinite_frames` attribute was added in `v0.2.1`. + ```python # emulate infinite frames options = {"enable_infinite_frames": True} diff --git a/docs/help.md b/docs/help.md index f51e223d3..eba16d9af 100644 --- a/docs/help.md +++ b/docs/help.md @@ -75,7 +75,7 @@ Let others know how you are using VidGear and why you like it! ## Helping Author -> Donations help keep VidGear's development alive and motivate me _(as author)_. :heart: +> Donations help keep VidGear's development alive and motivate me _(as author)_. :heart:{ .heart } It is (like all open source software) a labour of love and something I am doing with my own free time. If you would like to say thanks, please feel free to make a donation through ko-fi: diff --git a/docs/help/get_help.md b/docs/help/get_help.md index 72adbc39a..c8544e6f2 100644 --- a/docs/help/get_help.md +++ b/docs/help/get_help.md @@ -49,8 +49,8 @@ Checkout the Frequently Asked Questions, a curated list of all the questions wit - [WebGear FAQs ➶](webgear_faqs.md) - [WebGear_RTC FAQs ➶](webgear_rtc_faqs.md) - [VideoGear FAQs ➶](videogear_faqs.md) -- [Stabilizer Class FAQs ➶](stabilizer_faqs.md) - [NetGear_Async FAQs ➶](netgear_async_faqs.md) +- [Stabilizer Class FAQs ➶](stabilizer_faqs.md)   @@ -62,17 +62,17 @@ Checkout the Frequently Asked Questions, a curated list of all the questions wit Checkout the Bonus Examples, a curated list of all advanced examples with unusual configuration, which isn't available in Vidgear API's usage examples: -- [CamGear FAQs ➶](camgear_ex.md) -- [PiGear FAQs ➶](pigear_ex.md) -- [ScreenGear FAQs ➶](screengear_ex.md) -- [StreamGear FAQs ➶](streamgear_ex.md) -- [WriteGear FAQs ➶](writegear_ex.md) -- [NetGear FAQs ➶](netgear_ex.md) -- [WebGear FAQs ➶](webgear_ex.md) -- [WebGear_RTC FAQs ➶](webgear_rtc_ex.md) -- [VideoGear FAQs ➶](videogear_ex.md) -- [Stabilizer Class FAQs ➶](stabilizer_ex.md) -- [NetGear_Async FAQs ➶](netgear_async_ex.md) +- [CamGear Examples ➶](camgear_ex.md) +- [PiGear Examples ➶](pigear_ex.md) +- [ScreenGear Examples ➶](screengear_ex.md) +- [StreamGear Examples ➶](streamgear_ex.md) +- [WriteGear Examples ➶](writegear_ex.md) +- [NetGear Examples ➶](netgear_ex.md) +- [WebGear Examples ➶](webgear_ex.md) +- [WebGear_RTC Examples ➶](webgear_rtc_ex.md) +- [VideoGear Examples ➶](videogear_ex.md) +- [NetGear_Async Examples ➶](netgear_async_ex.md) +- [Stabilizer Class Examples ➶](stabilizer_ex.md)   diff --git a/docs/help/videogear_ex.md b/docs/help/videogear_ex.md index 9222b9fe5..ce31c0a70 100644 --- a/docs/help/videogear_ex.md +++ b/docs/help/videogear_ex.md @@ -64,9 +64,9 @@ class image_publisher: # {do something with received ROS node data here} - # read stabilized frames + # read frames frame = self.stream.read() - # check for stabilized frame if None-type + # check for frame if None-type if not (frame is None): # {do something with the frame here} diff --git a/docs/help/writegear_ex.md b/docs/help/writegear_ex.md index fc2b52f47..08ebb7ee8 100644 --- a/docs/help/writegear_ex.md +++ b/docs/help/writegear_ex.md @@ -275,14 +275,13 @@ class image_subscriber: if cv_image: # {do something with the frame here} - - # add circle + # let's add a circle (rows, cols, channels) = cv_image.shape if cols > 60 and rows > 60: cv2.circle(cv_image, (50, 50), 10, 255) # write frame to writer - writer.write(frame) + writer.write(cv_image) def close(self): # safely close video stream diff --git a/docs/index.md b/docs/index.md index efc0a4ec4..6d4303b3f 100644 --- a/docs/index.md +++ b/docs/index.md @@ -108,13 +108,13 @@ If you've come up with some new idea, or looking for the fastest way troubleshoo ## Become a Stargazer -You can be a [**Stargazer :star2:**][stargazer] by starring us on Github, it helps us a lot and you're making it easier for others to find & trust this library. Thanks! +You can be a [**Stargazer** :star2:{ .heart }][stargazer] by starring us on Github, it helps us a lot and you're making it easier for others to find & trust this library. Thanks!   ## Donations -> VidGear is free and open source and will always remain so. :heart: +> VidGear is free and open source and will always remain so. :heart:{ .heart } It is something I am doing with my own free time. If you would like to say thanks, please feel free to make a donation: @@ -126,23 +126,25 @@ It is something I am doing with my own free time. If you would like to say thank Here is a Bibtex entry you can use to cite this project in a publication: -[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.5389830.svg)](https://doi.org/10.5281/zenodo.5389830) +[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.5602375.svg)](https://doi.org/10.5281/zenodo.5602375) ```BibTeX @software{vidgear, - author = {Abhishek Thakur and - Christian Clauss and - Christian Hollinger and - Benjamin Lowe and - Mickaël Schoentgen and - Renaud Bouckenooghe}, - title = {abhiTronix/vidgear: VidGear v0.2.2}, - year = 2021 - publisher = {Zenodo}, - version = {vidgear-0.2.2}, - doi = {10.5281/zenodo.5389830}, - url = {https://doi.org/10.5281/zenodo.5389830} - } + author = {Abhishek Thakur and + Christian Clauss and + Christian Hollinger and + Vincent Boivin and + Benjamin Lowe and + Mickaël Schoentgen and + Renaud Bouckenooghe}, + title = {abhiTronix/vidgear: VidGear v0.2.3}, + month = oct, + year = 2021, + publisher = {Zenodo}, + version = {vidgear-0.2.3}, + doi = {10.5281/zenodo.5602375}, + url = {https://doi.org/10.5281/zenodo.5602375} +} ```   diff --git a/docs/overrides/assets/LICENSE b/docs/overrides/assets/LICENSE index 2cb717772..9ddf92a5e 100755 --- a/docs/overrides/assets/LICENSE +++ b/docs/overrides/assets/LICENSE @@ -1,175 +1,175 @@ -## creative commons - -# Attribution-NonCommercial-ShareAlike 4.0 International - -Creative Commons Corporation (“Creative Commons”) is not a law firm and does not provide legal services or legal advice. Distribution of Creative Commons public licenses does not create a lawyer-client or other relationship. Creative Commons makes its licenses and related information available on an “as-is” basis. Creative Commons gives no warranties regarding its licenses, any material licensed under their terms and conditions, or any related information. Creative Commons disclaims all liability for damages resulting from their use to the fullest extent possible. - -### Using Creative Commons Public Licenses - -Creative Commons public licenses provide a standard set of terms and conditions that creators and other rights holders may use to share original works of authorship and other material subject to copyright and certain other rights specified in the public license below. The following considerations are for informational purposes only, are not exhaustive, and do not form part of our licenses. - -* __Considerations for licensors:__ Our public licenses are intended for use by those authorized to give the public permission to use material in ways otherwise restricted by copyright and certain other rights. Our licenses are irrevocable. Licensors should read and understand the terms and conditions of the license they choose before applying it. Licensors should also secure all rights necessary before applying our licenses so that the public can reuse the material as expected. Licensors should clearly mark any material not subject to the license. This includes other CC-licensed material, or material used under an exception or limitation to copyright. [More considerations for licensors](http://wiki.creativecommons.org/Considerations_for_licensors_and_licensees#Considerations_for_licensors). - -* __Considerations for the public:__ By using one of our public licenses, a licensor grants the public permission to use the licensed material under specified terms and conditions. If the licensor’s permission is not necessary for any reason–for example, because of any applicable exception or limitation to copyright–then that use is not regulated by the license. Our licenses grant only permissions under copyright and certain other rights that a licensor has authority to grant. Use of the licensed material may still be restricted for other reasons, including because others have copyright or other rights in the material. A licensor may make special requests, such as asking that all changes be marked or described. Although not required by our licenses, you are encouraged to respect those requests where reasonable. [More considerations for the public](http://wiki.creativecommons.org/Considerations_for_licensors_and_licensees#Considerations_for_licensees). - -## Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International Public License - -By exercising the Licensed Rights (defined below), You accept and agree to be bound by the terms and conditions of this Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International Public License ("Public License"). To the extent this Public License may be interpreted as a contract, You are granted the Licensed Rights in consideration of Your acceptance of these terms and conditions, and the Licensor grants You such rights in consideration of benefits the Licensor receives from making the Licensed Material available under these terms and conditions. - -### Section 1 – Definitions. - -a. __Adapted Material__ means material subject to Copyright and Similar Rights that is derived from or based upon the Licensed Material and in which the Licensed Material is translated, altered, arranged, transformed, or otherwise modified in a manner requiring permission under the Copyright and Similar Rights held by the Licensor. For purposes of this Public License, where the Licensed Material is a musical work, performance, or sound recording, Adapted Material is always produced where the Licensed Material is synched in timed relation with a moving image. - -b. __Adapter's License__ means the license You apply to Your Copyright and Similar Rights in Your contributions to Adapted Material in accordance with the terms and conditions of this Public License. - -c. __BY-NC-SA Compatible License__ means a license listed at [creativecommons.org/compatiblelicenses](http://creativecommons.org/compatiblelicenses), approved by Creative Commons as essentially the equivalent of this Public License. - -d. __Copyright and Similar Rights__ means copyright and/or similar rights closely related to copyright including, without limitation, performance, broadcast, sound recording, and Sui Generis Database Rights, without regard to how the rights are labeled or categorized. For purposes of this Public License, the rights specified in Section 2(b)(1)-(2) are not Copyright and Similar Rights. - -e. __Effective Technological Measures__ means those measures that, in the absence of proper authority, may not be circumvented under laws fulfilling obligations under Article 11 of the WIPO Copyright Treaty adopted on December 20, 1996, and/or similar international agreements. - -f. __Exceptions and Limitations__ means fair use, fair dealing, and/or any other exception or limitation to Copyright and Similar Rights that applies to Your use of the Licensed Material. - -g. __License Elements__ means the license attributes listed in the name of a Creative Commons Public License. The License Elements of this Public License are Attribution, NonCommercial, and ShareAlike. - -h. __Licensed Material__ means the artistic or literary work, database, or other material to which the Licensor applied this Public License. - -i. __Licensed Rights__ means the rights granted to You subject to the terms and conditions of this Public License, which are limited to all Copyright and Similar Rights that apply to Your use of the Licensed Material and that the Licensor has authority to license. - -j. __Licensor__ means the individual(s) or entity(ies) granting rights under this Public License. - -k. __NonCommercial__ means not primarily intended for or directed towards commercial advantage or monetary compensation. For purposes of this Public License, the exchange of the Licensed Material for other material subject to Copyright and Similar Rights by digital file-sharing or similar means is NonCommercial provided there is no payment of monetary compensation in connection with the exchange. - -l. __Share__ means to provide material to the public by any means or process that requires permission under the Licensed Rights, such as reproduction, public display, public performance, distribution, dissemination, communication, or importation, and to make material available to the public including in ways that members of the public may access the material from a place and at a time individually chosen by them. - -m. __Sui Generis Database Rights__ means rights other than copyright resulting from Directive 96/9/EC of the European Parliament and of the Council of 11 March 1996 on the legal protection of databases, as amended and/or succeeded, as well as other essentially equivalent rights anywhere in the world. - -n. __You__ means the individual or entity exercising the Licensed Rights under this Public License. Your has a corresponding meaning. - -### Section 2 – Scope. - -a. ___License grant.___ - - 1. Subject to the terms and conditions of this Public License, the Licensor hereby grants You a worldwide, royalty-free, non-sublicensable, non-exclusive, irrevocable license to exercise the Licensed Rights in the Licensed Material to: - - A. reproduce and Share the Licensed Material, in whole or in part, for NonCommercial purposes only; and - - B. produce, reproduce, and Share Adapted Material for NonCommercial purposes only. - - 2. __Exceptions and Limitations.__ For the avoidance of doubt, where Exceptions and Limitations apply to Your use, this Public License does not apply, and You do not need to comply with its terms and conditions. - - 3. __Term.__ The term of this Public License is specified in Section 6(a). - - 4. __Media and formats; technical modifications allowed.__ The Licensor authorizes You to exercise the Licensed Rights in all media and formats whether now known or hereafter created, and to make technical modifications necessary to do so. The Licensor waives and/or agrees not to assert any right or authority to forbid You from making technical modifications necessary to exercise the Licensed Rights, including technical modifications necessary to circumvent Effective Technological Measures. For purposes of this Public License, simply making modifications authorized by this Section 2(a)(4) never produces Adapted Material. - - 5. __Downstream recipients.__ - - A. __Offer from the Licensor – Licensed Material.__ Every recipient of the Licensed Material automatically receives an offer from the Licensor to exercise the Licensed Rights under the terms and conditions of this Public License. - - B. __Additional offer from the Licensor – Adapted Material.__ Every recipient of Adapted Material from You automatically receives an offer from the Licensor to exercise the Licensed Rights in the Adapted Material under the conditions of the Adapter’s License You apply. - - C. __No downstream restrictions.__ You may not offer or impose any additional or different terms or conditions on, or apply any Effective Technological Measures to, the Licensed Material if doing so restricts exercise of the Licensed Rights by any recipient of the Licensed Material. - - 6. __No endorsement.__ Nothing in this Public License constitutes or may be construed as permission to assert or imply that You are, or that Your use of the Licensed Material is, connected with, or sponsored, endorsed, or granted official status by, the Licensor or others designated to receive attribution as provided in Section 3(a)(1)(A)(i). - -b. ___Other rights.___ - - 1. Moral rights, such as the right of integrity, are not licensed under this Public License, nor are publicity, privacy, and/or other similar personality rights; however, to the extent possible, the Licensor waives and/or agrees not to assert any such rights held by the Licensor to the limited extent necessary to allow You to exercise the Licensed Rights, but not otherwise. - - 2. Patent and trademark rights are not licensed under this Public License. - - 3. To the extent possible, the Licensor waives any right to collect royalties from You for the exercise of the Licensed Rights, whether directly or through a collecting society under any voluntary or waivable statutory or compulsory licensing scheme. In all other cases the Licensor expressly reserves any right to collect such royalties, including when the Licensed Material is used other than for NonCommercial purposes. - -### Section 3 – License Conditions. - -Your exercise of the Licensed Rights is expressly made subject to the following conditions. - -a. ___Attribution.___ - - 1. If You Share the Licensed Material (including in modified form), You must: - - A. retain the following if it is supplied by the Licensor with the Licensed Material: - - i. identification of the creator(s) of the Licensed Material and any others designated to receive attribution, in any reasonable manner requested by the Licensor (including by pseudonym if designated); - - ii. a copyright notice; - - iii. a notice that refers to this Public License; - - iv. a notice that refers to the disclaimer of warranties; - - v. a URI or hyperlink to the Licensed Material to the extent reasonably practicable; - - B. indicate if You modified the Licensed Material and retain an indication of any previous modifications; and - - C. indicate the Licensed Material is licensed under this Public License, and include the text of, or the URI or hyperlink to, this Public License. - - 2. You may satisfy the conditions in Section 3(a)(1) in any reasonable manner based on the medium, means, and context in which You Share the Licensed Material. For example, it may be reasonable to satisfy the conditions by providing a URI or hyperlink to a resource that includes the required information. - - 3. If requested by the Licensor, You must remove any of the information required by Section 3(a)(1)(A) to the extent reasonably practicable. - -b. ___ShareAlike.___ - -In addition to the conditions in Section 3(a), if You Share Adapted Material You produce, the following conditions also apply. - -1. The Adapter’s License You apply must be a Creative Commons license with the same License Elements, this version or later, or a BY-NC-SA Compatible License. - -2. You must include the text of, or the URI or hyperlink to, the Adapter's License You apply. You may satisfy this condition in any reasonable manner based on the medium, means, and context in which You Share Adapted Material. - -3. You may not offer or impose any additional or different terms or conditions on, or apply any Effective Technological Measures to, Adapted Material that restrict exercise of the rights granted under the Adapter's License You apply. - -### Section 4 – Sui Generis Database Rights. - -Where the Licensed Rights include Sui Generis Database Rights that apply to Your use of the Licensed Material: - -a. for the avoidance of doubt, Section 2(a)(1) grants You the right to extract, reuse, reproduce, and Share all or a substantial portion of the contents of the database for NonCommercial purposes only; - -b. if You include all or a substantial portion of the database contents in a database in which You have Sui Generis Database Rights, then the database in which You have Sui Generis Database Rights (but not its individual contents) is Adapted Material, including for purposes of Section 3(b); and - -c. You must comply with the conditions in Section 3(a) if You Share all or a substantial portion of the contents of the database. - -For the avoidance of doubt, this Section 4 supplements and does not replace Your obligations under this Public License where the Licensed Rights include other Copyright and Similar Rights. - -### Section 5 – Disclaimer of Warranties and Limitation of Liability. - -a. __Unless otherwise separately undertaken by the Licensor, to the extent possible, the Licensor offers the Licensed Material as-is and as-available, and makes no representations or warranties of any kind concerning the Licensed Material, whether express, implied, statutory, or other. This includes, without limitation, warranties of title, merchantability, fitness for a particular purpose, non-infringement, absence of latent or other defects, accuracy, or the presence or absence of errors, whether or not known or discoverable. Where disclaimers of warranties are not allowed in full or in part, this disclaimer may not apply to You.__ - -b. __To the extent possible, in no event will the Licensor be liable to You on any legal theory (including, without limitation, negligence) or otherwise for any direct, special, indirect, incidental, consequential, punitive, exemplary, or other losses, costs, expenses, or damages arising out of this Public License or use of the Licensed Material, even if the Licensor has been advised of the possibility of such losses, costs, expenses, or damages. Where a limitation of liability is not allowed in full or in part, this limitation may not apply to You.__ - -c. The disclaimer of warranties and limitation of liability provided above shall be interpreted in a manner that, to the extent possible, most closely approximates an absolute disclaimer and waiver of all liability. - -### Section 6 – Term and Termination. - -a. This Public License applies for the term of the Copyright and Similar Rights licensed here. However, if You fail to comply with this Public License, then Your rights under this Public License terminate automatically. - -b. Where Your right to use the Licensed Material has terminated under Section 6(a), it reinstates: - - 1. automatically as of the date the violation is cured, provided it is cured within 30 days of Your discovery of the violation; or - - 2. upon express reinstatement by the Licensor. - - For the avoidance of doubt, this Section 6(b) does not affect any right the Licensor may have to seek remedies for Your violations of this Public License. - -c. For the avoidance of doubt, the Licensor may also offer the Licensed Material under separate terms or conditions or stop distributing the Licensed Material at any time; however, doing so will not terminate this Public License. - -d. Sections 1, 5, 6, 7, and 8 survive termination of this Public License. - -### Section 7 – Other Terms and Conditions. - -a. The Licensor shall not be bound by any additional or different terms or conditions communicated by You unless expressly agreed. - -b. Any arrangements, understandings, or agreements regarding the Licensed Material not stated herein are separate from and independent of the terms and conditions of this Public License. - -### Section 8 – Interpretation. - -a. For the avoidance of doubt, this Public License does not, and shall not be interpreted to, reduce, limit, restrict, or impose conditions on any use of the Licensed Material that could lawfully be made without permission under this Public License. - -b. To the extent possible, if any provision of this Public License is deemed unenforceable, it shall be automatically reformed to the minimum extent necessary to make it enforceable. If the provision cannot be reformed, it shall be severed from this Public License without affecting the enforceability of the remaining terms and conditions. - -c. No term or condition of this Public License will be waived and no failure to comply consented to unless expressly agreed to by the Licensor. - -d. Nothing in this Public License constitutes or may be interpreted as a limitation upon, or waiver of, any privileges and immunities that apply to the Licensor or You, including from the legal processes of any jurisdiction or authority. - -> Creative Commons is not a party to its public licenses. Notwithstanding, Creative Commons may elect to apply one of its public licenses to material it publishes and in those instances will be considered the “Licensor.” Except for the limited purpose of indicating that material is shared under a Creative Commons public license or as otherwise permitted by the Creative Commons policies published at [creativecommons.org/policies](http://creativecommons.org/policies), Creative Commons does not authorize the use of the trademark “Creative Commons” or any other trademark or logo of Creative Commons without its prior written consent including, without limitation, in connection with any unauthorized modifications to any of its public licenses or any other arrangements, understandings, or agreements concerning use of licensed material. For the avoidance of doubt, this paragraph does not form part of the public licenses. -> -> Creative Commons may be contacted at creativecommons.org +## creative commons + +# Attribution-NonCommercial-ShareAlike 4.0 International + +Creative Commons Corporation (“Creative Commons”) is not a law firm and does not provide legal services or legal advice. Distribution of Creative Commons public licenses does not create a lawyer-client or other relationship. Creative Commons makes its licenses and related information available on an “as-is” basis. Creative Commons gives no warranties regarding its licenses, any material licensed under their terms and conditions, or any related information. Creative Commons disclaims all liability for damages resulting from their use to the fullest extent possible. + +### Using Creative Commons Public Licenses + +Creative Commons public licenses provide a standard set of terms and conditions that creators and other rights holders may use to share original works of authorship and other material subject to copyright and certain other rights specified in the public license below. The following considerations are for informational purposes only, are not exhaustive, and do not form part of our licenses. + +* __Considerations for licensors:__ Our public licenses are intended for use by those authorized to give the public permission to use material in ways otherwise restricted by copyright and certain other rights. Our licenses are irrevocable. Licensors should read and understand the terms and conditions of the license they choose before applying it. Licensors should also secure all rights necessary before applying our licenses so that the public can reuse the material as expected. Licensors should clearly mark any material not subject to the license. This includes other CC-licensed material, or material used under an exception or limitation to copyright. [More considerations for licensors](http://wiki.creativecommons.org/Considerations_for_licensors_and_licensees#Considerations_for_licensors). + +* __Considerations for the public:__ By using one of our public licenses, a licensor grants the public permission to use the licensed material under specified terms and conditions. If the licensor’s permission is not necessary for any reason–for example, because of any applicable exception or limitation to copyright–then that use is not regulated by the license. Our licenses grant only permissions under copyright and certain other rights that a licensor has authority to grant. Use of the licensed material may still be restricted for other reasons, including because others have copyright or other rights in the material. A licensor may make special requests, such as asking that all changes be marked or described. Although not required by our licenses, you are encouraged to respect those requests where reasonable. [More considerations for the public](http://wiki.creativecommons.org/Considerations_for_licensors_and_licensees#Considerations_for_licensees). + +## Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International Public License + +By exercising the Licensed Rights (defined below), You accept and agree to be bound by the terms and conditions of this Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International Public License ("Public License"). To the extent this Public License may be interpreted as a contract, You are granted the Licensed Rights in consideration of Your acceptance of these terms and conditions, and the Licensor grants You such rights in consideration of benefits the Licensor receives from making the Licensed Material available under these terms and conditions. + +### Section 1 – Definitions. + +a. __Adapted Material__ means material subject to Copyright and Similar Rights that is derived from or based upon the Licensed Material and in which the Licensed Material is translated, altered, arranged, transformed, or otherwise modified in a manner requiring permission under the Copyright and Similar Rights held by the Licensor. For purposes of this Public License, where the Licensed Material is a musical work, performance, or sound recording, Adapted Material is always produced where the Licensed Material is synched in timed relation with a moving image. + +b. __Adapter's License__ means the license You apply to Your Copyright and Similar Rights in Your contributions to Adapted Material in accordance with the terms and conditions of this Public License. + +c. __BY-NC-SA Compatible License__ means a license listed at [creativecommons.org/compatiblelicenses](http://creativecommons.org/compatiblelicenses), approved by Creative Commons as essentially the equivalent of this Public License. + +d. __Copyright and Similar Rights__ means copyright and/or similar rights closely related to copyright including, without limitation, performance, broadcast, sound recording, and Sui Generis Database Rights, without regard to how the rights are labeled or categorized. For purposes of this Public License, the rights specified in Section 2(b)(1)-(2) are not Copyright and Similar Rights. + +e. __Effective Technological Measures__ means those measures that, in the absence of proper authority, may not be circumvented under laws fulfilling obligations under Article 11 of the WIPO Copyright Treaty adopted on December 20, 1996, and/or similar international agreements. + +f. __Exceptions and Limitations__ means fair use, fair dealing, and/or any other exception or limitation to Copyright and Similar Rights that applies to Your use of the Licensed Material. + +g. __License Elements__ means the license attributes listed in the name of a Creative Commons Public License. The License Elements of this Public License are Attribution, NonCommercial, and ShareAlike. + +h. __Licensed Material__ means the artistic or literary work, database, or other material to which the Licensor applied this Public License. + +i. __Licensed Rights__ means the rights granted to You subject to the terms and conditions of this Public License, which are limited to all Copyright and Similar Rights that apply to Your use of the Licensed Material and that the Licensor has authority to license. + +j. __Licensor__ means the individual(s) or entity(ies) granting rights under this Public License. + +k. __NonCommercial__ means not primarily intended for or directed towards commercial advantage or monetary compensation. For purposes of this Public License, the exchange of the Licensed Material for other material subject to Copyright and Similar Rights by digital file-sharing or similar means is NonCommercial provided there is no payment of monetary compensation in connection with the exchange. + +l. __Share__ means to provide material to the public by any means or process that requires permission under the Licensed Rights, such as reproduction, public display, public performance, distribution, dissemination, communication, or importation, and to make material available to the public including in ways that members of the public may access the material from a place and at a time individually chosen by them. + +m. __Sui Generis Database Rights__ means rights other than copyright resulting from Directive 96/9/EC of the European Parliament and of the Council of 11 March 1996 on the legal protection of databases, as amended and/or succeeded, as well as other essentially equivalent rights anywhere in the world. + +n. __You__ means the individual or entity exercising the Licensed Rights under this Public License. Your has a corresponding meaning. + +### Section 2 – Scope. + +a. ___License grant.___ + + 1. Subject to the terms and conditions of this Public License, the Licensor hereby grants You a worldwide, royalty-free, non-sublicensable, non-exclusive, irrevocable license to exercise the Licensed Rights in the Licensed Material to: + + A. reproduce and Share the Licensed Material, in whole or in part, for NonCommercial purposes only; and + + B. produce, reproduce, and Share Adapted Material for NonCommercial purposes only. + + 2. __Exceptions and Limitations.__ For the avoidance of doubt, where Exceptions and Limitations apply to Your use, this Public License does not apply, and You do not need to comply with its terms and conditions. + + 3. __Term.__ The term of this Public License is specified in Section 6(a). + + 4. __Media and formats; technical modifications allowed.__ The Licensor authorizes You to exercise the Licensed Rights in all media and formats whether now known or hereafter created, and to make technical modifications necessary to do so. The Licensor waives and/or agrees not to assert any right or authority to forbid You from making technical modifications necessary to exercise the Licensed Rights, including technical modifications necessary to circumvent Effective Technological Measures. For purposes of this Public License, simply making modifications authorized by this Section 2(a)(4) never produces Adapted Material. + + 5. __Downstream recipients.__ + + A. __Offer from the Licensor – Licensed Material.__ Every recipient of the Licensed Material automatically receives an offer from the Licensor to exercise the Licensed Rights under the terms and conditions of this Public License. + + B. __Additional offer from the Licensor – Adapted Material.__ Every recipient of Adapted Material from You automatically receives an offer from the Licensor to exercise the Licensed Rights in the Adapted Material under the conditions of the Adapter’s License You apply. + + C. __No downstream restrictions.__ You may not offer or impose any additional or different terms or conditions on, or apply any Effective Technological Measures to, the Licensed Material if doing so restricts exercise of the Licensed Rights by any recipient of the Licensed Material. + + 6. __No endorsement.__ Nothing in this Public License constitutes or may be construed as permission to assert or imply that You are, or that Your use of the Licensed Material is, connected with, or sponsored, endorsed, or granted official status by, the Licensor or others designated to receive attribution as provided in Section 3(a)(1)(A)(i). + +b. ___Other rights.___ + + 1. Moral rights, such as the right of integrity, are not licensed under this Public License, nor are publicity, privacy, and/or other similar personality rights; however, to the extent possible, the Licensor waives and/or agrees not to assert any such rights held by the Licensor to the limited extent necessary to allow You to exercise the Licensed Rights, but not otherwise. + + 2. Patent and trademark rights are not licensed under this Public License. + + 3. To the extent possible, the Licensor waives any right to collect royalties from You for the exercise of the Licensed Rights, whether directly or through a collecting society under any voluntary or waivable statutory or compulsory licensing scheme. In all other cases the Licensor expressly reserves any right to collect such royalties, including when the Licensed Material is used other than for NonCommercial purposes. + +### Section 3 – License Conditions. + +Your exercise of the Licensed Rights is expressly made subject to the following conditions. + +a. ___Attribution.___ + + 1. If You Share the Licensed Material (including in modified form), You must: + + A. retain the following if it is supplied by the Licensor with the Licensed Material: + + i. identification of the creator(s) of the Licensed Material and any others designated to receive attribution, in any reasonable manner requested by the Licensor (including by pseudonym if designated); + + ii. a copyright notice; + + iii. a notice that refers to this Public License; + + iv. a notice that refers to the disclaimer of warranties; + + v. a URI or hyperlink to the Licensed Material to the extent reasonably practicable; + + B. indicate if You modified the Licensed Material and retain an indication of any previous modifications; and + + C. indicate the Licensed Material is licensed under this Public License, and include the text of, or the URI or hyperlink to, this Public License. + + 2. You may satisfy the conditions in Section 3(a)(1) in any reasonable manner based on the medium, means, and context in which You Share the Licensed Material. For example, it may be reasonable to satisfy the conditions by providing a URI or hyperlink to a resource that includes the required information. + + 3. If requested by the Licensor, You must remove any of the information required by Section 3(a)(1)(A) to the extent reasonably practicable. + +b. ___ShareAlike.___ + +In addition to the conditions in Section 3(a), if You Share Adapted Material You produce, the following conditions also apply. + +1. The Adapter’s License You apply must be a Creative Commons license with the same License Elements, this version or later, or a BY-NC-SA Compatible License. + +2. You must include the text of, or the URI or hyperlink to, the Adapter's License You apply. You may satisfy this condition in any reasonable manner based on the medium, means, and context in which You Share Adapted Material. + +3. You may not offer or impose any additional or different terms or conditions on, or apply any Effective Technological Measures to, Adapted Material that restrict exercise of the rights granted under the Adapter's License You apply. + +### Section 4 – Sui Generis Database Rights. + +Where the Licensed Rights include Sui Generis Database Rights that apply to Your use of the Licensed Material: + +a. for the avoidance of doubt, Section 2(a)(1) grants You the right to extract, reuse, reproduce, and Share all or a substantial portion of the contents of the database for NonCommercial purposes only; + +b. if You include all or a substantial portion of the database contents in a database in which You have Sui Generis Database Rights, then the database in which You have Sui Generis Database Rights (but not its individual contents) is Adapted Material, including for purposes of Section 3(b); and + +c. You must comply with the conditions in Section 3(a) if You Share all or a substantial portion of the contents of the database. + +For the avoidance of doubt, this Section 4 supplements and does not replace Your obligations under this Public License where the Licensed Rights include other Copyright and Similar Rights. + +### Section 5 – Disclaimer of Warranties and Limitation of Liability. + +a. __Unless otherwise separately undertaken by the Licensor, to the extent possible, the Licensor offers the Licensed Material as-is and as-available, and makes no representations or warranties of any kind concerning the Licensed Material, whether express, implied, statutory, or other. This includes, without limitation, warranties of title, merchantability, fitness for a particular purpose, non-infringement, absence of latent or other defects, accuracy, or the presence or absence of errors, whether or not known or discoverable. Where disclaimers of warranties are not allowed in full or in part, this disclaimer may not apply to You.__ + +b. __To the extent possible, in no event will the Licensor be liable to You on any legal theory (including, without limitation, negligence) or otherwise for any direct, special, indirect, incidental, consequential, punitive, exemplary, or other losses, costs, expenses, or damages arising out of this Public License or use of the Licensed Material, even if the Licensor has been advised of the possibility of such losses, costs, expenses, or damages. Where a limitation of liability is not allowed in full or in part, this limitation may not apply to You.__ + +c. The disclaimer of warranties and limitation of liability provided above shall be interpreted in a manner that, to the extent possible, most closely approximates an absolute disclaimer and waiver of all liability. + +### Section 6 – Term and Termination. + +a. This Public License applies for the term of the Copyright and Similar Rights licensed here. However, if You fail to comply with this Public License, then Your rights under this Public License terminate automatically. + +b. Where Your right to use the Licensed Material has terminated under Section 6(a), it reinstates: + + 1. automatically as of the date the violation is cured, provided it is cured within 30 days of Your discovery of the violation; or + + 2. upon express reinstatement by the Licensor. + + For the avoidance of doubt, this Section 6(b) does not affect any right the Licensor may have to seek remedies for Your violations of this Public License. + +c. For the avoidance of doubt, the Licensor may also offer the Licensed Material under separate terms or conditions or stop distributing the Licensed Material at any time; however, doing so will not terminate this Public License. + +d. Sections 1, 5, 6, 7, and 8 survive termination of this Public License. + +### Section 7 – Other Terms and Conditions. + +a. The Licensor shall not be bound by any additional or different terms or conditions communicated by You unless expressly agreed. + +b. Any arrangements, understandings, or agreements regarding the Licensed Material not stated herein are separate from and independent of the terms and conditions of this Public License. + +### Section 8 – Interpretation. + +a. For the avoidance of doubt, this Public License does not, and shall not be interpreted to, reduce, limit, restrict, or impose conditions on any use of the Licensed Material that could lawfully be made without permission under this Public License. + +b. To the extent possible, if any provision of this Public License is deemed unenforceable, it shall be automatically reformed to the minimum extent necessary to make it enforceable. If the provision cannot be reformed, it shall be severed from this Public License without affecting the enforceability of the remaining terms and conditions. + +c. No term or condition of this Public License will be waived and no failure to comply consented to unless expressly agreed to by the Licensor. + +d. Nothing in this Public License constitutes or may be interpreted as a limitation upon, or waiver of, any privileges and immunities that apply to the Licensor or You, including from the legal processes of any jurisdiction or authority. + +> Creative Commons is not a party to its public licenses. Notwithstanding, Creative Commons may elect to apply one of its public licenses to material it publishes and in those instances will be considered the “Licensor.” Except for the limited purpose of indicating that material is shared under a Creative Commons public license or as otherwise permitted by the Creative Commons policies published at [creativecommons.org/policies](http://creativecommons.org/policies), Creative Commons does not authorize the use of the trademark “Creative Commons” or any other trademark or logo of Creative Commons without its prior written consent including, without limitation, in connection with any unauthorized modifications to any of its public licenses or any other arrangements, understandings, or agreements concerning use of licensed material. For the avoidance of doubt, this paragraph does not form part of the public licenses. +> +> Creative Commons may be contacted at creativecommons.org diff --git a/docs/overrides/assets/stylesheets/custom.css b/docs/overrides/assets/stylesheets/custom.css index 39a9a08c1..cf7fedfb3 100755 --- a/docs/overrides/assets/stylesheets/custom.css +++ b/docs/overrides/assets/stylesheets/custom.css @@ -388,59 +388,16 @@ footer.sponsorship:not(:hover) .twemoji.heart-throb-hover svg { width: 100%; } -main #g6219 { - transform-origin: 85px 4px; - animation: an1 12s 0.5s infinite ease-out; +@keyframes heart { + 0%, 40%, 80%, 100% { + transform: scale(1); + } + 20%, 60% { + transform: scale(1.15); + } } - -@keyframes an1 { - 0% { - transform: rotate(0); - } - - 5% { - transform: rotate(3deg); - } - - 15% { - transform: rotate(-2.5deg); - } - - 25% { - transform: rotate(2deg); - } - - 35% { - transform: rotate(-1.5deg); - } - - 45% { - transform: rotate(1deg); - } - - 55% { - transform: rotate(-1.5deg); - } - - 65% { - transform: rotate(2deg); - } - - 75% { - transform: rotate(-2deg); - } - - 85% { - transform: rotate(2.5deg); - } - - 95% { - transform: rotate(-3deg); - } - - 100% { - transform: rotate(0); - } +.heart { + animation: heart 1000ms infinite; } body[data-md-color-scheme="slate"] img[class="shadow"]{ @@ -466,4 +423,22 @@ body[data-md-color-scheme="slate"] div[class^="admonition"]{ body[data-md-color-scheme="slate"] img[class="shadow2"]{ -webkit-filter: drop-shadow(1px 1px 0 black); filter: drop-shadow(1px 1px 0 black); -} \ No newline at end of file +} + +footer.sponsorship { + text-align: center; +} + footer.sponsorship hr { + display: inline-block; + width: px2rem(32px); + margin: 0 px2rem(14px); + vertical-align: middle; + border-bottom: 2px solid var(--md-default-fg-color--lighter); +} + footer.sponsorship:hover hr { + border-color: var(--md-accent-fg-color); +} + footer.sponsorship:not(:hover) .twemoji.heart-throb-hover svg { + color: var(--md-default-fg-color--lighter) !important; +} + \ No newline at end of file diff --git a/docs/overrides/main.html b/docs/overrides/main.html index ef504cf5d..a962c656e 100644 --- a/docs/overrides/main.html +++ b/docs/overrides/main.html @@ -22,6 +22,18 @@ {% endblock %} +{% block content %} + {{ super() }} + +{% endblock %} {% block libs %} diff --git a/mkdocs.yml b/mkdocs.yml index b4ccf6af8..4dd68b0d0 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -120,7 +120,8 @@ markdown_extensions: - meta - toc: permalink: ⚓ - slugify: !!python/name:pymdownx.slugs.uslugify + slugify: !!python/name:pymdownx.slugs.uslugify_cased + permalink_title: Anchor link to this section for reference - codehilite: guess_lang: false - pymdownx.arithmatex diff --git a/vidgear/gears/helper.py b/vidgear/gears/helper.py index eda2b2e40..56afe2bd8 100755 --- a/vidgear/gears/helper.py +++ b/vidgear/gears/helper.py @@ -39,7 +39,6 @@ from contextlib import closing from pathlib import Path from colorlog import ColoredFormatter -from colorlog.escape_codes import esc from distutils.version import LooseVersion from requests.adapters import HTTPAdapter from requests.packages.urllib3.util.retry import Retry From 6e8bc6ce4b39540fc16fd1572faed3ff8ffa8f0c Mon Sep 17 00:00:00 2001 From: abhiTronix Date: Tue, 16 Nov 2021 08:55:59 +0530 Subject: [PATCH 06/25] =?UTF-8?q?=E2=9A=B0=EF=B8=8F=20Maintenance:=20Remov?= =?UTF-8?q?ed=20dead=20code=20(Fixes=20#266)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 🐛 Removed dead code causing Built-in logging module to hide logs. - 🔥 Removed unused `logging` import. - 💡 Updated code comment. --- vidgear/gears/__init__.py | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/vidgear/gears/__init__.py b/vidgear/gears/__init__.py index f7a36e768..d4ffd1e7f 100644 --- a/vidgear/gears/__init__.py +++ b/vidgear/gears/__init__.py @@ -1,16 +1,9 @@ # import the necessary packages import sys import types -import logging import importlib from distutils.version import LooseVersion -# define custom logger -FORMAT = "%(name)s :: %(levelname)s :: %(message)s" -logging.basicConfig(format=FORMAT) -logger = logging.getLogger("VidGear CORE") -logger.propagate = False - def get_module_version(module=None): """ @@ -57,7 +50,7 @@ def import_core_dependency( Parameters: name (string): name of dependency to be imported. pkg_name (string): (Optional) package name of dependency(if different `pip` name). Otherwise `name` will be used. - custom_message (string): (Optional) custom Import error message to be raised or logged. + custom_message (string): (Optional) custom Import error message to be raised. version (string): (Optional) required minimum/maximum version of the dependency to be imported. mode (boolean): (Optional) Possible values "gte"(greater then equal), "lte"(less then equal), "exact"(exact). Default is "gte". From 15d4c19af98facfa040132cb88d5d32a04815472 Mon Sep 17 00:00:00 2001 From: Zoe Papakipos Date: Tue, 23 Nov 2021 07:05:17 -0800 Subject: [PATCH 07/25] Move most dependencies to extra_requires --- setup.py | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/setup.py b/setup.py index 08c01e8cd..e633144bc 100644 --- a/setup.py +++ b/setup.py @@ -91,19 +91,11 @@ def latest_version(package_name): license="Apache License 2.0", author="Abhishek Thakur", install_requires=[ - "pafy{}".format(latest_version("pafy")), - "yt_dlp{}".format(latest_version("yt_dlp")), # pafy backend - "mss{}".format(latest_version("mss")), "cython", # helper for numpy install "numpy", - "streamlink", "requests", - "pyzmq{}".format(latest_version("pyzmq")), - "simplejpeg{}".format(latest_version("simplejpeg")), "colorlog", "tqdm", - "Pillow", - "pyscreenshot{}".format(latest_version("pyscreenshot")), ] + (["opencv-python"] if test_opencv() else []) + (["picamera"] if ("arm" in platform.uname()[4][:3]) else []), @@ -128,7 +120,21 @@ def latest_version(package_name): ) if (platform.system() != "Windows") else [] - ) + ), + "camgear": [ + "pafy{}".format(latest_version("pafy")), + "yt_dlp{}".format(latest_version("yt_dlp")), # pafy backend + "streamlink", + ], + "netgear": [ + "pyzmq{}".format(latest_version("pyzmq")), + "simplejpeg{}".format(latest_version("simplejpeg")), + ], + "screengear": [ + "mss{}".format(latest_version("mss")), + "Pillow", + "pyscreenshot{}".format(latest_version("pyscreenshot")), + ], }, keywords=[ "OpenCV", From 94466415da2f3498a61c50f0105d0dc0b8f6681a Mon Sep 17 00:00:00 2001 From: Zoe Papakipos Date: Tue, 23 Nov 2021 23:02:56 +0100 Subject: [PATCH 08/25] Update setup.py --- setup.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/setup.py b/setup.py index 11c576a41..92f8e9f6c 100644 --- a/setup.py +++ b/setup.py @@ -124,16 +124,12 @@ def latest_version(package_name): if (platform.system() != "Windows") else [] ), - "camgear": [ + "core": [ "pafy{}".format(latest_version("pafy")), "yt_dlp{}".format(latest_version("yt_dlp")), # pafy backend "streamlink", - ], - "netgear": [ "pyzmq{}".format(latest_version("pyzmq")), "simplejpeg{}".format(latest_version("simplejpeg")), - ], - "screengear": [ "mss{}".format(latest_version("mss")), "Pillow", "pyscreenshot{}".format(latest_version("pyscreenshot")), From 186f27c89138d73362b44350a35834ed94d5c7f8 Mon Sep 17 00:00:00 2001 From: Zoe Papakipos Date: Tue, 23 Nov 2021 23:03:07 +0100 Subject: [PATCH 09/25] Update setup.py --- setup.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/setup.py b/setup.py index 92f8e9f6c..bf4cd605e 100644 --- a/setup.py +++ b/setup.py @@ -108,6 +108,14 @@ def latest_version(package_name): url="https://abhitronix.github.io/vidgear", extras_require={ "asyncio": [ + "pafy{}".format(latest_version("pafy")), + "yt_dlp{}".format(latest_version("yt_dlp")), # pafy backend + "streamlink", + "pyzmq{}".format(latest_version("pyzmq")), + "simplejpeg{}".format(latest_version("simplejpeg")), + "mss{}".format(latest_version("mss")), + "Pillow", + "pyscreenshot{}".format(latest_version("pyscreenshot")), "starlette{}".format(latest_version("starlette")), "jinja2", "uvicorn{}".format(latest_version("uvicorn")), From f2a3ec61de970aa5f3542e6e3d390a876f0bbdd2 Mon Sep 17 00:00:00 2001 From: Zoe Papakipos Date: Wed, 24 Nov 2021 19:24:12 +0100 Subject: [PATCH 10/25] Update setup.py --- setup.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index bf4cd605e..9e232809d 100644 --- a/setup.py +++ b/setup.py @@ -141,7 +141,8 @@ def latest_version(package_name): "mss{}".format(latest_version("mss")), "Pillow", "pyscreenshot{}".format(latest_version("pyscreenshot")), - ], + ] + + (["picamera"] if ("arm" in platform.uname()[4][:3]) else []), }, keywords=[ "OpenCV", From 7185ae63d2c157f2354dd1c3107dddcf10a99e33 Mon Sep 17 00:00:00 2001 From: Zoe Papakipos Date: Wed, 24 Nov 2021 19:24:20 +0100 Subject: [PATCH 11/25] Update setup.py --- setup.py | 1 + 1 file changed, 1 insertion(+) diff --git a/setup.py b/setup.py index 9e232809d..775aa3b83 100644 --- a/setup.py +++ b/setup.py @@ -123,6 +123,7 @@ def latest_version(package_name): "msgpack_numpy{}".format(latest_version("msgpack_numpy")), "aiortc{}".format(latest_version("aiortc")), ] + + (["picamera"] if ("arm" in platform.uname()[4][:3]) else []), + ( ( ["uvloop{}".format(latest_version("uvloop"))] From 3e474f42e541a47429cae8192e2f36013b6918c4 Mon Sep 17 00:00:00 2001 From: Zoe Papakipos Date: Wed, 24 Nov 2021 19:24:29 +0100 Subject: [PATCH 12/25] Update setup.py --- setup.py | 1 - 1 file changed, 1 deletion(-) diff --git a/setup.py b/setup.py index 775aa3b83..4bf2dfbaa 100644 --- a/setup.py +++ b/setup.py @@ -101,7 +101,6 @@ def latest_version(package_name): "tqdm", ] + (["opencv-python"] if test_opencv() else []) - + (["picamera"] if ("arm" in platform.uname()[4][:3]) else []), long_description=long_description, long_description_content_type="text/markdown", author_email="abhi.una12@gmail.com", From add55a8f00a2dd57a3557d0beae6af45a3e701b7 Mon Sep 17 00:00:00 2001 From: abhiTronix Date: Tue, 30 Nov 2021 23:37:23 +0530 Subject: [PATCH 13/25] =?UTF-8?q?=F0=9F=93=9D=20Docs:=20Added=20info=20abo?= =?UTF-8?q?ut=20critical=20changes=20in=20`v0.2.4`=20installation?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 📝 Re-written `pip` and `source` installation docs. - 💄 Added info announcement bar. - ➕ Setup: Updated `extra_require` dependencies. - 👷 CI: Updated vidgear installation. --- .github/workflows/ci_linux.yml | 2 +- docs/installation/pip_install.md | 232 +++++++++++++++++----------- docs/installation/source_install.md | 145 +++++++---------- docs/overrides/main.html | 6 + setup.py | 32 ++-- 5 files changed, 226 insertions(+), 191 deletions(-) diff --git a/.github/workflows/ci_linux.yml b/.github/workflows/ci_linux.yml index 3315441b3..2e88cd445 100644 --- a/.github/workflows/ci_linux.yml +++ b/.github/workflows/ci_linux.yml @@ -63,7 +63,7 @@ jobs: run: bash scripts/bash/install_opencv.sh shell: bash - name: recheck pip_dependencies - run: pip install . + run: pip install .[core] - name: pytest with_ENV run: | mkdir -p $HOME/logs diff --git a/docs/installation/pip_install.md b/docs/installation/pip_install.md index 56a8b4130..f009bfc0a 100644 --- a/docs/installation/pip_install.md +++ b/docs/installation/pip_install.md @@ -26,7 +26,7 @@ limitations under the License. ## Prerequisites -When installing VidGear with [pip](https://pip.pypa.io/en/stable/installing/), you need to check manually if following dependencies are installed: +When installing VidGear with [pip](https://pip.pypa.io/en/stable/installing/), you need to manually install following prerequisites: ??? alert "Upgrade your `pip`" @@ -92,7 +92,7 @@ When installing VidGear with [pip](https://pip.pypa.io/en/stable/installing/), y ``` -### Core Prerequisites :warning: +### Critical Prerequisites :warning: * #### OpenCV @@ -133,38 +133,13 @@ When installing VidGear with [pip](https://pip.pypa.io/en/stable/installing/), y ```sh pip install picamera - ``` - -* #### Aiortc - - Required only if you're using the [**WebGear_RTC**](../../gears/webgear_rtc/overview/) API. You can easily install it via pip: - - ??? error "Microsoft Visual C++ 14.0 is required." - - Installing `aiortc` on windows may sometimes require Microsoft Build Tools for Visual C++ libraries installed. You can easily fix this error by installing any **ONE** of these choices: - - !!! info "While the error is calling for VC++ 14.0 - but newer versions of Visual C++ libraries works as well." - - - Microsoft [Build Tools for Visual Studio](https://visualstudio.microsoft.com/thank-you-downloading-visual-studio/?sku=BuildTools&rel=16). - - Alternative link to Microsoft [Build Tools for Visual Studio](https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-2019). - - Offline installer: [vs_buildtools.exe](https://aka.ms/vs/16/release/vs_buildtools.exe) - - Afterwards, Select: Workloads → Desktop development with C++, then for Individual Components, select only: - - - [x] Windows 10 SDK - - [x] C++ x64/x86 build tools - - Finally, proceed installing `aiortc` via pip. - - ```sh - pip install aiortc - ``` + ``` * #### Uvloop Required only if you're using the [**NetGear_Async**](../../gears/netgear_async/overview/) API on UNIX machines for maximum performance. You can easily install it via pip: - !!! error "uvloop is **[NOT yet supported on Windows Machines](https://github.com/MagicStack/uvloop/issues/14).**" + !!! fail "uvloop is **[NOT yet supported on Windows Machines](https://github.com/MagicStack/uvloop/issues/14).**" !!! warning "Python-3.6 legacies support [**dropped in version `>=1.15.0`**](https://github.com/MagicStack/uvloop/releases/tag/v0.15.0). Kindly install previous `0.14.0` version instead." ```sh @@ -175,70 +150,69 @@ When installing VidGear with [pip](https://pip.pypa.io/en/stable/installing/), y ## Installation + **Installation is as simple as:** -??? warning "Windows Installation" - If you are using Windows, some of the commands given below, may not work out-of-the-box. +???+ danger "Installation command has been changed in `v0.2.4`" - A quick solution may be to preface every Python command with `python -m` like this: + The legacy `#!sh pip install vidgear` command now installs critical bare-minimum dependencies only. Therefore in order to automatically install all the API specific dependencies as previous versions, use `#!sh pip install vidgear[core]` command instead. - ```sh - python -m pip install vidgear + Similarly in your python project files like `setup.py` or `requirements.txt` or `setup.cfg`, use vidgear dependency as `#!sh vidgear[core]>=0.2.4` instead. - # or with asyncio support - python -m pip install vidgear[asyncio] - ``` + !!! note "This change does not affects `#!sh pip install vidgear[asyncio]` command." - And, If you don't have the privileges to the directory you're installing package. Then use `--user` flag, that makes pip install packages in your home directory instead: - ``` sh - python -m pip install --user vidgear +??? experiment "Installing vidgear with only selective dependencies" - # or with asyncio support - python -m pip install --user vidgear[asyncio] - ``` + Starting with version `v0.2.2`, you can now run any VidGear API by installing only just specific dependencies required by the API in use(except for some Core dependencies). - Or, If you're using `py` as alias for installed python, then: + This is useful when you want to manually review, select and install minimal API-specific dependencies on bare-minimum vidgear from scratch on your system: + + - Install bare-minimum vidgear as follows: - ``` sh - py -m pip install --user vidgear + + === "`v0.2.4` and above" - # or with asyncio support - py -m pip install --user vidgear[asyncio] - ``` + ```sh + # Install stable release with bare-minimum dependencies + pip install -U vidgear + ``` -??? experiment "Installing vidgear with only selective dependencies" + === "Older" - Starting with version `v0.2.2`, you can now run any VidGear API by installing only just specific dependencies required by the API in use(except for some Core dependencies). + ```sh + # Install stable without any dependencies + pip install --no-deps vidgear<0.2.4 + ``` - This is useful when you want to manually review, select and install minimal API-specific dependencies on bare-minimum vidgear from scratch on your system: - - - To install bare-minimum vidgear without any dependencies, use [`--no-deps`](https://pip.pypa.io/en/stable/cli/pip_install/#cmdoption-no-deps) pip flag as follows: + - Then, you must install **Critical dependencies**(if not already): - ```sh - # Install stable release without any dependencies - pip install --no-deps --upgrade vidgear - ``` + === "`v0.2.4` and above" - - Then, you must install all **Core dependencies**: + ```sh + # Install opencv(only if not installed previously) + pip install opencv-python + ``` - ```sh - # Install core dependencies - pip install cython, numpy, requests, tqdm, colorlog + === "Older" - # Install opencv(only if not installed previously) - pip install opencv-python - ``` + ```sh + # Install critical dependencies + pip install cython, numpy, requests, tqdm, colorlog + + # Install opencv(only if not installed previously) + pip install opencv-python + ``` - Finally, manually install your **API-specific dependencies** as required by your API(in use): | APIs | Dependencies | |:---:|:---| - | CamGear | `pafy`, `yt_dlp`, `streamlink` | + | CamGear | `yt_dlp`, `streamlink` | | PiGear | `picamera` | - | VideoGear | - | + | VideoGear | *Based on CamGear or PiGear backend in use* | | ScreenGear | `mss`, `pyscreenshot`, `Pillow` | | WriteGear | **FFmpeg:** See [this doc ➶](https://abhitronix.github.io/vidgear/v0.2.2-dev/gears/writegear/compression/advanced/ffmpeg_install/#ffmpeg-installation-instructions) | | StreamGear | **FFmpeg:** See [this doc ➶](https://abhitronix.github.io/vidgear/v0.2.2-dev/gears/streamgear/ffmpeg_install/#ffmpeg-installation-instructions) | @@ -246,39 +220,125 @@ When installing VidGear with [pip](https://pip.pypa.io/en/stable/installing/), y | WebGear | `starlette`, `jinja2`, `uvicorn`, `simplejpeg` | | WebGear_RTC | `aiortc`, `starlette`, `jinja2`, `uvicorn` | | NetGear_Async | `pyzmq`, `msgpack`, `msgpack_numpy`, `uvloop` | + | Stabilizer Class | - | ```sh # Just copy-&-paste from above table pip install ``` +??? warning "Windows Installation" -```sh -# Install latest stable release -pip install -U vidgear + If you are using Windows, some of the commands given below, may not work out-of-the-box. -# Or Install latest stable release with Asyncio support -pip install -U vidgear[asyncio] -``` + A quick solution may be to preface every Python command with `python -m` like this: -**And if you prefer to install VidGear directly from the repository:** + === "`v0.2.4` and above" -```sh -pip install git+git://github.com/abhiTronix/vidgear@master#egg=vidgear + ```sh + # Install latest stable release with all Core dependencies + $ pip install -U vidgear[core] -# or with asyncio support -pip install git+git://github.com/abhiTronix/vidgear@master#egg=vidgear[asyncio] -``` + # Or Install latest stable release with all Core & Asyncio dependencies + $ pip install -U vidgear[asyncio] + ``` -**Or you can also download its wheel (`.whl`) package from our repository's [releases](https://github.com/abhiTronix/vidgear/releases) section, and thereby can be installed as follows:** + === "Older" -```sh -pip install vidgear-0.2.3-py3-none-any.whl + ```sh + # Install latest stable release with all Core dependencies + $ pip install vidgear<0.2.4 + + # Or Install latest stable release with all Core & Asyncio dependencies + $ pip install vidgear[asyncio]<0.2.4 + ``` + + And, If you don't have the privileges to the directory you're installing package. Then use `--user` flag, that makes pip install packages in your home directory instead: + + === "`v0.2.4` and above" + + ```sh + # Install latest stable release with all Core dependencies + $ python -m pip install --upgrade --user vidgear[core] + + # Or Install latest stable release with all Core & Asyncio dependencies + $ python -m pip install --upgrade --user vidgear[asyncio] + ``` + + === "Older" + + ```sh + # Install latest stable release with all Core dependencies + $ python -m pip install --user vidgear<0.2.4 + + # Or Install latest stable release with all Core & Asyncio dependencies + $ python -m pip install --user vidgear[asyncio]<0.2.4 + ``` + + Or, If you're using `py` as alias for installed python, then: + + === "`v0.2.4` and above" -# or with asyncio support -pip install vidgear-0.2.3-py3-none-any.whl[asyncio] -``` + ```sh + # Install latest stable release with all Core dependencies + $ py -m pip install --upgrade --user vidgear[core] + + # Or Install latest stable release with all Core & Asyncio dependencies + $ py -m pip install --upgrade --user vidgear[asyncio] + ``` + + === "Older" + + ```sh + # Install latest stable release with all Core dependencies + $ py -m pip install --user vidgear<0.2.4 + + # Or Install latest stable release with all Core & Asyncio dependencies + $ py -m pip install --user vidgear[asyncio]<0.2.4 + ``` + +=== "`v0.2.4` and above" + + ```sh + # Install latest stable release with all Core dependencies + pip install -U vidgear[core] + + # Or Install latest stable release with all Core & Asyncio dependencies + pip install -U vidgear[asyncio] + ``` + + **And if you prefer to install VidGear directly from the repository:** + + ```sh + # Install latest stable release with all Core dependencies + pip install git+git://github.com/abhiTronix/vidgear@master#egg=vidgear[core] + + # Or Install latest stable release with all Core & Asyncio dependencies + pip install git+git://github.com/abhiTronix/vidgear@master#egg=vidgear[asyncio] + ``` + + **Or you can also download its wheel (`.whl`) package from our repository's [releases](https://github.com/abhiTronix/vidgear/releases) section, and thereby can be installed as follows:** + + ```sh + # Install latest stable release with all Core dependencies + pip install vidgear-0.2.3-py3-none-any.whl[core] + + # Or Install latest stable release with all Core & Asyncio dependencies + pip install vidgear-0.2.3-py3-none-any.whl[asyncio] + ``` + +=== "Older" + + !!! fail "`[core]` keyword isn't available in versions older than `v0.2.4`" + + ```sh + # Install latest stable release with all Core dependencies + pip install vidgear<0.2.4 + + # Or Install latest stable release with Core + Asyncio dependencies + pip install vidgear[asyncio]<0.2.4 + ```   -[^1]: :warning: The `ensurepip` module is missing/disabled on Ubuntu. Use second method. \ No newline at end of file +[^1]: :warning: The `ensurepip` module is missing/disabled on Ubuntu. Use `pip` method only. \ No newline at end of file diff --git a/docs/installation/source_install.md b/docs/installation/source_install.md index 4f6de8628..b84c15622 100644 --- a/docs/installation/source_install.md +++ b/docs/installation/source_install.md @@ -21,16 +21,17 @@ limitations under the License. # Install from source -> _Best option for trying latest patches(maybe experimental), forking for Pull Requests, or automatically installing all dependencies(with a few exceptions)._ +> _Best option for trying latest patches(maybe experimental), forking for Pull Requests, or automatically installing all prerequisites(with a few exceptions)._ ## Prerequisites -When installing VidGear from source, FFmpeg and Aiortc are the only two API specific dependencies you need to install manually: +When installing VidGear from source, FFmpeg is the only API specific prerequisites you need to install manually: -!!! question "What about rest of the dependencies?" - Any other python dependencies _(Core/API specific)_ will be automatically installed based on your OS specifications. +!!! question "What about rest of the prerequisites?" + + Any other python prerequisites _(Critical/API specific)_ will be automatically installed based on your OS/System specifications. ??? alert "Upgrade your `pip`" @@ -108,76 +109,18 @@ When installing VidGear from source, FFmpeg and Aiortc are the only two API spec Follow this dedicated [**FFmpeg Installation doc**](../../gears/writegear/compression/advanced/ffmpeg_install/) for its installation. -* #### Aiortc - - Required only if you're using the [**WebGear_RTC**](../../gears/webgear_rtc/overview/) API. You can easily install it via pip: - - ??? error "Microsoft Visual C++ 14.0 is required." - - Installing `aiortc` on windows may sometimes requires Microsoft Build Tools for Visual C++ libraries installed. You can easily fix this error by installing any **ONE** of these choices: - - !!! info "While the error is calling for VC++ 14.0 - but newer versions of Visual C++ libraries works as well." - - - Microsoft [Build Tools for Visual Studio](https://visualstudio.microsoft.com/thank-you-downloading-visual-studio/?sku=BuildTools&rel=16). - - Alternative link to Microsoft [Build Tools for Visual Studio](https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-2019). - - Offline installer: [vs_buildtools.exe](https://aka.ms/vs/16/release/vs_buildtools.exe) - - Afterwards, Select: Workloads → Desktop development with C++, then for Individual Components, select only: - - - [x] Windows 10 SDK - - [x] C++ x64/x86 build tools - - Finally, proceed installing `aiortc` via pip. - - ```sh - pip install aiortc - ``` -   -## Installation - -**If you want to just install and try out the checkout the latest beta [`testing`](https://github.com/abhiTronix/vidgear/tree/testing) branch , you can do so with the following command:** - -!!! info "This can be useful if you want to provide feedback for a new feature or want to confirm if a bug you have encountered is fixed in the `testing` branch." - -!!! warning "DO NOT clone or install `development` branch unless advised, as it is not tested with CI environments and possibly very unstable or unusable." - -??? tip "Windows Installation" - - * Install [git for windows](https://gitforwindows.org/). - - * Use following commands to clone and install VidGear: - - ```sh - # clone the repository and get inside - git clone https://github.com/abhiTronix/vidgear.git && cd vidgear - - # checkout the latest testing branch - git checkout testing - # install normally - python -m pip install . +## Installation - # OR install with asyncio support - python - m pip install .[asyncio] - ``` - - * If you're using `py` as alias for installed python, then: - ``` sh - # clone the repository and get inside - git clone https://github.com/abhiTronix/vidgear.git && cd vidgear +**If you want to checkout the latest beta [`testing`](https://github.com/abhiTronix/vidgear/tree/testing) branch , you can do so with the following commands:** - # checkout the latest testing branch - git checkout testing - # install normally - python -m pip install . +!!! info "This can be useful if you want to provide feedback for a new feature or bug fix in the `testing` branch." - # OR install with asyncio support - python - m pip install .[asyncio] - ``` +!!! danger "DO NOT clone or install any other branch other than `testing` unless advised, as it is not tested with CI environments and possibly very unstable or unusable." ??? experiment "Installing vidgear with only selective dependencies" @@ -185,7 +128,7 @@ When installing VidGear from source, FFmpeg and Aiortc are the only two API spec This is useful when you want to manually review, select and install minimal API-specific dependencies on bare-minimum vidgear from scratch on your system: - - To install bare-minimum vidgear without any dependencies, use [`--no-deps`](https://pip.pypa.io/en/stable/cli/pip_install/#cmdoption-no-deps) pip flag as follows: + - To clone and install bare-minimum vidgear without any dependencies do as follows: ```sh # clone the repository and get inside @@ -194,16 +137,13 @@ When installing VidGear from source, FFmpeg and Aiortc are the only two API spec # checkout the latest testing branch git checkout testing - # Install without any dependencies + # Install stable release with bare-minimum dependencies pip install --no-deps . ``` - - Then, you must install all **Core dependencies**: + - Then, you must install **Critical dependencies**(if not already): ```sh - # Install core dependencies - pip install cython, numpy, requests, tqdm, colorlog - # Install opencv(only if not installed previously) pip install opencv-python ``` @@ -213,9 +153,9 @@ When installing VidGear from source, FFmpeg and Aiortc are the only two API spec | APIs | Dependencies | |:---:|:---| - | CamGear | `pafy`, `yt_dlp`, `streamlink` | + | CamGear | `yt_dlp`, `streamlink` | | PiGear | `picamera` | - | VideoGear | - | + | VideoGear | *Based on CamGear or PiGear backend in use* | | ScreenGear | `mss`, `pyscreenshot`, `Pillow` | | WriteGear | **FFmpeg:** See [this doc ➶](https://abhitronix.github.io/vidgear/v0.2.2-dev/gears/writegear/compression/advanced/ffmpeg_install/#ffmpeg-installation-instructions) | | StreamGear | **FFmpeg:** See [this doc ➶](https://abhitronix.github.io/vidgear/v0.2.2-dev/gears/streamgear/ffmpeg_install/#ffmpeg-installation-instructions) | @@ -223,36 +163,63 @@ When installing VidGear from source, FFmpeg and Aiortc are the only two API spec | WebGear | `starlette`, `jinja2`, `uvicorn`, `simplejpeg` | | WebGear_RTC | `aiortc`, `starlette`, `jinja2`, `uvicorn` | | NetGear_Async | `pyzmq`, `msgpack`, `msgpack_numpy`, `uvloop` | + | Stabilizer Class | - | ```sh # Just copy-&-paste from above table pip install ``` -```sh - # clone the repository and get inside - git clone https://github.com/abhiTronix/vidgear.git && cd vidgear +??? warning "Windows Installation" - # checkout the latest testing branch - git checkout testing + If you are using Windows, some of the commands given below, may not work out-of-the-box. - # install normally - pip install . + A quick solution may be to preface every Python command with `python -m` like this: - # OR install with asyncio support - pip install .[asyncio] -``` + ```sh + # Install latest stable release with all Core dependencies + pip install -U .[core] -**Or just install directly without cloning:** + # Or Install latest stable release with all Core & Asyncio dependencies + pip install -U .[asyncio] + ``` + + And, If you don't have the privileges to the directory you're installing package. Then use `--user` flag, that makes pip install packages in your home directory instead: + + ```sh + # Install latest stable release with all Core dependencies + python -m pip install --upgrade --user .[core] + + # Or Install latest stable release with all Core & Asyncio dependencies + python -m pip install --upgrade --user .[asyncio] + ``` + + Or, If you're using `py` as alias for installed python, then: + + ```sh + # Install latest stable release with all Core dependencies + py -m pip install --upgrade --user .[core] + + # Or Install latest stable release with all Core & Asyncio dependencies + py -m pip install --upgrade --user .[asyncio] + ``` + ```sh -pip install git+git://github.com/abhiTronix/vidgear@testing#egg=vidgear +# clone the repository and get inside +git clone https://github.com/abhiTronix/vidgear.git && cd vidgear + +# checkout the latest testing branch +git checkout testing + +# Install latest stable release with all Core dependencies +pip install -U .[core] -# or with asyncio support -pip install git+git://github.com/abhiTronix/vidgear@testing#egg=vidgear[asyncio] +# Or Install latest stable release with all Core & Asyncio dependencies +pip install -U .[asyncio] ```   -[^1]: The `ensurepip` module was added to the Python standard library in Python 3.4. +[^1]: :warning: The `ensurepip` module is missing/disabled on Ubuntu. Use `pip` method only. diff --git a/docs/overrides/main.html b/docs/overrides/main.html index a962c656e..ef2e6841e 100644 --- a/docs/overrides/main.html +++ b/docs/overrides/main.html @@ -22,6 +22,12 @@ {% endblock %} +{% block announce %} + + {% set announcement_link = config.site_url ~ 'installation/pip_install/#Installation' %} + + Installation command has been changed in v0.2.4. More information can be found here ➶ +{% endblock %} {% block content %} {{ super() }}