Skip to content

VidGear Stable v0.2.2

Compare
Choose a tag to compare
@abhiTronix abhiTronix released this 02 Sep 15:48
· 374 commits to master since this release
38a7f54

πŸ““ 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 throw RuntimeError if bidirectional mode is disabled at server or client but not both.
    • Added new disable_confirmation used to force disable termination confirmation from client in terminate_connection.
    • Added task_done() method after every get() call to gracefully terminate queues.
    • Added new secrets and string imports.
  • 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 and decode_jpeg methods to implement turbo-JPEG transcoding with simplejpeg.
      • 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.
  • WebGear_RTC:
    • Added native support for middlewares:
      • Added new global middleware variable for easily defining Middlewares as list.
    • 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.
  • Helper:
    • New automated interpolation selection for gears:
      • Implemented retrieve_best_interpolation method to automatically select best available interpolation within OpenCV.
    • Implemented get_supported_demuxers method to get list of supported demuxers.
  • Setup.py:
    • Added new cython and msgpack dependency.
    • Added msgpack and msgpack_numpy to auto-install latest.

 

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.
    • ⚠️ Now ImportError will be raised only any certain API specific dependency is missing during given API's initialization.
  • 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.
  • NetGear:
    • Replaced np.newaxis with np.expand_dims.
    • Replaced random module with secrets while generating system ID.
    • Update array indexing with np.copy.
  • NetGear_Async:
    • Improved custom source handling.
    • Removed deprecated loop parameter from asyncio methods.
    • Re-implemented skip_loop parameter in close() method.
    • ⚠️ run_until_complete will not used if skip_loop is enabled.
    • ⚠️ skip_loop now will create asyncio task instead and will enable disable_confirmation by default.
    • Replaced create_task with ensure_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 to dimensions_to_resolutions method.
    • Implemented new delete_file_safe to safely delete files at given path.
    • Replaced os.remove calls with delete_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).
  • Setup.py:
  • Asyncio:
    • Changed asyncio.sleep value to 0.
      • 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
  • 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 to delete_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.
  • NetGear:
    • Fixed Bidirectional Video-Frame Transfer broken with frame-compression:
      • Fixed return_data interfering with return JSON-data in receive mode.
      • Fixed logic.
    • 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.
    • Fixed bug that cause server end frame dimensions differ from client's end when frame compression enabled.
  • 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.
  • 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.
  • 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.
    • Bugfix related to OpenCV import:
      • Bug fixed for OpenCV import comparison test failing with Legacy versions and throwing ImportError.
    • 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.
  • 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.
  • Setup.py:
    • Fixed latest_version returning incorrect version for some PYPI packages.
    • Removed latest_version variable support from simplejpeg.
    • Fixed streamlink only supporting requests==2.25.1 on Windows.
    • Removed all redundant dependencies like colorama, aiofiles, aiohttp.
  • Setup.cfg:
    • Replaced dashes with underscores to remove warnings.

 

Related Pull Requests πŸ”§