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

YouTube stream ending fix #3277

Merged
merged 2 commits into from
May 21, 2021
Merged

YouTube stream ending fix #3277

merged 2 commits into from
May 21, 2021

Conversation

glenn-jocher
Copy link
Member

@glenn-jocher glenn-jocher commented May 21, 2021

Properly terminates YouTube streams on video end. Should resolve #3190 and #3220, incorporates elements from PR #2769 by @ben-milanko.

🛠️ PR Summary

Made with ❤️ by Ultralytics Actions

🌟 Summary

Enhanced multicam support for Ultralytics YOLOv5.

📊 Key Changes

  • Added separate frame per second (FPS), frame count, and thread storage for each video source.
  • Ensured the stream-reading thread considers the video source's actual FPS and frame count.
  • Adjusted the frame-reading logic to consume every 4th frame effectively.
  • Enforced a check to ensure threads are alive when fetching the next batch of frames.

🎯 Purpose & Impact

  • 🎯 Purpose: These changes improve the performance and reliability when processing multiple video streams, as each stream can have its own FPS and frame count.
  • 💥 Impact: Multi-camera setups will benefit from more accurate and robust video stream handling, potentially improving the system's overall efficiency and output quality. Users can now process multiple video streams simultaneously without frame count or FPS conflicts, and the system will gracefully handle the situation when one of the videos ends or a thread stops.

Properly terminates YouTube streams on video end. Should resolve issues #2769 and #3220.
@glenn-jocher glenn-jocher linked an issue May 21, 2021 that may be closed by this pull request
@glenn-jocher glenn-jocher merged commit 683cefe into master May 21, 2021
@glenn-jocher glenn-jocher deleted the glenn-jocher-patch-1 branch May 21, 2021 14:51
Lechtr pushed a commit to Lechtr/yolov5 that referenced this pull request Jul 20, 2021
* YouTube stream ending fix

Properly terminates YouTube streams on video end. Should resolve issues ultralytics#2769 and ultralytics#3220.

* Update datasets.py

(cherry picked from commit 683cefe)
BjarneKuehl pushed a commit to fhkiel-mlaip/yolov5 that referenced this pull request Aug 26, 2022
* YouTube stream ending fix

Properly terminates YouTube streams on video end. Should resolve issues ultralytics#2769 and ultralytics#3220.

* Update datasets.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Now with FPS > 0, cmd wont end How do you end a stream on detect.py?
1 participant