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

Fix OBS Virtual Camera capture. #23460

Merged
merged 1 commit into from Apr 6, 2023

Conversation

gottagofaster236
Copy link
Contributor

@gottagofaster236 gottagofaster236 commented Apr 5, 2023

Fixes #19746

Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

  • I agree to contribute to the project under Apache 2 License.
  • To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
  • The PR is proposed to the proper branch
  • There is a reference to the original bug report and related work

if (checkSingleByteFormat(VD->pAmMediaType->subtype) || (VD->pAmMediaType->subtype == MEDIASUBTYPE_Y16)) {
if (checkSingleByteFormat(VD->pAmMediaType->subtype) ||
(VD->pAmMediaType->subtype == MEDIASUBTYPE_Y16 || VD->pAmMediaType->subtype == MEDIASUBTYPE_YUY2))
{
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Converting from YUY2 to BGR manually instead of using DirectShow helps with making the OBS Virtual Camera work. But I am not sure whether it is a bug in the OBS Virtual Camera or in cap_dhow.cpp.

@asmorkalov
Copy link
Contributor

@mshabunin Could you take a look and comment?

Copy link
Contributor

@opencv-alalek opencv-alalek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Validated with OBS

Thank you for the contribution! LGTM 👍

@opencv-alalek opencv-alalek removed the request for review from mshabunin April 6, 2023 08:12
@opencv-alalek opencv-alalek self-assigned this Apr 6, 2023
@opencv-alalek opencv-alalek added this to the 4.8.0 milestone Apr 6, 2023
@opencv-pushbot opencv-pushbot merged commit 793c966 into opencv:4.x Apr 6, 2023
12 of 19 checks passed
@asmorkalov asmorkalov mentioned this pull request May 31, 2023
DeePingXian added a commit to DeePingXian/opencv that referenced this pull request Aug 13, 2023
Streamlabs Desktop has the same issue in opencv#19746.
This fixes it using opencv#23460 method.
LaurentBerger pushed a commit to LaurentBerger/opencv that referenced this pull request Sep 8, 2023
Streamlabs Desktop has the same issue in opencv#19746.
This fixes it using opencv#23460 method.

Add getMatInblob function

e
thewoz pushed a commit to thewoz/opencv that referenced this pull request Jan 4, 2024
Streamlabs Desktop has the same issue in opencv#19746.
This fixes it using opencv#23460 method.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DirectShow: VideoCapture returns blank frames for OBS Virtual Camera on Windows
4 participants