# WebRTC / OBS



## vociti (Sep 5, 2016)

I was thinking about testing my coding skills to see if I could get OBS to be compatible with WebRTC, get it away from RTMP. Is it possible? Or do you know of anyone else that is attempting it?


----------



## c3r1c3 (Sep 5, 2016)

It might be possible. OBS currently uses ffmpeg for a lot of stuff on the backend, so you might want to check with them first to see if they have WebRTC support, or plan on adding it.


----------



## vociti (Sep 6, 2016)

Good call, I didn't think of that! I will do that.


----------



## vociti (Sep 6, 2016)

c3r1c3 said:


> It might be possible. OBS currently uses ffmpeg for a lot of stuff on the backend, so you might want to check with them first to see if they have WebRTC support, or plan on adding it.



so, is ffmpeg responsible for not only encoding using h.264, but also creating the RTMP protocol which enables streaming to youtube, twitch, etc?


----------



## dodgepong (Sep 6, 2016)

OBS doesn't use FFmpeg for its standard encoding, nor does it use its RTMP output capabilities for streaming via RTMP -- it uses x264 directly with librtmp.

However, in the advanced settings, you can select FFmpeg as the encoder and can probably set it up in such a way that it also broadcasts the encoding over WebRTC. I'm fairly certain that method already works with RTSP.


----------



## vociti (Sep 6, 2016)

dodgepong said:


> OBS doesn't use FFmpeg for its standard encoding, nor does it use its RTMP output capabilities for streaming via RTMP -- it uses x264 directly with librtmp.
> 
> However, in the advanced settings, you can select FFmpeg as the encoder and can probably set it up in such a way that it also broadcasts the encoding over WebRTC. I'm fairly certain that method already works with RTSP.



Thank youdodgepong. Very helpful information. Gonna investigate this week and give it a try.


----------



## muxlux (Oct 11, 2016)

@vociti any lucks w/ffmpeg encoding over webrtc? guess i'm gonna have to try it too :)


----------



## Nodebuck (Oct 29, 2016)

dodgepong said:


> OBS doesn't use FFmpeg for its standard encoding, nor does it use its RTMP output capabilities for streaming via RTMP -- it uses x264 directly with librtmp.
> 
> However, in the advanced settings, you can select FFmpeg as the encoder and can probably set it up in such a way that it also broadcasts the encoding over WebRTC. I'm fairly certain that method already works with RTSP.



Where can I select FFmpeg as the encoder? I only see x264, NVENC and QuickSync in the encoder list. (OBS Studio 0.16.2, Windows 10)


----------



## Jack0r (Oct 29, 2016)

Settings -> Output -> Output Mode -> Advanced

Recording -> Type -> Custom Output (FFmpeg)


----------



## vociti (Dec 22, 2016)

@muxlux we are actually trying right now. @Jack0r, does that mean ffmpeg output would only work for the recording feature of OBS or would that also apply to streaming? Or would we have to tell ffmpeg which server to stream the RTP to?


----------



## Hong Kim (Apr 11, 2017)

@vociti I'm trying to make this work as well. Any luck so far?


----------



## Rayj (Apr 25, 2017)

I have been playing with WebRTC for quite awhile, however not in the capacity that this thread is investigating.
I would be very interested if OBS or a similar program can use WebRTC as the video source.

Has there been any progress in this area?

Thanks,

Ray


----------



## Rayj (Apr 25, 2017)

I would recommend getting to know Muaz Khan.   He is a guru with WebRTC.   In fact, see this post:
https://github.com/muaz-khan/WebRTC-Experiment/tree/master/ffmpeg


----------



## Dr. Alex Gouaillard (Mar 20, 2018)

https://github.com/CoSMoSoftware/OBS-studio-webrtc


----------



## developerlearn999 (Jun 26, 2018)

Hi
did some one made a build version of the obs studio webrtc and can share?


----------



## Dr. Alex Gouaillard (Jul 25, 2018)

https://github.com/CoSMoSoftware/OBS-studio-webrtc/releases


----------



## pkv (Jul 31, 2018)

Dr. Alex Gouaillard said:


> https://github.com/CoSMoSoftware/OBS-studio-webrtc/releases



@Dr. Alex Gouaillard did you consider opening a PR in order for Jim to consider it for merging ? (I have no idea how this would be received though)


----------



## bdsound (Oct 23, 2020)

OBS v26 has virtual camera feature so... you can now do it


----------



## Pepito-06 (Jan 14, 2021)

Hi,

I've installed the obs-studio-webrtc, and got the shortcut of it on my desktop. launched this instance of OBS, configured websocket by default (on port 4444). How do I get to stream obs from an html page ?
When I try to access http://myip:4444, I get an error 426.
Any Ideas ?
My goal is to get the stream to use it as a feedback video.

Thanks !


----------

