Skip to content

Commit

Permalink
⚡️ FFdecoder: Supported for both discarded parameters and filter valu…
Browse files Browse the repository at this point in the history
…es. (Fixes #31)

- 🧱 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 Pipeline.
  - ✨ Added `null` string value support to `-framerate` and `-custom_resolution` attributes, as well as `frame_format` parameter for easily discarding them.
  - 🚧 Re-Implemented calculation of rawframe pixel-format.
    - 🏗️ Reconfigured default rawframe pixel-format, Now rawframe pixel-format will always default to `source_video_pixfmt` with `frame_format="null"`.
    - 💥 Now with `frame_format` parameter value either "null" or invalid or undefined, rawframe pixel-format value is taken from `output_frames_pixfmt` metadata property extracted from Output Stream (available only when filters are defined). If valid `output_video_resolution`  metadata property is found then it defaults to default pixel-format(calculated variably).
    - 🏗️ Also with `frame_format="null"`, `-pix_fmt` FFmpeg parameter will not be added to Decoding pipeline.
  - 🚧 Re-Implemented calculation of rawframe resolution value.
    - 💥 Now with `-custom_resolution` dictionary attribute value either "null" or invalid or undefined, rawframe resolution value is first taken from `output_video_resolution` metadata property extracted from Output Stream (available only when filters are defined), next from `source_video_resolution` metadata  property(extracted from Input Source Stream). If neither `output_video_resolution` nor `source_video_resolution` valid metadata properties are found then `RuntimeError` is raised.
    - 🏗️ Also with `-custom_resolution` dictionary attribute value "null", `-s/-size` FFmpeg parameter will not be added to Decoding pipeline.
  - 🚧 Re-Implemented calculation of output framerate value.
    - 💥 Now with `-framerate` dictionary attribute either null or invalid or undefined, output framerate value is first taken from `output_video_framerate` metadata property extracted from Output Stream (available only when filters are defined), next from `source_video_framerate` metadata  property(extracted from Input Source Stream). If neither `output_video_resolution` nor `source_video_framerate` valid metadata properties are found then `RuntimeError` is raised.
    - 🏗️ Also with `-framerate` dictionary attribute value "null", `-r/-framerate` FFmpeg parameter will not be added to Decoding pipeline.
- ⚡️ Implemented passing of simple/complex filters(via `-vf` and ffmpeg pre-headers(`-filter_complex`) and (via `-ffprefixes`) directly to Sourcer API's `sourcer_params` parameter for probing Output Stream metadata and filter values.
- ⚡️ Simplified raw frame dtype calculation based on selected pixel-format.
  - 💥 Now unsupported dtype pixel-format always defaults to `rgb24`.
  - 🏗️ Also, `output_frames_pixfmt` metadata property(if available) will be overridden to `rgb24`.
- 🏗️ Extended `YUV444p` reconstruction patch to all YUV based pixel-formats.
- ⚡️ Improved handling of `frame_format` parameter.
- 🔨 Renamed `source_metadata` internal parameter to `sourcer_metadata`.
- 🔥 Removed redundant dummy value for `output_frames_pixfmt` metadata property.
- 🔥 Removed redundant variable definitions.
- 🔊 Updated logging messages text and position.
- 💡 Updated code comments.
- ✏️ Fixed several typos.
  • Loading branch information
abhiTronix committed Aug 20, 2022
1 parent f5050e2 commit 16dded1
Showing 1 changed file with 270 additions and 131 deletions.
Loading

0 comments on commit 16dded1

Please sign in to comment.