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

[Proposal]: Rename output_filename to output in WriteGear API #333

Closed
4 tasks done
abhiTronix opened this issue Aug 24, 2022 · 1 comment · Fixed by #346
Closed
4 tasks done

[Proposal]: Rename output_filename to output in WriteGear API #333

abhiTronix opened this issue Aug 24, 2022 · 1 comment · Fixed by #346
Labels
ENHANCEMENT ⚡ New Feature/Addition/Improvement PROPOSAL 📩 A proposal/proposition SOLVED 🏁 This issue/PR is resolved now. Goal Achieved!
Milestone

Comments

@abhiTronix
Copy link
Owner

abhiTronix commented Aug 24, 2022

Issue guidelines

Issue Checklist

  • I have searched open or closed issues and found nothing related to my idea.
  • I have read the Documentation and it doesn't mention anything about my idea.
  • To my best knowledge, my idea wouldn't break something for other users.

Describe your Idea

Since early versions of WriteGear API supported only output video filename as input, hence parameter name output_filename stuck with it from starting. But now that the WriteGear API accepts all sorts of outputs (such as valid filename/path/URL) for encoding, thereby changing parameter name to output will be more true to its purpose. Therefore this proposal aim at renaming output_filename to output in WriteGear API.

Use Cases

Renaming output_filename to output in WriteGear API will help user to not accidently assume this API supports only encoding of video files. And also it matches the output parameter in StreamGear which basically does the same thing. Finally, the parameter name will be more true to its purpose.

Any other Relevant Information?

No response

@abhiTronix abhiTronix added ENHANCEMENT ⚡ New Feature/Addition/Improvement WORK IN PROGRESS 🚧 currently been worked on. PROPOSAL 📩 A proposal/proposition labels Aug 24, 2022
@abhiTronix abhiTronix added this to the v0.3.0 milestone Aug 24, 2022
@abhiTronix abhiTronix added this to To do in VidGear v0.3.0 via automation Aug 24, 2022
@abhiTronix abhiTronix pinned this issue Aug 24, 2022
abhiTronix added a commit that referenced this issue Aug 25, 2022
…ixes #333)

💬 Since early versions of WriteGear API supported only output video filename as input, hence
parameter name `output_filename` stuck with it from starting. But now since WriteGear API accepts all 
sorts of outputs (such as valid filename/path/URL) for encoding, thereby changing parameter
name to `output` will be more true to its purpose.

🚸 Renaming `output_filename` to `output` in WriteGear API will help user to not accidentally
assume this API supports only encoding of video files. And also it matches the `output` parameter
in StreamGear which basically does the same thing. 

⚠️ Renaming is done throughout `vidgear` library code with this commit.
abhiTronix added a commit that referenced this issue Jan 3, 2023
…th input frames pixel-format. (Fixes #332) [#346]

- 🏗️ Added support for higher than 8-bit depth input frames pixel-format.
  - ✨ Added support for higher than 8-bit depth frames with datatypes of unsigned integer(`uint`) kind and element size `2`.
    - Added `dtype` parameter to internal `Preprocess` method for passing input frames datatype.
  - ⚡️ Implemented auto-calculation of input pixel-format based on number of channels in higher than 8-bit depth frmes.
    - ✨ Added various known working pixel-formats(based on number of channels), supported by all prominent computer vision libraries.
    - ✨ Added support for up to 1-channel(`gray16-le/be`) to all the way up to 4-channels(`bgra64-le/be`) in input frames.
    - ✨ Added endianness little(`le`) or big(`be`) at the suffix of pixel-format based on byte-order of input frames datatypes.
    - ✨ Added support for RGB frames through RGB mode.
  - 🥅 Implemented runtime datatype validation check, such that all input frames must have same datatype.
    - 💥 A `ValueError` will be raised if datatype of input frames mismatches.
- 🏗️ Added support for user-defined custom input pixel-format.
  - ✨ Added new `-input_pixfmt` attribute to `output_params` dictionary parameter for easily specifying custom input pixel-format.
  - 🔧 Added newly implemented `get_supported_pixfmts` method import for verifying user-defined input pixel-format against Installed FFmpeg supported pixel-formats. Unsupported values will be discarded.
- 🔊 Updated logging messages.
- 💡 Updated code comments.

🐛 CI: Fixed F821 undefined name bug.

🚑️ CI: Added fix for RTCPeerConnection fails to create RTCDtlsTransport (Related issue: aiortc/aiortc#804)
    - 📌 Pinned cryptography==38.0.4 in dependencies.

🐛 WriteGear: Fixed AttributeError.

🔊 Bash Script: Improved logging.

👷 CI: Added more flexible formats to `return_testvideo_path` function.

🚑️ WriteGear: Fixed name 'compression' is not defined bug.

🐛 CI: Fixed Gstreamer bug.
- 👷 Updated bash file.
- 📌 Pinned Linux image to `ubuntu-20.04`.

🐛 CI: Fixed No module named 'httpx' bug.
- ➕ Added httpx library import

👷 CI: Updated yaml files.
- ➕ Added deffcode library import.
- 🎨 Re-stuctured yaml code.

🐛 Bash: Fixed gstreamer installation.

✨ StreamGear: Added support for Context Managers for proper handling of resources. (Fixes #310)
- ⚡️ Added the context managers support via `with` statement for allocating and releasing resources precisely. (Sugested by @sueskind)
- ♿️ Implement the `__enter__()` and `__exit__()` methods.
  - ✨ Added `__enter__` method that returns reference to the StreamGear Class.
  - ✨ Added `__exit__` method that automatically executes `close()` for performing the cleanup operations and handling exception gracefully.
- 📝 Updated method description.

👷 CI: Force re-triggering builds.

📝 Docs: Fixed badges/shields#8671 badge issue in README.md
- ♻️ Refactored code.

👷 CI: Added tests for user-defined and higher than 8-bit depth input frames pixel-format. (Fixes #332)
- ⚡️ Updated `test_write` test for higher than 8-bit depth input frames pixel-format in WriteGear's Compression Mod.
- 👷 Added related configurations and made changes.
- ⚡️Added deffcode library's FFdecoder module import.
- 🚚 Moved `test_colorspaces` test to CamGear tests.
- 🔥 Removed redundant code.

✨ WriteGear: Added support for Context Managers for proper handling of resources. (Fixes #310)
- ⚡️ Added the context managers support via `with` statement for allocating and releasing resources precisely. (Sugested by @sueskind)
- ♿️ Implement the `__enter__()` and `__exit__()` methods.
  - ✨ Added `__enter__` method that returns reference to the WriteGear Class.
  - ✨ Added `__exit__` method that automatically executes `close()` for performing the cleanup operations and handling exception gracefully.
- 📝 Updated method description.

💥 WriteGear: Renamed `output_filename` string parameter to `output`. (Fixes #333)
  💬 Since early versions of WriteGear API supported only output video filename as input, hence
  parameter name `output_filename` stuck with it from starting. But now since WriteGear API accepts all
  sorts of outputs (such as valid filename/path/URL) for encoding, thereby changing parameter
  name to `output` will be more true to its purpose.

  🚸 Renaming `output_filename` to `output` in WriteGear API will help user to not accidentally
  assume this API supports only encoding of video files. And also it matches the `output` parameter
  in StreamGear which basically does the same thing.

  ⚠️ Renaming is done throughout `vidgear` library code with this commit.

  🎨 WriteGear: Completely revamped code structure and comments.
  - 🧑‍💻 Updated comments, description, and logging messages to more sensible and developer friendly.
  - 🎨 Added operator short-circuiting to cleanup code as much as possible.
  - 🚸 Renamed `cmd` parameter in `execute_ffmpeg_cmd()` class method to more sensible `command`.
  - 🏗️ Renamed `startFFmpeg_Process` internal class method to `start_FFProcess`.
  - 🏗️ Renamed `Preprocess` internal class method to `PreprocessFFParams`.
  - 🏗️ Renamed `startCV_Process` internal class method to `start_CVProcess`.
  - 💬 Renamed `initiate` internal class parameter to `initiate_process`.
  - 💬 Renamed `force_termination` internal class parameter to `forced_termination`.
  - 🔊 Enabled `output_params` parameters logging in both modes.
  - 🥅 Improved `compression` and `logging` parameters boolean value handling.
  - ⚡️ Added `stdout` closing to cleanup pipeline before terminating.
  - 🔥 Removed redundant code and comments.
@abhiTronix abhiTronix added SOLVED 🏁 This issue/PR is resolved now. Goal Achieved! and removed WORK IN PROGRESS 🚧 currently been worked on. labels Jan 3, 2023
@abhiTronix
Copy link
Owner Author

Successfully resolved and merged in commit 9eedb09

VidGear v0.3.0 automation moved this from To do to Done Jan 3, 2023
@abhiTronix abhiTronix unpinned this issue Jul 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ENHANCEMENT ⚡ New Feature/Addition/Improvement PROPOSAL 📩 A proposal/proposition SOLVED 🏁 This issue/PR is resolved now. Goal Achieved!
Projects
No open projects
1 participant