-
Notifications
You must be signed in to change notification settings - Fork 229
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
Browser Source not playing WebRTC videos on MacOS only #209
Comments
try with an earlier version of obs (v23 for instance); we updated the cef version in v24. |
only seeing this: https://bitbucket.org/chromiumembedded/cef/issues/2064/persist-webrtc-deviceids-across-restart |
Thank you. Much appreciated!! OBS 23.1.0 for Mac works. I'll try to see why this is the case and report back if I find the answer. With WebRTC a growing component of the web and video/audio, I'm surprised this hasn't been previously reported. |
I had a user report that Audio capture via Browser Source wasn't working in v23 for them, but it was in v24? This despite the WebRTC issue being fixed for them when they reverted to v23. I might need to take a deeper look into this CEF issue sooner than I wanted as v23 offers limited functionality for my users without audio also. Based on what I saw earlier in my testing, it didn't seem like the WebRTC RTCP/SDP/ICE handshake completed. WebRTC traffic should be passed as UDP packets, but it seemed like it was resorting to TCP packets and still even then failing. This implies that the WebRTC handshake depleted all available connection methods and was getting desperate. This may imply perhaps a Software Firewall is blocking non-standard ports from opening? I ran https://browserleaks.com/webrtc on OBS v24 on MacOS and it identified that WebRTC IP address sharing is disabled. It is enabled on OBS v25 for PC however. I took a closer look at CEF and IP blocking and there appear to be quite a few flags that will enable or disable WebRTC. Here's a sample of it added to the sample CEF build. I've tried '''open -a OBS.app --args --enable-media-stream''' without any luck. The same with '''/Applications/OBS.app/Contents/MacOS/OBS --enable-media-stream''' Other settings like "webrtc.ip_handling_policy" is a preference that must be set using CefRequestContext::SetPreference concern me, but I don't know if they were enabled during build or not. On Safari, to enable WebRTC, the user first needs to accept the Microphone's permission via a popup. Not sure if there is anything like that going on in 3770. I've downloaded the source code for 3770, yet just don't have the time right now to dig deep into figure it out there. |
StreamLabs OBS Beta (newly released) seems to solve the OBS+MacOS issue for me. Browser Audio + WebRTC playback works with it, although its browser-source video playback frame rate is much lower than with OBS v23. |
If I had to guess, this might be due to disabling NetworkService in this commit: 1a5f241 The reasoning for doing this is found in this commit: 8e1279e Unfortunately I don't have a way to test this, but it seems plausible to me. It's possible upgrading to 3809 would let us use NetworkService again, though so far we've had trouble getting 3809 to render anything on Mac. |
indeed if I re-enable NetworkService, obs.ninja works. But it breaks loading of video files larger than a few megs ... |
Thank you for figuring that out and confirming it. It’s a relief.
I suppose there wouldn’t be a way to offer a custom build on here for Mac
users looking for WebRTC support instead? :)
Technically WebRTC users are not loading files; rather they are streaming
video data. There is no solution for them that is all that great right now.
I get a few requests a day about this issue from
Mac users.
Regardless, thank you
On Sat, Apr 4, 2020 at 4:23 AM pkv ***@***.***> wrote:
indeed if I re-enable NetworkService, obs.ninja works. But it breaks
loading of video files larger than a few megs ...
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#209 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AATU2UROEJFHQYI6WG36I2DRK3VB7ANCNFSM4LRT7CWQ>
.
--
…__________________________
Steve Seguin
|
we need to discuss within the dev team and Jim will decide what to do. The fix is simple. But it breaks something else so ... |
I suspect that even if we just re-enabled NetworkService on Mac, WebRTC streams would have poor performance for lack of hardware acceleration in the browser source. I don't think there's going to be a good solution here until we can upgrade CEF, which we can't do until CEF merges back in audio mirroring support and I think also OSR support. |
Could it be a configuration setting in the settings for the source? "Optimize for WebRTC (experimental)" |
As a possibly related issue, I've been trying to get obs-mac-virtualcam running with a streaming web video in the background using the Browser Source. I have essentially the same experience as @steveseguin, the "Interact with browser" brings up the web page, but I cannot play the stream, the browser is mostly unresponsive. However, if I launch the Windows version of OBS from a virtual PC, it works fine, and if I switch to StreamLabs, it works there as well (without the virtual cam). If you think logfiles would be useful for troubleshooting, or if you have suggestions for things to try, happy to help. |
We know exactly what the problem is, so we don't need any more troubleshooting. The problem is that fixing what is wrong will break something else. There isn't going to be a good solution to this problem until latest CEF fixes a couple lingering issues, and then we can update. |
I want to use WebRTC feeds in obs-browser on Mac too. Is this issue related to the fact that the plugin must stick with the version 75.1.14 of CEF? It seems that this bug is related to this specific version. I tried to compile with multiple newer versions and it looks like the plugin code is no longer in sync with CEF's API. |
The specific cause of the problem with WebRTC video is that OBS ships obs-browser with NetworkService disabled on Mac. Technically NetworkService could be enabled on the build of CEF that we are currently shipping (3770), but the reason it was disabled is because Mac was seeing a problem related to loading large remote video files, and the solution at the time turned out to be disabling NetworkService. It's possible a future release of CEF has fixed that issue, such that NetworkService could be re-enabled without causing problems for large video files. However, future releases of CEF have broken other functionality, namely hardware acceleration (and for a while the new audio API as well, but that has since been fixed). There does not exist a newer release of CEF that has all of the issues fixed that we need. Once one does exist, then we will upgrade. |
@dodgepong Thanks for the details. Are you saying that if I don't need the feature of loading a large remote video file, but do want the feature of playing video from BrowserSource, then I can recompile OBS with NetworkService enabled? |
Yes. |
@jburbs Have you had any success with this? I have not, and the solution of rolling back to v23 does not work for me as using studio mode was for all intents and purposes broken before 25.0.5 (I believe). But I'm sure I'm doing something wrong in my compiling, as I'm not that advanced... |
@sjpapai @jburbs I was able to compile and it seems to work in quick testing. Catalina, OBS 25.0.7-448 completely from source. Build instructions from https://github.com/obsproject/obs-studio/wiki/Install-Instructions#macos-build-directions Clone the git repository, then edit the obs-browser source (the .CPP) to rollback obsproject/obs-studio@80a1fee Build, run, grant screen recording if needed on Catalina. (You will probably have to remove the current OBS from the list to use the new build.) Add browser source with OBS.ninja push URL. You also have to add the Note: I have no expertise with any of the underlying libraries or anything that might break (besides reading the comment about large remote video files above)! Build and use at your own risk, etc. That said, would love to hear if it reliably works for anyone, and will try to report back if I end up using it as well. |
Hello everyone, @dodgepong thank you for the info you shared. Any news about the update on CEF? Or where can I see that status? I just need to load video streams in a browser source within OBS for Mac. I have a game changer technology I'm making and this is really needed from our beta testing users. Thank you! Marcelo. |
When we have more information to share about a CEF update, it'll be posted in here, among other places. Feel free to subscribe to updates for this thread. |
It's a real shame this issue persists on the Mac. Any updates? |
Last update was 10-days ago or so:
|
@WizardCM third party alerts don't work anyway on macOS for many users? |
Thanks Steve. |
there's been no movement unfortunately on cef side regarding the merge of shared textures PR. It'll require a bit of work on our side since it adds shared textures for mac, so patience should be rewarded eventually for mac users. We're following closely the situation. |
hi! so how can i test this in my mac? i downloaded the cefclient binary and it works! but how can i test this inside an OBS beta? ... I'm sorry for not understanding how to build it :) but i really need to test this out! thank you. |
I would also really like to test this if possible. Ideally without having to build OBS on the Mac. |
Woah, a new CEF version for OBS on Mac would be more than amazing. Is there a timeline for this PR to be incorporated? Can't wait. |
No "timeline" specifically, but it's being actively worked on. Follow the PR that @PatTheMav linked for more details. |
Hello everyone! Just wanted to provide an update. @PatTheMav @pkviet and myself have recently put in a fair bit of work to try and get a number of macOS browser-related issues fixed. While it's not all ready for a release just yet, we wanted to open it up for more testing. These changes should solve all the issues you've been running into. Please test and let us know if you run into any strange behaviours.
Download the build here.Note: The release is code signed, but not notarised, so the the .dmg and .app need to be opened by actively selecting "Open" in the files' context menu. |
Awesome job @WizardCM, @PatTheMav and @pkviet. It works perfectly for me! The only oddity I discovered was every time I close OBS I get a message saying "OBS quit unexpectedly." |
That sounds like a crash on exit, I've had that occur at weird times but wasn't able to replicate it after. Did you get a crash report or anything? Does the log say anything at the bottom? |
I just tried deleting all my scenes and that seems to have fixed it. Maybe something was up with the different versions of OBS that I've been testing? Here is the crash log before I deleted the scenes: |
@castles Please re-attach that log as a txt file to your post, makes it easier to follow the discussion. Thank you. |
Yeah, sorry about that.. I thought github compressed long posts. txt file has been added. |
Looks like EOSWebcamUtility was involved, but also weird how after it an event was posted to the main window which triggered recursive paint events that lead to the crash.. Doesn't immediately look familiar to me though. |
This build is working great for me, and feels snappy with a browser overlay that used to seriously lag OBS. Very exciting, thank you! No crash on exit for me fwiw. |
I can't seem to replicate it now that I've re-created my scenes so I don't think its worth trying to track down. I will comment again if it comes back. |
I tested this with OBSN and it appears to work well. No crash on exit for me either. |
it works with no problems. Very good work! |
It works, the only thing I see (maybe because I'm using an M1 Mac Mini) is
the stinger transition when recording locally stutters a lot.
I'm using a quicktime video with alpha channel for the transition...
Other than that, works great.
…On Mon, Dec 21, 2020 at 9:15 AM UnixCro ***@***.***> wrote:
it works with no problems. Very good work!
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#209 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AG2XE5TOMTYLE7CCIP3TFATSV5J6LANCNFSM4LRT7CWQ>
.
|
Sounds like ProRes? Those ones take quite the toll. Converting it to vp9 with alpha might help a bit - it's still CPU-decoded, but the ffmpeg decoder is already quite efficient. At least on my 5-year old iMac the vp9 was less taxing than the ProRes file. Iirc encoded it with this: |
Love VP9, will try this for sure.
thanks.
…On Mon, Dec 21, 2020 at 11:58 AM Patrick Heyer ***@***.***> wrote:
Sounds like ProRes? Those ones take quite the toll. Converting it to vp9
with alpha might help a bit - it's still CPU-decoded, but the ffmpeg
decoder is already quite efficient. At least on my 5-year old iMac the vp9
was less taxing than the ProRes file.
Iirc encoded it with this: ffmpeg -i IN.mov -c:v libvpx-vp9 -b:v 0 -crf
15 -vf scale=1280:-2 -sws_flags lanczos+full_chroma_inp -an OUT.webm. If
you don't want to downscale to your canvas resolution you can leave out the
-vf option of course.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#209 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AG2XE5TQAHBB3RZ5DDKZ7XDSV55CVANCNFSM4LRT7CWQ>
.
|
I just tried this ffmpeg command and it works but it didn't encode all the
frames.... is there a way to make sure all the frames are converted?
I will try again tho :)
Thanks.
…On Mon, Dec 21, 2020 at 11:58 AM Patrick Heyer ***@***.***> wrote:
Sounds like ProRes? Those ones take quite the toll. Converting it to vp9
with alpha might help a bit - it's still CPU-decoded, but the ffmpeg
decoder is already quite efficient. At least on my 5-year old iMac the vp9
was less taxing than the ProRes file.
Iirc encoded it with this: ffmpeg -i IN.mov -c:v libvpx-vp9 -b:v 0 -crf
15 -vf scale=1280:-2 -sws_flags lanczos+full_chroma_inp -an OUT.webm. If
you don't want to downscale to your canvas resolution you can leave out the
-vf option of course.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#209 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AG2XE5TQAHBB3RZ5DDKZ7XDSV55CVANCNFSM4LRT7CWQ>
.
|
I got this error when using FFMPEG
frame= 79 fps=2.7 q=0.0 Lsize= 12953kB time=00:00:02.23
bitrate=47499.8kbits/s speed=0.0753x
video:12850kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB
muxing overhead: 0.801644%
on frame 79... for some reason.
the video file has a few more frames than that.
please let me know what you think?
Thanks
…On Mon, Dec 21, 2020 at 11:58 AM Patrick Heyer ***@***.***> wrote:
Sounds like ProRes? Those ones take quite the toll. Converting it to vp9
with alpha might help a bit - it's still CPU-decoded, but the ffmpeg
decoder is already quite efficient. At least on my 5-year old iMac the vp9
was less taxing than the ProRes file.
Iirc encoded it with this: ffmpeg -i IN.mov -c:v libvpx-vp9 -b:v 0 -crf
15 -vf scale=1280:-2 -sws_flags lanczos+full_chroma_inp -an OUT.webm. If
you don't want to downscale to your canvas resolution you can leave out the
-vf option of course.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#209 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AG2XE5TQAHBB3RZ5DDKZ7XDSV55CVANCNFSM4LRT7CWQ>
.
|
No idea, the command doesn't specify anything regarding frames - it takes the file as-is and converts it. You can try making output more verbose while encoding (ffmpeg allows keyboard input during it) and then hit Google with any specific error you might get. |
Thanks Patrick. I’ll try that.
Sent on the go.
…________________________________
From: Patrick Heyer <notifications@github.com>
Sent: Monday, December 21, 2020 12:49:14 PM
To: obsproject/obs-browser <obs-browser@noreply.github.com>
Cc: Marcelo Moyano <marcemoyano@gmail.com>; Comment <comment@noreply.github.com>
Subject: Re: [obsproject/obs-browser] Browser Source not playing WebRTC videos on MacOS only (#209)
No idea, the command doesn't specify anything regarding frames - it takes the file as-is and converts it. You can try making output more verbose while encoding (ffmpeg allows keyboard input during it) and then hit Google with any specific error you might get.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub<#209 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AG2XE5ROJRQU2T3CBVU6J3TSV6DBVANCNFSM4LRT7CWQ>.
|
©WizardCM Wonderfull, thank you so much. I did test your build extensively with various overlays and found it very stable and - most amazing - the CPU load almost reduced by half! Default fps seem to be lower than normal and a little too low for most css animations. OBS Ninja now works fine for me. Unfortunately the audio signal has much more noise compared to Chrome and within OBS I hear clicks which I don't hear when monitoring the same signal with Chrome. I don't know if this is related to OBS or to OBS Ninja. I tried to run OBS Ninja (to broadcast the virtual cam) as custom browser dock, but received the following error message: "Permissions denied. Please ensure you have allowed the mic/camera permissions." |
Hi guys! Apologies in advance if I'm doing something wrong here. I'm trying to share the screen of an external laptop using OBS Ninja into my OBS. I've received a message into the browser link in OBS, saying that the 26.1 doesn't support OBS Ninja, but I could install the test build of the 26.2 at the link quoted. It looks like, though, the download link is not active anymore. Could you please help me? Also, is this the only way I can achieve what I'm trying to achieve? :) Thank you, Marco
|
Hi Marco, join me on discord @ https://discord.obs.ninja. This isn't the correct place for OBS.Ninja support. |
FWIW you just need to add the streamelements(iirc) parameter that makes OBS.ninja skip the OS detection. The WebRTC functionality hasn't been officially released, so OBS.ninja cannot discover the new "working" version. |
Thanks to the following PRs and the work of @PatTheMav and @pkviet - hardware acceleration is now available in OBS starting in 26.1.2.
Also big thanks to all of you who tested the build and verified that everything works. |
Awesome!
Many thanks for everything that's gone into this update :-)
Bruce
…On Sat, 9 Jan 2021 at 05:52, Matt Gajownik ***@***.***> wrote:
Thanks to the following PRs and the work of @PatTheMav
<https://github.com/PatTheMav> and @pkviet <https://github.com/pkviet> -
hardware acceleration is now available in OBS starting in 26.1.2
<https://github.com/obsproject/obs-studio/releases/tag/26.1.2>.
- #252 <#252>
- obsproject/obs-studio#3933
<obsproject/obs-studio#3933>
- obsproject/obs-studio#3934
<obsproject/obs-studio#3934>
- obsproject/obs-studio#4034
<obsproject/obs-studio#4034>
Also big thanks to all of you who tested the build and verified that
everything works.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#209 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAFPHH6Y5QLIJMKMBBXSCKLSY7VLHANCNFSM4LRT7CWQ>
.
|
I can load WebRTC video into OBS Browser Source on Windows without issue, but on MacOS the video does not play.
The same video will play fine on Chrome Standalone for MacOS though.
It may be a STUN/ICE issue, or perhaps a Codec decoder issue; not sure yet.
Copy of console logs of a working session:
https://docs.google.com/document/d/1ZqbjUUKrRmKZoL5CU0Nt6VtmJMIFWqA5sQEAV8Hy2VE/edit?usp=sharing
Copy of console logs of it NOT working on OBS for MacOS.
https://docs.google.com/document/d/1Knnk4kOc7JOTMfemWxh5-8RUIn1t8Ksnm6UA9vwzHAM/edit?usp=sharing
I've tried forcing H264 and VP8; neither worked.
The Mac is connected over Ethernet with no Firewall enabled on the Mac.
I've had other Mac users report the same issue.
You can reproduce by trying to load a self-hosted video stream at https://obs.ninja , or even try Caffeine.tv.
Expected Behavior
WebRTC video should play on OBS if loaded via a browser source
Current Behavior
Just spins, as if the ICE negotiation failed or the video codec isn't supported; not sure.
Steps to Reproduce
Additional information
If you load the video into OBS with the URL https://obs.ninja/beta/?streamid=xxxxx instead, you will be able to access console logs of OBS @ https://console.re/obsninja
I have not tried using a TURN server yet, but that is not an option for me.
The text was updated successfully, but these errors were encountered: