Giter VIP home page Giter VIP logo

cosmosoftware / obs-studio-webrtc Goto Github PK

View Code? Open in Web Editor NEW
579.0 72.0 131.0 58.53 MB

This is a fork of OBS-studio with generic support for webrtc. It leverages the same webrtc implementation most browsers use.

Home Page: http://www.cosmosoftware.io

License: GNU General Public License v2.0

Shell 0.71% Batchfile 0.05% Python 0.04% CMake 2.68% C++ 38.90% Objective-C++ 0.77% C 53.90% NSIS 0.17% Objective-C 1.36% Lua 0.16% Ruby 0.01% Java 1.26%
obs janus webrtc stream obs-webrtc obs-studio libwebrtc cosmo

obs-studio-webrtc's Introduction

OBS-studio WebRTC

This project is a fork of OBS-studio with support for WebRTC. WebRTC supports comes from the inclusion of the open source implementation from webrtc.org used (at least in part) by chrome, firefox, and safari.

The implementation is in the "plugins / obs-outputs" directory. The WebRTCStream files contain the high-level implementation, while the xxxx-stream files contain the specific implementation for a given service.

For the time being the following services and sites are supported:

  • Millicast.com PaaS

Do not forget to share the love with the original OBS-Studio project and its fantastic team there.

Binaries

Pre-built and tested Binaries are available here.

Compilation, Installation and Packaging

Follow the original compilation, Installation and packaging guide https://github.com/obsproject/obs-studio

obs-studio-webrtc's People

Contributors

admshao avatar agouaillard avatar agouaillard-cosmo avatar btbn avatar cg2121 avatar computerquip avatar cosmo-rn avatar ddrboxman avatar derrod avatar fenrirthviti avatar fryshorts avatar gol-d-ace avatar jp9000 avatar jpark37 avatar kc5nra avatar kkartaltepe avatar ludocosmo avatar martell avatar murillo128 avatar notr1ch avatar palakis avatar palana avatar pkviet avatar reboot avatar rytoex avatar scg82 avatar suslikv avatar vodbox avatar wizardcm avatar xaymar avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

obs-studio-webrtc's Issues

disentangled libwebrtc, web socket and OBS Core SSL libs

As first noted by sergio in #20, there are extra dependencies that makes the life of non-webrtc-coders difficult (see #40, and #46). On paper those dependencies are not needed.This bug will track the progress of disentangling this, and trying to use a vanilla WebRTC Build as we go through the code for the new Continuous integration infrastructure anyway.

Best Effort.

@shadoxx

Mac OBS webrtc generated H264 stream does not seems to be understood by Firefox

reported by @jerrychabolla

What did you use:
MacOS
OBS release 2.4.9
stream out using OBS, H264,
view through millicast web app in firefox on mac.

What did you expect:
Be able to view the video stream in any browser.

What did you do, what happened:
Firefox browser (on mac?) no longer displays the video, but one can still hear the audio. This issue does not exist in any other browser or using the OBS-STudio-webrtc Windows version.

can't connect to janus video room

I am using the build "obs-studio-x64-2.4-1-ga879afa8.exe". I installed the janus gateway on a xubuntu 16.04.2 vm.

The Janus demo server is working fine, but OBS_WebRTC will not connect to the video room. I get the error "An unexpected error occurred when trying to connect to the server. More information in the log file." The log file does not have any additional information :(

I have tried reading the documentation for Janus, and all the issues here, but I cannot find any help.
I very much look forward to OBS streaming with such low latency. Thank you for all your hard work.
Please see the attached screenshots and log file.

Log file: 2018-07-31 22-45-18.txt

error_screenshot

janus_webserver_screenshot

Update:
I monitored my LAN with wireshark. I discovered I was trying to connect to the wrong port. I updated the Server Name field of OBS-WebRTC to ws://xubuntu16042:8188. It is still not connecting, but at least now I'm getting a 403 HTML message from the server. I have attached the resulting Wireshark log:
Wireshark_OBS-WebRTC_to_Janus-Gateway_2018-08-01.zip

Update:
After experimenting with the "Plugin Demo: VP9-SVC Video Room", I discovered that the websocket on the janus server is working correctly, serving port 8188.
The OBS-WebRTC is not correctly handling the address ws://xubuntu16042:8188/janus, because I can see in Wireshark that it is trying to send a TLSv1 packet, and it should not be using https for a ws address.

Why when I install a local janus server I don t see myself on a different janus server?

thanks
i have a question:

Configure JANUS
https://github.com/meetecho/janus-gateway. Configure a JANUS server using the video room plugin with websocket protocol activate. You can use their html demo.

OBS settings
Launch OBS, go to settings, select the stream tab and change the URL to your JANUS : wss://janus1.cosmosoftware.io
Put 1234 for the room.

After you can start streaming, OBS will connect to the default room and if you have any suscriber present in the room, you will see the OBS stream. https://clientweb.cosmosoftware.io/janusweb/videoroomtest.html

According to your steps, I installed the Janus service locally
./bin/janues

settings obs stream url wss://janus1.cosmosoftware.io and 1234 for the room.
streaming
and how can i see the obs stream in the web?

If I have any questions, please give me a specific step. Thank you.

Add CMakefike stuff to websocketclient project

What is missing:

  • Add restclient-cpp/incude to the include dir list
  • Add libcurl dependency

To compile static libcurl on windows

git clone https://github.com/curl/curl
cd winbuild
nmake RTLIBCFG=static /f Makefile.vc mode=static DEBUG=no MACHINE=x64

WebsocketClient.cpp missing

Hi, first thank you for your work.

I'm trying to compile under linux (ubuntu 16.04 and 18.04) and an error occurs with missing file WebsocketClient.cpp.

I'ts referenced by plugins/websocket-client/CMakeLists.txt on line 28 but I can not find it on the repo.

I am doing something wrong ?

Thank's and apologises for bad english.
Paulo

Issue with websockets : mutex lock failed: Invalid argument

OS: Mac OS

"libc++abi.dylib: terminating with uncaught exception of type std::__1::system_error: mutex lock failed: Invalid argument".

How to reproduce: Start and stop the connection multiple times.
Crash certainly due to the uncertain destroying order of static variables

Trace
`info: ==== Streaming Stop ================================================
info: -connecting to [url:wss://janus1.cosmosoftware.io:8200,key:ewq,username:da,password:ad]
[2017-06-27 15:02:20] [connect] Successful connection
[2017-06-27 15:02:20] [connect] WebSocket Connection 52.11.122.165:8200 v-2 "WebSocket++/0.7.0" / 101
info: onConnected
[2017-06-27 15:02:20] [frame_header] Dispatching write containing 1 message(s) containing 6 header bytes and 99 payload bytes
[2017-06-27 15:02:20] [frame_header] Header Bytes:
[0] (6) 81 E3 75 E8 2E 00

libc++abi.dylib: terminating with uncaught exception of type std::__1::system_error: mutex lock failed: Invalid argument`

Functionality?

Can the author or anyone else please describe the functionality of OBS-studio-webrtc? How to actually use this and what are the capabilities?

OBS does not provide same quality as web app broadcaster

reported by @jerrychabolla

What did you expect:
with OBS release 2.4.9, MacOS,
web app and OBS should provide same stream quality given a specific webcam

What did you do, what happened:
We did change the capture device from my (mac embedded) iSight to a logitech c920 which made a noticeable difference, although we have not been able get the same quality as with the web based broadcaster.

OBS reports 0KB/s when using webrtc

romain, can you investigate this? likely the webrtc bandwidth estimation or corresponding stat (better) is not wired with the UI or tool.

Connection to red5

Hi and thanks a lot for your well appreciated fork :) 👍
I would have liked to know if by any chance connectivity to red5 server is on your plans ?

Thanks a lot

wrong packaging of dependencies on MacOS

The macOS binary has some incorrect links to libraries in the compiled version and will crash before startup. For example, it expects the end-user to have QT5 and ffmpeg installed locally:

Dyld Error Message:
Library not loaded: /usr/local/opt/qt/lib/QtWidgets.framework/Versions/5/QtWidgets
Referenced from: /Volumes/VOLUME/*/OBS.app/Contents/Resources/bin/obs
Reason: image not found
You get this error message if QT5 is already installed:

Dyld Error Message:
Library not loaded: /usr/local/opt/ffmpeg/lib/libavcodec.58.dylib
Referenced from: /Volumes/VOLUME/*/OBS.app/Contents/Resources/bin/obs
Reason: image not found
(full error log for ffmpeg)

Start Streaming locks up after first stream

Step to reproduce :

  • Compile OBS for Windows
  • Run OBS
  • Start Streaming on wss://live.millicast.com:443/ws/v1/pub?token=d29778e3f9899f543d587556d50b65a004c6f8026e648d5e7a65bcd6f08f1ba7 , stream name : david
  • Click on Stop streaming
  • Click Start streaming

What is expected :

  • Green square indicating stream started

What happened :

  • The button "Start Streaming" is locked and streaming does not start.
  • The only way to stream again is to exit and start OBS again.

logs :
obs.logs.david.txt

[WINDOWS] Session value is not handled correctly

On windows 10 with libwebrtc v61.

When we exchange the 'create' message to JANUS, the session value is set correctly, which has the result that we can't connect.

I suspect the type of variable is wrong.

CamSoda Broadcast support?

Sorry if this is an unwanted feature request, and not sure of the feasibility of this, as I'm the first to admit I do not really know much about the WebRTC protocol. I was curious if there were any hopes of supporting CamSoda's implementation of WebRTC?

We're currently using a virtual webcam output solution which is a lot of overhead at best.

I have access to her account if any intercepted data or the swf flash (ick) broadcasting tool would be of any help.

Would be amazing to be able to broadcast directly from OBS.

Issues Compiling on Windows 10

I'm using Windows 10 with Visual Studio Community 2017, attempting to compile OBS w/webrtc and it doesn't seem to be working.

What's the current recommended way of compiling and linking the external libwebrtc library on Windows 10? Thank you!

STUN/TURN support

Any plans to add this at some point? If not, what library would you suggest and where in general (file / function?) would that library need to be integrated?

H.264 support in OBS-studio-webrtc

This one is tricky, in the sense that no easy solution exists.

= the scope of the problem =

  • H.264 is NOT a royalty-free codec.
  • the burden of paying the royalties is on the one compiling the H.264 implementation, wether they wrote it or not.
  • for that reason webrtc-standalone code does not compile H.264 support by default
  • as we are using our own pre-compiled libwebrtc packages, we also do not support H.264 in OBS.
  • that also means we currently do not support Safari iOS.

Question: what about H.264 support in original OBS? If we provide pre-compiled OBS-studio binaries, are we supposed to pay H.264 royalties (there is a threshold of download below which you do not have to pay, but we have to check the value of the threshold and account for downloads of all our projects and binaries that include H.264

= possible solutions =

  • do not provide pre-compiled binaries. Honestly, it is difficult for users to compile it. That should be avoided.
  • provide pre-compiled librairies, and put in place accounting of download, hoping to stay under the threshold.
  • Use H.264 compiled by others, i.e. OpenH264 libs from Cisco. That is what Mozilla does in Firefox. That is NOT what google does. Google uses ffmpeg for decoding, and OpenH264 for encoding. This is much more work, and possibly maintenance if google does not let us upstream the changes, but this is the right thing to do.

Can we get a WebRTC Source?

The browser source is limited in that you cant control audio for it. I only need webRTC for my input media but will final the stream to Mixer.com. I'm hoping to only use WebRTC to minimize delay prior to the final stream.

Start Streaming button locks up

Step to reproduce :

  • Compile OBS for Windows
  • Run OBS
  • Start Streaming on wss://live.millicast.com:443/ws/v1/pub?token=d29778e3f9899f543d587556d50b65a004c6f8026e648d5e7a65bcd6f08f1ba7 , stream name : david
  • Click on Stop streaming
  • Click Start streaming

What is expected :

  • Green square indicating stream started

What happened :

  • The button "Start Streaming" is locked and stream does not start.

The only way to stream again is to exit and start OBS again.

logs :
obs.logs.david.txt

OBS Crashes on Incorrect URL and on Janus Restart

If you enter an incorrect wss:// URL, OBS crashes instead of showing an error message stating it can't connect. It also crashes during streaming if the Janus server crashes or restarts. I tried to find where to catch the errors but didn't have any luck.

Tested on a Mac with latest master 51c0aa3

Stacktrace on invalid URL:

info: janus_stream_defaults
info: janus_stream_create
warning: Output 'adv_stream': Tried to set a delay value on a non-encoded output
info: janus_stream_start
info: -connecting to [url:wss://test.com,room:1234,username:,password:]
[2018-07-09 14:23:48] [info] asio async_connect error: asio.system:61 (Connection refused)
[2018-07-09 14:23:48] [info] Error getting remote endpoint: asio.system:22 (Invalid argument)
[2018-07-09 14:23:48] [fail] WebSocket Connection Unknown - "" / 0 websocketpp.transport.asio:3 Underlying Transport Error
[2018-07-09 14:23:48] [error] handle_connect error: Underlying Transport Error
[2018-07-09 14:23:48] [info] asio async_shutdown error: asio.ssl:336462100 (uninitialized)
[1]    95100 illegal hardware instruction  ./obs

Stacktrace on Janus restart during stream:

[2018-07-15 01:46:02] [error] handle_read_frame error: websocketpp.transport:7 (End of File)
[1]    13868 illegal hardware instruction  ./obs

Bandwidth limitations

Hey there,

apologies in advance if this isn't the right place to pose this question, but I couldn't find a better space for it. There's also a fair chance I'm miscomprehending some of what WebRTC does, so I'd be really happy about any sort of illumination you can give me, be it abstract or with respect to my configuration.

I've set up Janus on a server and I'm streaming to it with OBS-studio-webrtc via wss. I've set a bandwidth of 5000 Kbps in OBS as well as CBR encoding (via x264, if that matters), however, a bandwidth monitor on my system (OBS itself just says 0KB/s) only shows a somewhat steady stream of 350 KByte/s, or 2800 Kbps. As a result, the video, which comes in at the same rate on the frontend, on occasion becomes blurry, pixelated as will happen under bandwidth starvation of higher resolutions and will even stutter/hang in high motion scenes.

I've seen a figure similar to this before as the bandwidth of another WebRTC application, so now I'm wondering if 2500-2800 Kbps is some sort of limitation in the WebRTC standard (I tried grepping through some docs, but didn't come up with anything), or if OBS-studio-webrtc artificially limits output bandwidth to the rtc gateway, or if the gateway (Janus in my case) somehow manages to slow down OBS, or if there's something else that's going on.

Again, thanks in advance for any information.

OBS not streaming h264 on Windows 10

  • Environment:

Microsoft Windows 10 home edition
OBS version 2.5-2 gf32b29ae

  • Steps to reproduce:
  1. Go to millicast.com page
  2. Download and install latest widows OBS version 2.5-2 gf32b29ae
  3. Tested with millicast account, publishing Websocket URL: wss://live.millicast.com:443/ws/v1/pub?token=6022f960abce03b5895c2dbb8d8a06d9608d6e37a7c3e00f4ddd42ca8f1451ce
    Publishing stream name: roberts
    Video Codec: tried h264 and H264
  • Expectation: start streaming

  • What happens: OBS Start Streaming button locks up. OBS does not publish. In order to stream you need to exit OBS and restart. Streaming starts after removing h264 from video codec field, however the steam is not viewable on Safari.

  • OBS log attached

  • Questions for devs:

When the video codec field is left empty, does it default to vp8?
obs logs.zip

libwebrtc dependency

The link to libwebrtc is an atlassian page that is blocked to anyone that dosen't have access to "cosmosoftware.atlassian.net".

Or am I missing something?

can't see obs stream

Launch OBS, go to settings, select the stream tab and change the URL to your JANUS : wss://janus1.cosmosoftware.io
Put 1234 for the room.

After you can start streaming, OBS will connect to the default room and if you have any suscriber present in the room, you will see the OBS stream. https://clientweb.cosmosoftware.io/janusweb/videoroomtest.html

follow the steps i haven't seen the obs stream.https://clientweb.cosmosoftware.io/janusweb/videoroomtest.html

how can i setting obs stream url and room?

Feature request: handle bandwidth settings for webrtc streaming

  1. OBS users are used to set up bandwidth through the settings panel.

  2. while webrtc handles bandwidth management by default and it is well known that augmenting bandwidth is NOT helping (see Facebook presentation at CommConUK 2018 here) it might be helpful to try to honour those settings. Worse case scenario the user should be aware they will be ignored when using webrtc.

  3. The SDP work arounds to control bandwidth per media line are well know and documented.

I suggest we implement bandwidth management for webrtc using whatever is in the settings. Special care should be given to recognise default settings.

The recent visual feedback of the bandwidth in the UI will allow to check that we start at the right value. That will not only help having feature parity with RTMP in OBS, but also manage OBS users expectation.

Additional bonus, for those ho could not manage to implement bandwidth management with webrtc, or to set up bandwidth beyond 2Mbps, there will be no more coding needed to evaluate and validate.

QT @rpath incorrect on mac OS

After compiling the code and run the app, we got the error: error: dyld: Library not loaded: @rpath/QtWidgets.framework/Versions/5/QtWidgets Referenced from: /Users/ben/OBS/OBS-studio-webrtc/myBUILD/rundir/RelWithDebInfo/bin/./obs Reason: image not found

UPDATE:
Thanks to Alex, we found a solution, we have to change manually the rpath with the command:
install_name_tool -add_rpath /Users/ben/Qt/5.8/clang_64/lib OBS_PATH

where is "webrtcVersion.h"?

[ 56%] Building CXX object UI/CMakeFiles/obs.dir/window-basic-status-bar.cpp.obj

window-basic-status-bar.cpp
C:\cosmo\OBS-studio-webrtc\UI\window-basic-status-bar.cpp(9): fatal error C1083:
Cannot open include file: 'webrtcVersion.h': No such file or directory
NMAKE : fatal error U1077: 'C:\PROGRA2\MICROS1.0\VC\bin\amd64\cl.exe' : return
code '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 14.0
\VC\BIN\amd64\nmake.exe"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 14.0
\VC\BIN\amd64\nmake.exe"' : return code '0x2'
Stop.

Start Streaming button locks up after Stop Streaming

Step to reproduce :

  • Compile OBS for Windows
  • Run OBS
  • Start Streaming on wss://live.millicast.com:443/ws/v1/pub?token=d29778e3f9899f543d587556d50b65a004c6f8026e648d5e7a65bcd6f08f1ba7 , stream name : david
  • Click on Stop streaming
  • Click Start streaming

What is expected :

  • Green square indicating stream started

What happened :

  • The button "Start Streaming" is locked and stream does not start.

The only way to stream again is to exit and start OBS again.

logs :
obs.logs.david.txt

Issues when installing in a non-default directory

The shortcut link points to obs64.exe, but it can not be found... and when browsed to the location, it can not start as it can not located the locale file

image

image

When startimg directly from obs64.exe in the installed directory, C:\Program Files\OBS Studio WebRTC (64bit)\bin\64bit in my case. it works... So the start directory is likely wrongly defined in the shortcut.

Mac Libwebrtc - libssl and libcrypto path issues

When running otool on the libssl.1.1.dylib and libcrypto.1.1.dylib files supplied by the libwebrtc installer, there are a few path issues

/usr/local/lib » otool -L libssl.1.1.dylib
libssl.1.1.dylib:
	/Users/cosmo/DEV/libwebrtc-cmake/build_release/openssl_inst/lib/libssl.1.1.dylib (compatibility version 1.1.0, current version 1.1.0)
	/Users/cosmo/DEV/libwebrtc-cmake/build_release/openssl_inst/lib/libcrypto.1.1.dylib (compatibility version 1.1.0, current version 1.1.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1252.50.4)
------------------------------------------------------------
/usr/local/lib » otool -L libcrypto.1.1.dylib
libcrypto.1.1.dylib:
	/Users/cosmo/DEV/libwebrtc-cmake/build_release/openssl_inst/lib/libcrypto.1.1.dylib (compatibility version 1.1.0, current version 1.1.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1252.50.4)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.