Skip to content

Fix OBS Virtual Camera capture.#23460

Merged
opencv-pushbot merged 1 commit intoopencv:4.xfrom
gottagofaster236:fix_obs_virtual_camera
Apr 6, 2023
Merged

Fix OBS Virtual Camera capture.#23460
opencv-pushbot merged 1 commit intoopencv:4.xfrom
gottagofaster236:fix_obs_virtual_camera

Conversation

@gottagofaster236
Copy link
Copy Markdown
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
Copy Markdown
Contributor Author

@gottagofaster236 gottagofaster236 Apr 5, 2023

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
Copy Markdown
Contributor

@mshabunin Could you take a look and comment?

Copy link
Copy Markdown
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
@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.
thewoz pushed a commit to thewoz/opencv that referenced this pull request May 29, 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