Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🎉 Release VidGear Stable v0.3.3 #411

Merged
merged 86 commits into from
Jun 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
86 commits
Select commit Hold shift + click to select a range
4497fbb
🔖 Bumped version to `0.3.3`.
abhiTronix Sep 10, 2023
a4efa4b
📝 Docs: Added instructions for compiling OpenCV with GSTREAMER backen…
abhiTronix Sep 28, 2023
83aee85
🎉 feat(PiGear): Add official support for new Picamera2 API (Fixes #342)
abhiTronix Apr 9, 2024
c107674
⚡️ PiGear: Lowered framerate minimum value to `0.0`.
abhiTronix Apr 9, 2024
8e3d092
📝 Docs: Updated Zenodo badge and the BibTeX entry.
abhiTronix Apr 11, 2024
3a0d6a0
📝 Docs: Added instructions to install Picamera2 library as dependency.
abhiTronix Apr 14, 2024
37066b1
🏗️ Docs: Removed `Importing` section from overview to avoid confusion…
abhiTronix Apr 14, 2024
41d2ba1
📝 Docs: Overhaul to mkdocs theme and Picamera2 installation doc.
abhiTronix Apr 22, 2024
28a8207
🏗️ PiGear: New Picamera2 backend related changes
abhiTronix Apr 24, 2024
29fbd72
📝 Docs: Updated PiGear API tagline and introduction
abhiTronix Apr 27, 2024
ef6a002
📝 Docs: Updated PiGear documentation for new Picamera2 backend integr…
abhiTronix May 12, 2024
ef45b08
⚡️PiGear: Enhanced `picamera2` API support and logging
abhiTronix May 12, 2024
2920417
🐛 fix(PiGear): UnboundLocalError: 'picamera2'
abhiTronix May 13, 2024
bcd8212
🐛 fix(PiGear): Fixed UnboundLocalError: 'queue' referenced before ass…
abhiTronix May 13, 2024
22e8218
🚑️ fix(helper.py): Added patch for substring index bug in `get_suppor…
abhiTronix May 13, 2024
a73cd45
🎨 Docs: Updated code highlighting in NetGear_Async Docs.
abhiTronix May 13, 2024
7770489
💚 CI: Fixing `pip install` hash bug in Azure Pipeline.
abhiTronix May 13, 2024
e119365
feat(PiGear): Official Support for Picamera2 API (Fixes #342) [PR #392]
abhiTronix May 13, 2024
e497ac2
👷 CI: Update `deploy_docs` workflow to use alias copy instead of no-r…
abhiTronix May 13, 2024
ee11937
📝 Docs: Added workaround for 'AttributeError: 'DXCamera' object has n…
abhiTronix May 14, 2024
08b583d
⚡️ Maintenance: Refactor WebGear and WebGear RTC shutdown handling
abhiTronix May 15, 2024
af6d659
💚 CI: Deprecated event_loop fixture overrides.
abhiTronix May 16, 2024
993cdea
🩹 NetGear_Async: Fixed event loop handling
abhiTronix May 16, 2024
d035e4a
🚑️ NetGear_Async: Fix event loop initialization on Windows platforms
abhiTronix May 18, 2024
d8e0149
📝 Docs: Refactor docs and site configuration
abhiTronix May 19, 2024
e40855f
💚 CI: Refactor event loop handling
abhiTronix May 19, 2024
89b1c65
♻️ Docs: Refactored documentation
abhiTronix May 19, 2024
6285688
🚑️ PiGear: Modify `PiGear` class behavior when `enforce_legacy_picame…
abhiTronix May 20, 2024
20dec0a
🔧 Deprecate on_shutdown in favor of lifespan (Fixes #397) [#398]
abhiTronix May 20, 2024
e655f90
🐛 StreamGear: Refactor stream copy handling (Fixes #396)
abhiTronix May 21, 2024
33abf4a
📝 Docs: Update StreamGear usage examples for device audio input
abhiTronix May 24, 2024
27c0ff2
💥 StreamGear: Deprecate `terminate()` method and introduce `close()`
abhiTronix May 24, 2024
ec6ae3d
🚑️ Setup: Update `setup.py` to use the latest versions of pyzmq (Fixe…
abhiTronix May 24, 2024
9e537d1
📝 Docs: Update StreamGear documentation
abhiTronix May 29, 2024
42343cd
✨ Helper: Added custom `deprecated` decorator
abhiTronix May 29, 2024
a8fc5b4
⚡️ StreamGear: Handled process termination gracefully
abhiTronix May 29, 2024
19cf611
📝 Docs: Updated StreamGear documentation
abhiTronix May 30, 2024
58a8256
🚑️ StreamGear: Remove non-essential aspect ratio parameter (Fixes #385)
abhiTronix May 30, 2024
d6d78f1
📝 Docs: Update documentation for forced termination
abhiTronix May 30, 2024
7cafc8b
💥 StreamGear: Restricted `-livestream` parameter to Real-time Frames …
abhiTronix May 30, 2024
bfc521d
♻️ Docs: Refactored the StreamGear API Parameters documentation to en…
abhiTronix May 30, 2024
abeb955
☂️ CI: Improved code coverage for StreamGear
abhiTronix May 31, 2024
6b25322
🚑️ Maintenance: Handled signal interruption for non-Windows systems
abhiTronix May 31, 2024
b9b0a4b
🚑️ StreamGear: Fixed `UnboundLocalError` for `seg_duration` in `gener…
abhiTronix May 31, 2024
428621d
🏗️ StreamGear: Fixed stream `copy` incompatible with Real-time Frames…
abhiTronix May 31, 2024
e7f887a
🚑️ NetGear: Isolated contexts for Secure Modes
abhiTronix Jun 1, 2024
3fbd610
⚡️NetGear: Handle graceful termination of ZMQ AuthenticationThread
abhiTronix Jun 1, 2024
0a0105c
⚡️NetGear: Handle graceful termination of ZMQ Context
abhiTronix Jun 1, 2024
2873e75
📝 Docs: Added warning for Secure Mode issues with PyZMQ `versions > 2…
abhiTronix Jun 1, 2024
355596a
💚 CI: Fixed skip condition on wrong NetGear test.
abhiTronix Jun 1, 2024
cbff332
💚 CI: Fixed typos in NetGear Tests
abhiTronix Jun 1, 2024
4088132
💚 CI: Enabled `kill=True` in `close()` in NetGear Tests
abhiTronix Jun 1, 2024
15c4914
⏪️ NetGear: Reverted Handle graceful termination of ZMQ Context.
abhiTronix Jun 1, 2024
46c9897
🚑️ StreamGear: Restricted terminating the FFmpeg process to device au…
abhiTronix Jun 1, 2024
0b0de0b
☂️ CI: Improved code coverage for StreamGear and WriteGear
abhiTronix Jun 1, 2024
491e753
🐛 NetGear: Fixed Secure Mode failing to work on conflicting ZMQ Conte…
abhiTronix Jun 6, 2024
1e8d0b5
💚 CI: Fixed `test_secure_mode` test
abhiTronix Jun 6, 2024
c101402
⏪️ NetGear: Reverted Handle graceful termination of ZMQ Context.
abhiTronix Jun 6, 2024
d4243ab
⚡️Enhancements, Refactoring, and Maintenance Updates for StreamGear A…
abhiTronix Jun 7, 2024
6a40e8d
⚡️ WebGear_RTC: Improved connection handling
abhiTronix Jun 8, 2024
8667e5e
👷 CI: Improved WebGear RTC tests
abhiTronix Jun 8, 2024
49cc04f
⚡️ StreamGear: Updated support of Stream Copy in Single Source mode. …
abhiTronix Jun 9, 2024
2af68cf
♻️ Core: Refactored colorspace handling in videocapture gears.
abhiTronix Jun 9, 2024
fb76a2d
⚡️ WriterGear: Improve error handling in `execute_ffmpeg_cmd` method
abhiTronix Jun 9, 2024
7412229
🩹 NetGear: Updated parameters and documentation (Fixes #390)
abhiTronix Jun 18, 2024
645231c
🚑️ StreamGear: Moved handle streaming `format` to beginning to fix '…
abhiTronix Jun 18, 2024
e4142ac
⚗️ CI: Testing simplejpeg import
abhiTronix Jun 18, 2024
626b64a
🚑️ CI: Fixed `simplejpeg` and `opencv` not compatible with `numpy==2.…
abhiTronix Jun 18, 2024
1742977
🚑️ CI: Fixed word splitting when installing numpy.
abhiTronix Jun 19, 2024
3e1e10a
⚡️ Core: Improved exception handling for module imports.
abhiTronix Jun 19, 2024
8b765b9
👷 CI: Added tests for `import_dependency_safe` function
abhiTronix Jun 19, 2024
cb769d3
💚 CI: Fixed invalid escape sequence in testcase string.
abhiTronix Jun 19, 2024
9f4a1e3
💚 CI: Fixed invalid escape sequence in testcase string.
abhiTronix Jun 19, 2024
f263960
💚 CI: Fixed missing `pytest` dependency in appveyor.yml
abhiTronix Jun 19, 2024
1a77e5b
💚 CI: Removed pinned `cryptography==38.0.4` dependency.
abhiTronix Jun 19, 2024
0d9071e
💚 CI: Fixed python environment bugs in `appveyor.yml`
abhiTronix Jun 19, 2024
e533553
⚡️Core: APIs Bug Fixes and Enhancements
abhiTronix Jun 19, 2024
77ee817
📝 Docs: Minor updates to reference page titles.
abhiTronix Jun 20, 2024
15c46fa
🐛 CamGear: Fixed logging condition for yt-dlp (Fixes #394)
abhiTronix Jun 20, 2024
246d36d
🧑‍💻 Enhanced error messages for WebGear auto-generation workflow (Fix…
abhiTronix Jun 20, 2024
c90183a
👷 CI: Rearranged the dependencies
abhiTronix Jun 20, 2024
c456574
Core: More Minor API Bugfixes and Updates [PR #409]
abhiTronix Jun 20, 2024
0f620e6
🚑️ Setup.py: Fixed `simplejpeg` requires `python>=3.9` for its latest…
abhiTronix Jun 20, 2024
7a25a80
✨ Helper: Added support for SRTP/RTSPS in `is_valid_url` function (Fi…
abhiTronix Jun 20, 2024
9e80b7c
📝 Docs: Updated `changelog.md`.
abhiTronix Jun 22, 2024
0677976
📝 Docs: Updated `README.md`.
abhiTronix Jun 22, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/ci_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,12 @@ jobs:
chmod +x scripts/bash/install_opencv.sh
- name: install pip_dependencies
run: |
pip install -U pip wheel numpy
pip install -U .[asyncio]
pip install -U pip wheel
pip install "numpy<2.0.0"
pip install -U .[asyncio] six httpx yt_dlp paramiko
pip uninstall opencv-python -y
pip install -U flake8 six codecov httpx pytest pytest-asyncio pytest-cov yt_dlp mpegdash paramiko m3u8 async-asgi-testclient
pip install -U flake8 codecov pytest pytest-asyncio pytest-cov mpegdash m3u8 async-asgi-testclient
pip install -U deffcode
pip install cryptography==38.0.4
if: success()
- name: run prepare_dataset_script
run: bash scripts/bash/prepare_dataset.sh
Expand Down
18 changes: 12 additions & 6 deletions .github/workflows/deploy_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@ jobs:
if: success()
- name: install_dependencies
run: |
pip install -U mkdocs mkdocs-material mkdocs-git-revision-date-localized-plugin mkdocs-minify-plugin mkdocs-exclude mike mkdocstrings mkdocstrings-python-legacy
pip install -U mkdocs mkdocs-material mkdocs-git-revision-date-localized-plugin mkdocs-minify-plugin
pip install -U mkdocs-exclude mike mkdocstrings mkdocstrings-python-legacy
pip install -U mkdocs-git-authors-plugin
pip install jinja2==3.0.*
if: success()
- name: git configure
Expand All @@ -65,7 +67,7 @@ jobs:
- name: mike deploy docs release
run: |
echo "${{ env.NAME_RELEASE }}"
mike deploy --push --update-aliases --no-redirect ${{ env.NAME_RELEASE }} ${{ env.RELEASE_NAME }} --title=${{ env.RELEASE_NAME }}
mike deploy --push --update-aliases --alias-type=copy ${{ env.NAME_RELEASE }} ${{ env.RELEASE_NAME }} --title=${{ env.RELEASE_NAME }}
env:
NAME_RELEASE: "v${{ env.RELEASE_NAME }}-release"
if: success()
Expand All @@ -88,7 +90,9 @@ jobs:
if: success()
- name: install_dependencies
run: |
pip install -U mkdocs mkdocs-material mkdocs-git-revision-date-localized-plugin mkdocs-minify-plugin mkdocs-exclude mike mkdocstrings mkdocstrings-python-legacy
pip install -U mkdocs mkdocs-material mkdocs-git-revision-date-localized-plugin mkdocs-minify-plugin
pip install -U mkdocs-exclude mike mkdocstrings mkdocstrings-python-legacy
pip install -U mkdocs-git-authors-plugin
pip install jinja2==3.0.*
if: success()
- name: git configure
Expand All @@ -106,7 +110,7 @@ jobs:
- name: mike deploy docs stable
run: |
echo "${{ env.NAME_STABLE }}"
mike deploy --push --update-aliases --no-redirect ${{ env.NAME_STABLE }} latest --title=latest
mike deploy --push --update-aliases --alias-type=copy ${{ env.NAME_STABLE }} latest --title=latest
mike set-default --push latest
env:
NAME_STABLE: "v${{ env.RELEASE_NAME }}-stable"
Expand All @@ -131,7 +135,9 @@ jobs:
if: success()
- name: install_dependencies
run: |
pip install -U mkdocs mkdocs-material mkdocs-git-revision-date-localized-plugin mkdocs-minify-plugin mkdocs-exclude mike mkdocstrings mkdocstrings-python-legacy
pip install -U mkdocs mkdocs-material mkdocs-git-revision-date-localized-plugin mkdocs-minify-plugin
pip install -U mkdocs-exclude mike mkdocstrings mkdocstrings-python-legacy
pip install -U mkdocs-git-authors-plugin
pip install jinja2==3.0.*
if: success()
- name: git configure
Expand All @@ -149,7 +155,7 @@ jobs:
- name: mike deploy docs dev
run: |
echo "Releasing ${{ env.NAME_DEV }}"
mike deploy --push --update-aliases --no-redirect ${{ env.NAME_DEV }} dev --title=dev
mike deploy --push --update-aliases --alias-type=copy ${{ env.NAME_DEV }} dev --title=dev
env:
NAME_DEV: "v${{ env.RELEASE_NAME }}-dev"
if: success()
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ venv
Pipfile.lock
env3.*
env
.cache
.coverage
coverage.xml
.netlify
Expand Down
71 changes: 40 additions & 31 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ limitations under the License.

&nbsp;

VidGear is a **High-Performance Video Processing Python Library** that provides an easy-to-use, highly extensible, thoroughly optimised **Multi-Threaded + Asyncio API Framework** on top of many state-of-the-art specialized libraries like _[OpenCV][opencv], [FFmpeg][ffmpeg], [ZeroMQ][zmq], [picamera][picamera], [starlette][starlette], [yt_dlp][yt_dlp], [pyscreenshot][pyscreenshot], [dxcam][dxcam], [aiortc][aiortc] and [python-mss][mss]_ serving at its backend, and enable us to flexibly exploit their internal parameters and methods, while silently delivering **robust error-handling and real-time performance 🔥**
VidGear is a **High-Performance Video Processing Python Library** that provides an easy-to-use, highly extensible, thoroughly optimised **Multi-Threaded + Asyncio API Framework** on top of many state-of-the-art specialized libraries like _[OpenCV][opencv], [FFmpeg][ffmpeg], [ZeroMQ][zmq], [picamera2][picamera2], [starlette][starlette], [yt_dlp][yt_dlp], [pyscreenshot][pyscreenshot], [dxcam][dxcam], [aiortc][aiortc] and [python-mss][mss]_ serving at its backend, and enable us to flexibly exploit their internal parameters and methods, while silently delivering **robust error-handling and real-time performance 🔥**

VidGear primarily focuses on simplicity, and thereby lets programmers and software developers to easily integrate and perform Complex Video Processing Tasks, in just a few lines of code.

Expand Down Expand Up @@ -122,7 +122,7 @@ Each API is designed exclusively to handle/control/process different data-specif
**A. Video-Capture Gears:**

- [**CamGear:**](#camgear) Multi-Threaded API targeting various IP-USB-Cameras/Network-Streams/Streaming-Sites-URLs.
- [**PiGear:**](#pigear) Multi-Threaded API targeting various Raspberry-Pi Camera Modules.
- [**PiGear:**](#pigear) Multi-Threaded API targeting various Camera Modules and _(limited)_ USB cameras on Raspberry Pis :grapes:.
- [**ScreenGear:**](#screengear) High-performance API targeting rapid Screencasting Capabilities.
- [**VideoGear:**](#videogear) Common Video-Capture API with internal [Video Stabilizer](https://abhitronix.github.io/vidgear/latest/gears/stabilizer/overview/) wrapper.

Expand Down Expand Up @@ -265,27 +265,35 @@ stream_stab.stop()
<img src="https://abhitronix.github.io/vidgear/latest/assets/images/picam2.webp" alt="PiGear" width="50%" />
</p>

> _PiGear is similar to CamGear but made to support various Raspberry Pi Camera Modules _(such as [OmniVision OV5647 Camera Module][ov5647-picam] and [Sony IMX219 Camera Module][imx219-picam])_._
> _PiGear is a specialized API similar to the [CamGear API](#camgear) but optimized for **Raspberry Pi :grapes: Boards**, offering comprehensive **support for camera modules** _(e.g., [OmniVision OV5647 Camera Module][ov5647-picam], [Sony IMX219 Camera Module][imx219-picam])_, along with **limited compatibility for USB cameras**._

PiGear provides a flexible multi-threaded framework around complete [picamera](https://picamera.readthedocs.io/en/release-1.13/index.html) python library, and provide us the ability to exploit almost all of its parameters like `brightness, saturation, sensor_mode, iso, exposure, etc.` effortlessly. Furthermore, PiGear also supports multiple camera modules, such as in the case of Raspberry-Pi Compute Module IO boards.
PiGear implements a seamless and robust wrapper around the [picamera2][picamera2] python library, simplifying integration with minimal code changes and ensuring a smooth transition for developers already familiar with the Picamera2 API. PiGear leverages the `libcamera` API under the hood with multi-threading, providing high-performance :fire:, enhanced control and functionality for Raspberry Pi camera modules.

PiGear handles common configuration parameters and non-standard settings for various camera types, simplifying the integration process. PiGear currently supports PiCamera2 API parameters such as `sensor`, `controls`, `transform`, and `format` etc., with internal type and sanity checks for robust performance.

While primarily focused on Raspberry Pi camera modules, PiGear also provides **basic functionality for USB webcams** only with Picamera2 API, along with the ability to accurately differentiate between USB and Raspberry Pi cameras using metadata.

PiGear seamlessly switches to the legacy [picamera][picamera] library if the `picamera2` library is unavailable, ensuring seamless backward compatibility. For this, PiGear also provides a flexible multi-threaded framework around complete `picamera` API, allowing developers to effortlessly exploit a wide range of parameters, such as `brightness`, `saturation`, `sensor_mode`, `iso`, `exposure`, and more.

Furthermore, PiGear supports the use of multiple camera modules, including those found on Raspberry Pi Compute Module IO boards and USB cameras _(only with Picamera2 API)_.

Best of all, PiGear contains **Threaded Internal Timer** - that silently keeps active track of any frozen-threads/hardware-failures and exit safely, if any does occur. That means that if you're running PiGear API in your script and someone accidentally pulls the Camera-Module cable out, instead of going into possible kernel panic, API will exit safely to save resources.

**Code to open picamera stream with variable parameters in PiGear API:**
**Code to open picamera2 stream with variable parameters in PiGear API:**

```python
# import required libraries
from vidgear.gears import PiGear
from libcamera import Transform
import cv2

# add various Picamera tweak parameters to dictionary
# formulate various Picamera2 API
# configurational parameters
options = {
"hflip": True,
"exposure_mode": "auto",
"iso": 800,
"exposure_compensation": 15,
"awb_mode": "horizon",
"sensor_mode": 0,
"controls": {"Brightness": 0.5, "ExposureValue": 2.0},
"transform": Transform(hflip=1),
"sensor": {"output_size": (480, 320)}, # will override `resolution`
"format": "RGB888", # 8-bit BGR
}

# open pi video stream with defined parameters
Expand Down Expand Up @@ -316,7 +324,6 @@ cv2.destroyAllWindows()

# safely close video stream
stream.stop()

```

### PiGear API Guide:
Expand Down Expand Up @@ -420,21 +427,21 @@ In addition to this, WriteGear also provides flexible access to [**OpenCV's Vide
<img src="https://abhitronix.github.io/vidgear/latest/assets/images/streamgear_flow.webp" alt="NetGear API" width=80%/>
</p>

> _StreamGear automates transcoding workflow for generating Ultra-Low Latency, High-Quality, Dynamic & Adaptive Streaming Formats (such as MPEG-DASH and Apple HLS) in just few lines of python code._
> _StreamGear streamlines and simplifies the transcoding workflow to generate Ultra-Low Latency, High-Quality, Dynamic & Adaptive Streaming Formats like MPEG-DASH and Apple HLS with just a few lines of Python code, allowing developers to focus on their application logic rather than dealing with the complexities of transcoding and chunking media files._

StreamGear provides a standalone, highly extensible, and flexible wrapper around [**FFmpeg**][ffmpeg] multimedia framework for generating chunked-encoded media segments of the content.
StreamGear API provides a standalone, highly extensible, and flexible wrapper around the [**FFmpeg**](https://ffmpeg.org/) multimedia framework for generating chunk-encoded media segments from your multimedia content effortlessly.

SteamGear is an out-of-the-box solution for transcoding source videos/audio files & real-time video frames and breaking them into a sequence of multiple smaller chunks/segments of suitable lengths. These segments make it possible to stream videos at different quality levels _(different bitrates or spatial resolutions)_ and can be switched in the middle of a video from one quality level to another – if bandwidth permits – on a per-segment basis. A user can serve these segments on a web server that makes it easier to download them through HTTP standard-compliant GET requests.
With StreamGear, you can transcode source video/audio files and real-time video frames into a sequence of multiple smaller chunks/segments of suitable lengths. These segments facilitate streaming at different quality levels _(bitrates or spatial resolutions)_ and allow for seamless switching between quality levels during playback based on available bandwidth. You can serve these segments on a web server, making them easily accessible via standard **HTTP GET** requests.

SteamGear currently supports [**MPEG-DASH**](https://www.encoding.com/mpeg-dash/) _(Dynamic Adaptive Streaming over HTTP, ISO/IEC 23009-1)_ and [**Apple HLS**](https://developer.apple.com/documentation/http_live_streaming) _(HTTP Live Streaming)_. But, Multiple DRM support is yet to be implemented.
SteamGear currently supports both [**MPEG-DASH**](https://www.encoding.com/mpeg-dash/) _(Dynamic Adaptive Streaming over HTTP, ISO/IEC 23009-1)_ and [**Apple HLS**](https://developer.apple.com/documentation/http_live_streaming) _(HTTP Live Streaming)_.

SteamGear also creates a Manifest file _(such as MPD in-case of DASH)_ or a Master Playlist _(such as M3U8 in-case of Apple HLS)_ besides segments that describe these segment information _(timing, URL, media characteristics like video resolution and bit rates)_ and is provided to the client before the streaming session.
Additionally, StreamGear generates a manifest file _(such as MPD for DASH)_ or a master playlist _(such as M3U8 for Apple HLS)_ alongside the segments. These files contain essential segment information, _including timing, URLs, and media characteristics like video resolution and adaptive bitrates_. They are provided to the client before the streaming session begins.

**StreamGear primarily works in two Independent Modes for transcoding which serves different purposes:**

- **Single-Source Mode:** In this mode, StreamGear **transcodes entire video file** _(as opposed to frame-by-frame)_ into a sequence of multiple smaller chunks/segments for streaming. This mode works exceptionally well when you're transcoding long-duration lossless videos(with audio) for streaming that required no interruptions. But on the downside, the provided source cannot be flexibly manipulated or transformed before sending onto FFmpeg Pipeline for processing. **_Learn more about this mode [here ➶][ss-mode-doc]_**
- **Single-Source Mode 💿 :** In this mode, StreamGear **transcodes entire video file** _(as opposed to frame-by-frame)_ into a sequence of multiple smaller chunks/segments for streaming. This mode works exceptionally well when you're transcoding long-duration lossless videos(with audio) for streaming that required no interruptions. But on the downside, the provided source cannot be flexibly manipulated or transformed before sending onto FFmpeg Pipeline for processing. **_Learn more about this mode [here ➶][ss-mode-doc]_**

- **Real-time Frames Mode:** In this mode, StreamGear directly **transcodes frame-by-frame** _(as opposed to a entire video file)_, into a sequence of multiple smaller chunks/segments for streaming. This mode works exceptionally well when you desire to flexibility manipulate or transform [`numpy.ndarray`](https://numpy.org/doc/1.18/reference/generated/numpy.ndarray.html#numpy-ndarray) frames in real-time before sending them onto FFmpeg Pipeline for processing. But on the downside, audio has to added manually _(as separate source)_ for streams. **_Learn more about this mode [here ➶][rtf-mode-doc]_**
- **Real-time Frames Mode 🎞️ :** In this mode, StreamGear directly **transcodes frame-by-frame** _(as opposed to a entire video file)_, into a sequence of multiple smaller chunks/segments for streaming. This mode works exceptionally well when you desire to flexibility manipulate or transform [`numpy.ndarray`](https://numpy.org/doc/1.18/reference/generated/numpy.ndarray.html#numpy-ndarray) frames in real-time before sending them onto FFmpeg Pipeline for processing. But on the downside, audio has to added manually _(as separate source)_ for streams. **_Learn more about this mode [here ➶][rtf-mode-doc]_**

### StreamGear API Guide:

Expand Down Expand Up @@ -508,9 +515,9 @@ from vidgear.gears.asyncio import WebGear
# various performance tweaks
options = {
"frame_size_reduction": 40,
"frame_jpeg_quality": 80,
"frame_jpeg_optimize": True,
"frame_jpeg_progressive": False,
"jpeg_compression_quality": 80,
"jpeg_compression_fastdct": True,
"jpeg_compression_fastupsample": False,
}

# initialize WebGear app
Expand Down Expand Up @@ -650,7 +657,7 @@ It is something I am doing with my own free time. But so much more needs to be d

Here is a Bibtex entry you can use to cite this project in a publication:

[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.8174694.svg)](https://doi.org/10.5281/zenodo.8174694)
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.8332548.svg)](https://doi.org/10.5281/zenodo.8332548)

```BibTeX
@software{vidgear,
Expand All @@ -660,18 +667,19 @@ Here is a Bibtex entry you can use to cite this project in a publication:
Christian Hollinger and
Ian Max Andolina and
Vincent Boivin and
enarche-ahn and
Kyle Ahn and
freol35241 and
Benjamin Lowe and
Mickaël Schoentgen and
Renaud Bouckenooghe},
title = {abhiTronix/vidgear: VidGear v0.3.1},
month = jul,
Renaud Bouckenooghe and
Ibtsam Ahmad},
title = {abhiTronix/vidgear: VidGear Stable v0.3.2},
month = sep,
year = 2023,
publisher = {Zenodo},
version = {vidgear-0.3.1},
doi = {10.5281/zenodo.8174694},
url = {https://doi.org/10.5281/zenodo.8174694}
version = {vidgear-0.3.2},
doi = {10.5281/zenodo.8332548},
url = {https://doi.org/10.5281/zenodo.8332548}
}
```

Expand Down Expand Up @@ -807,5 +815,6 @@ External URLs
[zmq-req-rep]: https://learning-0mq-with-pyzmq.readthedocs.io/en/latest/pyzmq/patterns/client_server.html
[zmq-pub-sub]: https://learning-0mq-with-pyzmq.readthedocs.io/en/latest/pyzmq/patterns/pubsub.html
[zmq-pull-push]: https://learning-0mq-with-pyzmq.readthedocs.io/en/latest/pyzmq/patterns/pushpull.html#push-pull
[picamera2]:https://github.com/raspberrypi/picamera2
[picamera-setting]: https://picamera.readthedocs.io/en/release-1.13/quickstart.html
[webrtc]: https://webrtc.org/
5 changes: 3 additions & 2 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,10 @@ install:
- "SET PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%"
- "python --version"
- "python -m pip install --upgrade pip wheel"
- "python -m pip install .[asyncio] six codecov httpx pytest-cov pytest-asyncio yt_dlp aiortc paramiko m3u8 async-asgi-testclient"
- cmd: python -m pip install "numpy<2.0.0"
- "python -m pip install --upgrade .[asyncio] six httpx yt_dlp aiortc"
- "python -m pip install --upgrade pytest codecov pytest-cov pytest-asyncio m3u8 async-asgi-testclient paramiko"
- "python -m pip install --upgrade deffcode"
- "python -m pip install cryptography==38.0.4"
- "python -m pip install https://github.com/abhiTronix/python-mpegdash/releases/download/0.3.0-dev2/mpegdash-0.3.0.dev2-py3-none-any.whl"
- cmd: chmod +x scripts/bash/prepare_dataset.sh
- cmd: bash scripts/bash/prepare_dataset.sh
Expand Down
10 changes: 5 additions & 5 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,11 @@ steps:
displayName: "Prepare dataset"
- script: |
python -m pip install --upgrade pip wheel
pip install --upgrade .[asyncio] six codecov yt_dlp httpx mpegdash paramiko m3u8 async-asgi-testclient
pip install --upgrade deffcode
pip install cryptography==38.0.4
pip install --upgrade pytest pytest-asyncio pytest-cov pytest-azurepipelines
python -m pip install -U pip wheel
python -m pip install "numpy<2.0.0"
python -m pip install -U .[asyncio] yt_dlp httpx six paramiko
python -m pip install -U codecov pytest pytest-asyncio pytest-cov mpegdash m3u8 async-asgi-testclient
python -m pip install -U deffcode
displayName: "Install pip dependencies"
- script: |
Expand Down
Loading
Loading