Open tejasthy opened 4 years ago
Uhhmm... That should have been fixed 😄 Are you sure you are running 1.2.0? If so, it should show "1.2.0" at the bottom of the test card. Please report back if it does.
I don't see the test card either since it is also showing a skewed image. How do I totally uninstall it totally? I tried uninstalling using what was online but I am wondering if I am missing something. Here's a screenshot of what my test card looks like:
I don't see the test card either since it is also showing a skewed image. How do I totally uninstall it totally? I tried uninstalling using what was online but I am wondering if I am missing something. Here's a screenshot of what my test card looks like:
Is there another way to check the version?
Insert this command into Terminal.app:
cat /Library/CoreMediaIO/Plug-Ins/DAL/obs-mac-virtualcam.plugin/Contents/Info.plist | grep -a1 CFBundleVersion
and post the results. It should say the version number in there
Here’s what I got
Have you rebooted your mac?
Yes I tried that.
Could you attach an OBS log of when the problem occurred? That would help understand the problem
Yeah sure. Here it is: 2020-06-03 13-06-27.txt
Very interesting. I thought we had this solved. I see this in the logs
13:06:27.539: base resolution: 1440x900
13:06:27.539: output resolution: 860x538
If you change both resolutions to 1280x720 does that fix things?
To be clear, any resolution should work. So this is definitely a bug.
Very interesting. I thought we had this solved. I see this in the logs
13:06:27.539: base resolution: 1440x900 13:06:27.539: output resolution: 860x538
If you change both resolutions to 1280x720 does that fix things?
To be clear, any resolution should work. So this is definitely a bug.
I tried changing the resolution as well. Here's what I got:
Thanks for your help by the way.
Hmm. I also see
14:38:13.948: NV12 texture support not available
Could you try using a different format (I think this is in the advanced settings page iirc.
It worked! Thanks a lot for your help!
Very interesting I wonder if this is an obs bug or if I'm doing something wrong with converting pixel formats. @dodgepong have you seen anything like this in other issues on OBS? Seems like @tejasftc had the format set to NV12 even though his computer reported that it wasn't supported. This then seemed to break the pixel format conversion to yuv422 that my plugin does
I've never heard of any issue like this before, no.
The NV12 texture not supported
message is for whether full NV12 textures are supported, which is a Windows-specific thing at the moment. It doesn't affect OBS' usage of NV12. OBS will just use shaders to implement NV12 if NV12 textures aren't available, and if there was a bug with that, then you would see it in all outputs because it's the default format.
For format conversion, we usually use FFmpeg. So that shouldn't be in our territory either.
When the base and output resolutions don't match, it uses the GPU to scale, but there isn't any known issue with that either, otherwise it would affect all outputs and not just virtualcam.
Without having a full grasp on all your code I can't really say anything substantive, but I don't think OBS would be giving bad NV12 data, because NV12 is a very high frequency code path (it's the default). It would also produce on Windows in that case. Personally, I'd just check the memory of the data at all parts of the pipeline after you download it from the GPU to figure out where it's coming from. I'd recommend using a test image that would make comparing scanlines of the image more simple when checking for errors.
It looks like a bad linesize/pitch value somewhere.
Do the other formats cause the output use more CPU Power? It really slowed down my computer so I couldn’t really use it.
OBS takes a lot of power in general, I'm afraid a dual core i5 processor (according to your log file) may not be enough to do lot of things simultaneously. I'd like to put your log into the OBS analyzer and look if it is a problem, but I don't know how to :D
NV12 probably uses the least amount of CPU processing. It uses the least data.
Ok. Thanks Tejas Thiyagarajan tejas.thiyagarajan@gmail.com
On Sat, Jun 6, 2020 at 3:40 PM Jim notifications@github.com wrote:
NV12 probably uses the least amount of CPU processing. It uses the least data.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/johnboiles/obs-mac-virtualcam/issues/160#issuecomment-640127280, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKI6YGSI43FVFBWGQ6SWMZTRVLAUXANCNFSM4NR52XYA .
@jp9000 thank you for chiming in! This is the whole of my pixel format conversion code in the plugin:
obs_get_video_info(&videoInfo);
struct video_scale_info conversion = {};
conversion.format = VIDEO_FORMAT_UYVY;
conversion.width = videoInfo.output_width;
conversion.height = videoInfo.output_height;
obs_output_set_video_conversion(output, &conversion);
if (!obs_output_begin_data_capture(output, 0)) {
return false;
}
That should make it so that the output's raw_video
method always gets a framebuffer with the pixel format VIDEO_FORMAT_UYVY
right? Is it correct to say that this shouldn't depend on the current 'Color Format' setting? I'm trying to understand what about the OBS 'Color Format' setting could mess up the framebuffer I receive since I have this conversion in place.
Are you able to reproduce this @johnboiles?
Unfortunately no, so im flying blind
Hm, I wonder what's going on. At some point I'll test this myself and try to debug. My guess is that the client application itself is using the wrong format or seeing it as the wrong format. I'm just kind of overburdened with my own stuff at the moment (and let's not forget the 115 pull requests on main) so I don't really feel comfortable spending time on this right at the moment.
By the way, is there a reason why you're converting to UYVY rather than just using NV12?
@jp9000 to my knowledge UYVY is used because it worked and others didn't, but that was back when this was just a proof of concept and it just stayed.
@jp9000 yes not urgent at all; this doesn't seem to be a widespread problem. Your time is probably best spent working on main! Feel free to drop off the conversation here and we won't be offended :)
What @gxalpha says is correct, UYVY was the first thing I was able to make work and I just ran with it. I spent a little bit of time investigating further in https://github.com/johnboiles/obs-mac-virtualcam/issues/102 and I don't think Apple's Core Media APIs support NV12 as a camera format. I also tried to get I444 to work (using kCMVideoCodecType_AppleProRes4444
) but that didn't seem to work either. Perhaps RGB could be made to work. Obviously if I can match a pixel format that OBS supports natively with a format that works directly as a Core Media IO DAL plugin format then we can avoid the pixel format conversion which should significantly lower CPU usage I think. This is the list of formats I think I have to pick from on the CoreMedia side. It might also be possible to use something from this list of pixel formats though I'm not exactly sure how.
I am also facing the same problem. It only started maybe 2 weeks - 1 month back.
This is supposed to be the test card
and this is when the virtual cam is started.
I am using a mac, but not sure how to get to the logs. if someone can let me know how to get to the logs, i would love to provided it here.
I tried changing the resolution and also color format in advanced settings. Both didn't work. The warpping looks a bit different though.
@TayKangSheng There are two logs needed:
obs-mac-virtualcam
, reproduce the problem and check for any error outputs or just taker a screenshot and post it hereAlso please insert cat /Library/CoreMediaIO/Plug-Ins/DAL/obs-mac-virtualcam.plugin/Contents/Info.plist | grep -a1 CFBundleVersion
into Terminal.app and post the result here.
I'm having a similar thing, just trying it today. It was working fine initially. I wanted more virtual cams, so I duplicated OBS.app to OBS1.app and turned on both virtual cameras. Now, the video is always like the others. Even after stopping an restarting both OBS and Chrome. Is there a separate process running to implement the virtual camera, or some settings file it relies on that could be corrupted when trying two virtual cams?
cat /Library/CoreMediaIO/Plug-Ins/DAL/obs-mac-virtualcam.plugin/Contents/Info.plist | grep -a1 CFBundleVersion
<key>CFBundleVersion</key>
<string>1.2.0</string>
One of the system.log entries: Jun 30 14:07:55 Michaels-Mac-Pro com.apple.xpc.launchd[1] (com.apple.xpc.launchd.domain.user.501): Service "com.obsproject.obs-studio.28124" tried to register for endpoint "com.johnboiles.obs-mac-virtualcam.server" already registered by owner: com.apple.xpc.launchd.oneshot.0x10000005.obs
Due to the way the virtual camera works, only one virtual camera can be used.
Could you try uninstalling and then reinstalling the virtual camera? (https://github.com/johnboiles/obs-mac-virtualcam/wiki/Installing)
Due to the way the virtual camera works, only one virtual camera can be used.
Could you try uninstalling and then reinstalling the virtual camera? (https://github.com/johnboiles/obs-mac-virtualcam/wiki/Installing)
I didn't know how to uninstall so I just reinstalled, with no effect.
Just reinstalling often times does nothing with the DAL-Plugin. The uninstalling tutorial is here: https://github.com/johnboiles/obs-mac-virtualcam/wiki/Installing#uninstalling
OK I uninstalled (thanks for the help!) and reinstalled, the title card is skewed as the others:
One of the system.log entries: Jun 30 14:07:55 Michaels-Mac-Pro com.apple.xpc.launchd[1] (com.apple.xpc.launchd.domain.user.501): Service "com.obsproject.obs-studio.28124" tried to register for endpoint "com.johnboiles.obs-mac-virtualcam.server" already registered by owner: com.apple.xpc.launchd.oneshot.0x10000005.obs
When I turn on the virtual camera I get:
I didn't do anything.. but its fixed now 🤔 🤷
@johnboiles I haven't looked at your code but make sure to check for race conditions. "I didn't do anything but it magically fixed itself" and "I can't seem to reproduce" is a big sign of race conditions. I initially had a race condition in my Windows implementation with the memory two processes would share and it caused some incorrect output. Not saying that is the problem, but just throwing it out there as an item for your checklist.
The output these people are reporting makes me think the sender/receiver processes have desynchronized dimension values. Not entirely sure if that's the case but it's another thing for the checklist.
For the people experiencing this problem: see how changing OBS' resolution affects the skew, and report back. Larger resolutions versus smaller resolutions. You'd want to change the "Output/Scaled Resolution" in OBS' video settings to test that.
@TayKangSheng @mgw-sbic what version of macOS are y'all on? Can y'all attach the log from OBS (from the OBS help menu) as well?
@jp9000 thanks for thinking about this. Certainly does seem like the resolutions are somehow desynchronized, especially because the colors seem to be intact (which rules out pixel format differences I think). It's weird though because I send the resolution along with every frame, so I'm not sure how it could have gotten out of sync.
Hi All, I just downloaded this plugin and it worked momentarily and now it doesn't. It is producing the same errors but it only happened after I closed down my google meet stream and attempted to reopen it. It worked fine with video format initially now nothing.
I opened Snap Camera and set its input to the OBS virtual camera... This seems like it may be a clue: The snap camera preview accurately shows the demo card.
Based on that, I restored the resolution to 1920x1080 and restarted.
Hangouts in Chrome now accurately shows OBS.
@gxalpha Now I have this problem with one macbook and don't have this problem with my other macbook. I hope the details below help..
These are the logs from starting OBS + starting virtualcam. console-obs.txt
These are the logs when i am at google meet before starting virtualcam and after starting virtual cam. console-chrome.txt
This is what it looks like before virtualcam is started
This is what it looks like after virtualcam is started
This is the output from cat /Library/CoreMediaIO/Plug-Ins/DAL/obs-mac-virtualcam.plugin/Contents/Info.plist | grep -a1 CFBundleVersion
<string>1.2.0</string>
<key>CFBundleVersion</key>
<string>1.2.0</string>
This is the Video
settings screen
This is the Advanced
settings screen
This is my macOS version
Literally 25 minutes later after I put my mac to sleep.. and now its working..
I had the same issue with the OBS virtual camera displaying in Google Meet (Chrome browser). I tried multiple resolution settings within OBS to change the behavior and a full uninstall and reinstall of both OBS and the virtual camera and rebooting the Mac. None of those steps resolved things. In the end I followed @wesalvaro lead and installed Snap Camera to experiment with a different application and it did not exhibit the issue at all. I then went back to test again in Google Meet and the skew problem was gone. I'll be on the look out for this resurfacing and better prepared to identify any triggers. HTH.
I had the same issue with the OBS virtual camera displaying in Google Meet (Chrome browser). I tried multiple resolution settings within OBS to change the behavior and a full uninstall and reinstall of both OBS and the virtual camera and rebooting the Mac. None of those steps resolved things. In the end I followed @wesalvaro lead and installed Snap Camera to experiment with a different application and it did not exhibit the issue at all. I then went back to test again in Google Meet and the skew problem was gone. I'll be on the look out for this resurfacing and better prepared to identify any triggers. HTH.
Same exact situation on my side. Changing OBS resolution, restarting Chrome, restarting MacOS... none of these fixed the problem. Installing Snap Camera fixed the issue even when it isn't running.
Hello everyone, I had the same problem. Here are the steps that I followed to correct it:
It worked for me.
I can confirm that @mdmarein's steps fixed the same issue for me as well. I'm pulling a video stream from a Sony a6300 through the Sony Remote app and streaming that window. 640x480 and 1280x720 both work for me.
@gxalpha, maybe the team automatically match base and output resolutions when virtual camera is triggered?
Confirmed that @mdmarein's steps fixed my issue as well...
I'm also affected by this issue - things I've noticed so far:
Describe the issue When I run the OBS Virtual Camera for Mac, I get some weird output.
To Reproduce Steps to reproduce the behavior:
Behavior The virtual camera is showing a weird image in Google Meet.
Screenshots
Desktop (please complete the following information):
OS version: 10.15.5
Application (if applicable): Chrome
Virtualcam version: 1.2.0
OBS version: 25.0.8
Additional context Add any other context about the problem here.