Skip to content

v0.2.4

Compare
Choose a tag to compare
@abhiTronix abhiTronix released this 07 Oct 04:37
· 50 commits to master since this release

πŸ““ Complete Release Notes can be found here ↗️


Summary: New Index based Camera Device Capturing and Support for Discarded parameters and utilizing Filter values πŸŽ‰

✨ New Features

  • FFdecoder API:
    • Implemented new Index based Camera Device Capture feature (Similar to OpenCV), where the user just have to assign device index as integer (-n to n-1) in source parameter of DeFFcode APIs to directly access the given input device in few seconds.
    • Implemented new comprehensive support for both discarding key default FFmpeg parameters from Decoding pipeline simply by assigning them null string values, and concurrently using values extracted from Output Stream metadata properties (available only when FFmpeg filters are defined) for formulating pipelines.
      • Added null string value support to -framerate and -custom_resolution attributes, as well as frame_format parameter for easily discarding them.
    • Implemented passing of simple -vf filters, complex -filter_complex filters, and pre-headers(via -ffprefixes) directly to Sourcer API's sourcer_params parameter for probing Output Stream metadata and filter values.
  • Sourcer API:
    • Implemented new comprehensive approach to handle source_demuxer parameter w.r.t different source parameter values.
      • The source_demuxer parameter now accepts "auto" as its value for enabling Index based Camera Device Capture feature in Sourcer API.
      • Sourcer API auto-enforces source_demuxer="auto" by default, whenever a valid device index (uses validate_device_index method for validation) is provided as its source parameter value.
        • ⚠️ Sourcer API will throw Assertion error if source_demuxer="auto" is provided explicitly without a valid device index at its source parameter.
      • Source API now accepts all +ve and -ve device indexes (e.g. -1,0,1,2 etc.) to its source parameter, both as in integer and string of integer types as source in Index based Camera Device Capture feature..
    • Added enumerate_devices property object to enumerate all probed Camera Devices connected to a system names along with their respective "device indexes" or "camera indexes" as python dictionary.
    • Added new force_retrieve_missing parameter to retrieve_metadata() method for returning metadata missing in current Pipeline as (metadata, metadata_missing) tuple value instead of just metadata, when force_retrieve_missing=True.
  • FFhelper:
    • Implemented new extract_device_n_demuxer() method for discovering and extracting all Video-Capture device(s) name/path/index present on system and supported by valid OS specific FFmpeg demuxer.
      • Added support for three OS specific FFmpeg demuxers: namely dshow for Windows, v4l2 for Linux, and avfoundation for Darwin/Mac OSes.
      • Implemented separate code for parsing outputs of python subprocess module outputs provided with different commands for discovering all Video-Capture devices present on system.
      • ⚠️ The extract_device_n_demuxer method will raise RuntimeError if it fails to identify any device.
  • Utilities:
    • Added new new validate_device_index() method to verify if given device index is valid or not?

⚑️Updates/Improvements

  • FFdecoder API:
    • Added new pixel-formats to supported group by extending raw bits-per-component range.
    • output_frames_pixfmt metadata property(if available) will be overridden to rgb24.
  • Sourcer API:
    • Replaced os_windows internal parameter with machine_OS, and changed its input from os.name to more flexible platform.system().
    • Removed source_extension internal parameter and assigned values directly.
  • FFhelper:
    • Implemented more robust pattern matching for Linux machines.
    • Updated logs in check_sp_output() method for improving error output message.
    • Implemented "Cannot open device" v4l2-ctl command Error logs.

πŸ’₯ Breaking Updates/Changes

  • FFdecoder API
    • Unsupported dtype pixel-format always defaults to rgb24.
  • Sourcer API:
    • Renamed output_video_resolution metadata property to output_frames_resolution.
    • Renamed output_video_framerate metadata property to output_framerate.

πŸ› Bug-fixes

  • FFdecoder API:
    • Fixed critical KeyError bug arises due to missing output metadata properties.
      • Enforced force_retrieve_missing parameter in Sourcer API's retrieve_metadata() method for returning metadata missing in current Pipeline as (metadata, metadata_missing) tuple value instead of just metadata.
      • Added new missing_prop internal class variable for handling metadata properties missing, received from Sourcer API.
      • Moved ffdecoder_operational_mode to missing metadata properties that cannot be updated but are read only.
    • Fixed source metadata properties update bug causing non-existential missing metadata properties to be added to source metadata properties dictionary along with source metadata property.
    • Remove unusable exclusive yuv frames patch.
    • Fixed KeyError bug arises due to wrong variable placement.
    • Fixed approx_video_nframes metadata property check.
    • Fixed av_interleaved_write_frame(): broken pipe warning bug by switching process.terminate() with process.kill().
    • Fixed AttributeError bug caused due to typo in logger.
  • FFhelper:
    • Fixed check_sp_output() method returning Standard Error (stderr) even when Nonetype.
    • Fixed logger requiring utf-8 decoding.
    • Fixed missing force_retrieve_stderr argument to check_sp_output in extract_device_n_demuxer method on Linux platforms.
    • Fixed logger message bug.
  • Utils:
    • Fixed logger name typo.
  • Setup:
    • Rearranged long_description patches to address unused patch bug.