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

Replaced Pafy with VidGear's own Custom Metadata extraction class. #273

Closed
abhiTronix opened this issue Dec 1, 2021 · 1 comment · Fixed by #274
Closed

Replaced Pafy with VidGear's own Custom Metadata extraction class. #273

abhiTronix opened this issue Dec 1, 2021 · 1 comment · Fixed by #274
Assignees
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 Dec 1, 2021

Detailed Description

This issue is to inform users that we're going to implement our own VidGear Class based on yt-dlp backend from scratch for extracting metadata from YouTube API in upcoming commits that will replace existing broken Pafy dependency.

Context

VidGear's current dependency Pafy(that depends upon old youtube-dl backend), have pending release since 2019. This has made it highly susceptible to any bugs and changes in YouTube Official API, which recently dropped support for number of dislikes from its metadata which led to Pafy API not working anymore, and also its authors are not interested to work on it anymore. And due to lack of reliable options for this library, I've decided to implement our own VidGear Class based on yt-dlp backend from scratch for extracting metadata from YouTube API in upcoming commits.

Your Current Environment

  • VidGear version: v0.2.4-dev
  • Branch: testing
  • Python version: all
  • Operating System and version: all
@abhiTronix abhiTronix added ENHANCEMENT ⚡ New Feature/Addition/Improvement WORK IN PROGRESS 🚧 currently been worked on. PROPOSAL 📩 A proposal/proposition labels Dec 1, 2021
@abhiTronix abhiTronix added this to the 0.2.4 milestone Dec 1, 2021
@abhiTronix abhiTronix added this to Backlog in VidGear v0.2.4 via automation Dec 1, 2021
@abhiTronix abhiTronix self-assigned this Dec 1, 2021
@abhiTronix abhiTronix pinned this issue Dec 1, 2021
abhiTronix added a commit that referenced this issue Dec 2, 2021
…ng Class [#272]

- 💥 Removed support for assigning Custom Media Server Class(inherited from aiortc's VideoStreamTrack) in WebGear_RTC through its `config` global parameter.
- ✨ Added new `custom_stream` attribute with WebGear_RTC `options` parameter that allows you to easily define your own Custom Streaming Class with suitable source(such as OpenCV).
- ⚡️ This implementation supports repeated Auto-Reconnection or Auto-Refresh out-of-the-box.
- 🧑‍💻 This implementation is more user-friendly and easy to integrate within complex APIs.
- 🎨 This implementation supports all vidgear's VideoCapture APIs readily as input.
- 🏗️ This implementation requires at-least `read()` and `stop()` methods implemented within Custom Streaming Class, otherwise WebGear_RTC will throw ValueError.
- 🥚 WebGear_RTC API now automatically constructs `av.frame.Frame` from `numpy.nd.array` based on available channels in frames.
- 🏗️ WebGear_RTC API will now throws ValueError if `source` parameter is None and `custom_stream` attribute isn't defined.

- CI:
  - 👷 Updated CI tests for new WebGear_RTC custom streaming class.
  - 👷 Disabled test_stream_mode test until issue #273 is resolved.
  - 🐛 Fixed NameError bugs in WebGear_RTC CI test.

- Docs:
  - 📝 Added related usage docs for new WebGear_RTC custom streaming class.
  - 📝 Updated Advanced examples using WebGear_RTC's custom streaming class.
  - 👽️ Added changes for upgrading mkdocs-material from 7.x to 8.x in docs.
  - 🚸 Added outdated version warning block.
  - 🐛 Fixed content tabs failing to work.
  - 🚩 Updated WebGear_RTC parameters.
  - 🔥 Removed slugify from mkdocs causing invalid hyperlinks in docs.
  - 🐛 Fixed hyperlink in announcement bar.
  - 💄 Updated code highlighting.
abhiTronix added a commit that referenced this issue Dec 3, 2021
…Fixes #273)

- ✨ Implemented `YT_backend` a new CamGear's Internal YT-DLP backend class for extracting metadata from Streaming URLs.
- ✨ Added support for pipeling (live) video-frames from all yt-dlp supported streaming sites: https://github.com/yt-dlp/yt-dlp/blob/master/supportedsites.md#supported-sites
- ⚡️ Implemented algorithm from scratch for auto-extracting resolution specific streamable URLs for pipelineing.
- ⚡️ Implemented logic for auto-calculating `best` and `worst` resolutions.
- ✨ Added `is_livestream` and `is_valid_source` global YT_backend parameters.
- ✨ Added default options for yt-dlp for extracting info_dict(metadata) of the video as a single JSON line.
- ✨ Added new `ytv_metadata` global parameter to CamGear for accessing video's metadata(such as duration, title, description) on-the-go.
- 💥 Removed `STREAM_PARAMS` dict attribute and replaced it with `YT_STREAM_PARAMS` and `SL_STREAM_PARAMS` backend specific attributes.
- 💥 Removed automatic enforcing of GStreamer backend for YouTube-livestreams and made it optional.
- ⚰️ Completely removed old logic for extracting streams using pafy.
- ⚠️ Playlists are still unsupported.
- 🔊 Updated logging messages.
- 💡 Updated code comments.

Helper: 💥 Removed `youtube_url_validator` helper method.

Setup:
- ➖ Removed `pafy` dependency.
- 🎨 Removed `pyzmq` from latest_version group.
@abhiTronix abhiTronix moved this from Backlog to In progress in VidGear v0.2.4 Dec 4, 2021
@abhiTronix
Copy link
Owner Author

abhiTronix commented Dec 4, 2021

VidGear v0.2.4 automation moved this from In progress to Done Dec 4, 2021
@abhiTronix abhiTronix added SOLVED 🏁 This issue/PR is resolved now. Goal Achieved! and removed WORK IN PROGRESS 🚧 currently been worked on. labels Dec 4, 2021
@abhiTronix abhiTronix changed the title Replace Pafy with VidGear's own Custom YouTube Metadata extraction class. Replaced Pafy with VidGear's own Custom YouTube Metadata extraction class. Dec 4, 2021
@abhiTronix abhiTronix changed the title Replaced Pafy with VidGear's own Custom YouTube Metadata extraction class. Replaced Pafy with VidGear's own Custom Metadata extraction class. Dec 4, 2021
@abhiTronix abhiTronix unpinned this issue Dec 5, 2021
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
Development

Successfully merging a pull request may close this issue.

1 participant