VidGear Stable v0.2.2
·
374 commits
to master
since this release
π Complete Release Notes can be found here βοΈ
β
New Features β¨
- StreamGear:
- Added native support for new Apple HLS (HTTP Live Streaming) HTTP streaming format in StreamGear.
- Added seamless support for audio input from external audio devices.
- NetGear:
- New SSH Tunneling Mode for remote connection of ZMQ sockets across machines via SSH tunneling.
- Additional colorspace support for input frames with Frame-Compression enabled.
- Allowed users to manually select colorspace on-the-fly with its JPEG frame compression mode.
- NetGear_Async:
- New exclusive Bidirectional Mode for bidirectional data transfer with pure asyncio implementation.
β οΈ Bidirectional mode is only available with User-defined Custom Source(i.e.source=None
)β οΈ NetGear_Async will throwRuntimeError
if bidirectional mode is disabled at server or client but not both.
- Added new
disable_confirmation
used to force disable termination confirmation from client interminate_connection
. - Added
task_done()
method after everyget()
call to gracefully terminate queues. - Added new
secrets
andstring
imports.
- New exclusive Bidirectional Mode for bidirectional data transfer with pure asyncio implementation.
- WebGear:
- Updated JPEG Frame compression with
simplejpeg
:- Implemented JPEG compression algorithm for 4-5% performance boost at cost of minor loss in quality.
- Utilized
encode_jpeg
anddecode_jpeg
methods to implement turbo-JPEG transcoding withsimplejpeg
. - Added new options to control JPEG frames quality, enable fastest dct, fast upsampling to boost performance.
- Added new
jpeg_compression
,jpeg_compression_quality
,jpeg_compression_fastdct
,jpeg_compression_fastupsample
attributes.
- Added new WebGear Theme: (Checkout at https://github.com/abhiTronix/vidgear-vitals)
- Added responsive image scaling according to screen aspect ratios.
- Added responsive text scaling.
- Updated JPEG Frame compression with
- WebGear_RTC:
- Added native support for middlewares:
- Added new global
middleware
variable for easily defining Middlewares as list.
- Added new global
- Added new WebGear_RTC Theme: (Checkout at https://github.com/abhiTronix/vidgear-vitals)
- Implemented new responsive video scaling according to screen aspect ratios.
- Added bootstrap CSS properties to implement auto-scaling.
- Added native support for middlewares:
- Helper:
- New automated interpolation selection for gears:
- Implemented
retrieve_best_interpolation
method to automatically select best available interpolation within OpenCV.
- Implemented
- Implemented
get_supported_demuxers
method to get list of supported demuxers.
- New automated interpolation selection for gears:
- Setup.py:
- Added new
cython
andmsgpack
dependency. - Added
msgpack
andmsgpack_numpy
to auto-install latest.
- Added new
β
Updates/Improvements β‘οΈ
- VidGear Core:
- New behavior to virtually isolate optional API specific dependencies by silencing
ImportError
on all VidGear's APIs import. - Implemented algorithm to cache all imports on startup but silence any
ImportError
on missing optional dependency. β οΈ NowImportError
will be raised only any certain API specific dependency is missing during given API's initialization.
- New behavior to virtually isolate optional API specific dependencies by silencing
- StreamGear:
- Replaced depreciated
-min_seg_duration
flag with-seg_duration
. - Removed redundant
-re
flag from RTFM. - Improved Live-Streaming performance by disabling SegmentTimline
- Improved DASH assets detection for removal by using filename prefixes.
- Replaced depreciated
- NetGear:
- Replaced
np.newaxis
withnp.expand_dims
. - Replaced
random
module withsecrets
while generating system ID. - Update array indexing with
np.copy
.
- Replaced
- NetGear_Async:
- Improved custom source handling.
- Removed deprecated
loop
parameter from asyncio methods. - Re-implemented
skip_loop
parameter inclose()
method. β οΈ run_until_complete
will not used ifskip_loop
is enabled.β οΈ skip_loop
now will create asyncio task instead and will enabledisable_confirmation
by default.- Replaced
create_task
withensure_future
to ensure backward compatibility with python-3.6 legacies. - Simplified code for
transceive_data
method.
- WebGear_RTC:
- Improved handling of failed ICE connection.
- Made
is_running
variable globally available for internal use.
- Helper:
- Added
4320p
resolution support todimensions_to_resolutions
method. - Implemented new
delete_file_safe
to safely delete files at given path. - Replaced
os.remove
calls withdelete_file_safe
. - Added support for filename prefixes in
delete_ext_safe
method. - Improved and simplified
create_blank_frame
functions frame channels detection. - Added
logging
parameter to capPropId function to forcefully discard any error(if required).
- Added
- Setup.py:
- Added patch for
numpy
dependency,numpy
recently dropped support for python 3.6.x legacies. See https://github.com/numpy/numpy/releases/tag/v1.20.0 - Removed version check on certain dependencies.
- Re-added
aiortc
to auto-install latest version.
- Added patch for
- Asyncio:
- Changed
asyncio.sleep
value to0
.- The amount of time sleep is irrelevant; the only purpose await asyncio.sleep() serves is to force asyncio to suspend execution to the event loop, and give other tasks a chance to run. Also,
await asyncio.sleep(0)
will achieve the same effect. https://stackoverflow.com/a/55782965/10158117
- The amount of time sleep is irrelevant; the only purpose await asyncio.sleep() serves is to force asyncio to suspend execution to the event loop, and give other tasks a chance to run. Also,
- Changed
- License:
- Dropped publication year range to avoid confusion. (Signed and Approved by @abhiTronix)
- Updated Vidgear license's year of first publication of the work in accordance with US copyright notices defined by Title 17, Chapter 4(Visually perceptible copies): https://www.copyright.gov/title17/92chap4.html
β
Breaking Updates/Changes π₯
- π£ Virtually isolated all API specific dependencies, Now
ImportError
for API-specific dependencies will be raised only when any of them is missing at API's initialization. - π£ Renamed
delete_safe
todelete_ext_safe
. - π£ Dropped support for
frame_jpeg_quality
,frame_jpeg_optimize
,frame_jpeg_progressive
attributes from WebGear.
β
Bug-fixes π
- CamGear:
- Hot-fix for Live Camera Streams:
- Added new event flag to keep check on stream read.
- Implemented event wait for
read()
to block it when source stream is busy. - Added and Linked
THREAD_TIMEOUT
with event wait timout. - Improved backward compatibility of new additions.
- Hot-fix for Live Camera Streams:
- NetGear:
- Fixed Bidirectional Video-Frame Transfer broken with frame-compression:
- Fixed
return_data
interfering with return JSON-data in receive mode. - Fixed logic.
- Fixed
- Fixed color-subsampling interfering with colorspace.
- Patched external
simplejpeg
bug. Issue: https://gitlab.com/jfolz/simplejpeg/-/issues/11- Added
np.squeeze
to drop grayscale frame's 3rd dimension on Client's end.
- Added
- Fixed bug that cause server end frame dimensions differ from client's end when frame compression enabled.
- Fixed Bidirectional Video-Frame Transfer broken with frame-compression:
- NetGear_Async:
- Fixed bug related asyncio queue freezing on calling
join()
. - Fixed ZMQ connection bugs in bidirectional mode.
- Fixed several critical bugs in event loop handling.
- Fixed several bugs in bidirectional mode implementation.
- Fixed missing socket termination in both server and client end.
- Fixed
timeout
parameter logic.
- Fixed bug related asyncio queue freezing on calling
- WebGear_RTC:
- Fixed stream freezes after web-page reloading:
- Implemented new algorithm to continue stream even when webpage is reloaded.
- Inherit and modified
next_timestamp
VideoStreamTrack method for generating accurate timestamps. - Implemented
reset_connections
callable to reset all peer connections and recreate Video-Server timestamps. (Implemented by @kpetrykin) - Added
close_connection
endpoint in JavaScript to inform server page refreshing.(Thanks to @kpetrykin) - Added exclusive reset connection node
/close_connection
in routes. - Added
reset()
method to Video-Server class for manually resetting timestamp clock. - Added
reset_enabled
flag to keep check on reloads. - Fixed premature webpage auto-reloading.
- Fixed web-page reloading bug after stream ended:
- Disable webpage reload behavior handling for Live broadcasting.
- Disable reload CI test on Windows machines due to random failures.
- Improved handling of failed ICE connection.
- Fixed Assertion error bug:
- Source must raise MediaStreamError when stream ends instead of returning None-type.
- Fixed stream freezes after web-page reloading:
- WebGear:
- Removed format specific OpenCV decoding and encoding support for WebGear.
- Helper:
- Regex bugs fixed:
- New improved regex for discovering supported encoders in
get_supported_vencoders
. - Re-implemented check for extracting only valid output protocols in
is_valid_url
.
- New improved regex for discovering supported encoders in
- Bugfix related to OpenCV import:
- Bug fixed for OpenCV import comparison test failing with Legacy versions and throwing
ImportError
.
- Bug fixed for OpenCV import comparison test failing with Legacy versions and throwing
- Fixed bug with
create_blank_frame
that throws error with gray frames. - Implemented
RSTP
protocol validation as demuxer, since it's not a protocol but a demuxer. - Removed redundant
logger_handler
,mkdir_safe
,retrieve_best_interpolation
,capPropId
helper functions from asyncio package. Relatively imported helper functions from non-asyncio package. - Removed unused
aiohttp
dependency. - Removed
asctime
formatting from logging.
- Regex bugs fixed:
- StreamGear:
- Fixed Multi-Bitrate HLS VOD streams:
- Re-implemented complete workflow for Multi-Bitrate HLS VOD streams.
- Extended support to both Single-Source and Real-time Frames Modes.
- Fixed bugs with audio-video mapping.
- Fixed master playlist not generating in output.
- Fixed improper
-seg_duration
value resulting in broken pipeline. - Fixed expected aspect ratio not calculated correctly for additional streams.
- Fixed stream not terminating when provided input from external audio device.
- Fixed bugs related to external audio not mapped correctly in HLS format.
- Fixed OPUS audio fragments not supported with MP4 video in HLS.
- Fixed unsupported high audio bit-rate bug.
- Fixed Multi-Bitrate HLS VOD streams:
- Setup.py:
- Fixed
latest_version
returning incorrect version for some PYPI packages. - Removed
latest_version
variable support fromsimplejpeg
. - Fixed
streamlink
only supporting requests==2.25.1 on Windows. - Removed all redundant dependencies like
colorama
,aiofiles
,aiohttp
.
- Fixed
- Setup.cfg:
- Replaced dashes with underscores to remove warnings.
β