How to use OBS Studio as an external encoder for Microsoft Teams and Stream Live Events

Hi All,

recently Microsft published a list of video encoders tested for Live streaming with Microsoft Stream (http://bit.ly/LiveEnc).
One of this products is OBS Studio, a free and open source software for video recording and live streamig (https://obsproject.com/).

This is a great news and big improvement on live events direction compared to Skype for Business.
This area (meetings, meetings recording and live events) is definitely the one that I love in Teams (in conjunction with Stream).

Note: before you go on, it’s a good idea to read this article to understand differences in Live events between Teams, Stream and Yammer
Live events across Microsoft 365 in Yammer, Microsoft Teams, and Microsoft Stream

In this article you will find:
– Live Events with Microsoft Teams
– Live Events with Microsoft Stream
– OBS Studio setup
– OBS Studio streaming

Other articles on OBS Studio you can find interesting:
How to use OBS Studio as an external encoder for Yammer Live Events

How to use OBS Studio as a virtual webcam source in Teams and Live Event with NDI Tools

Live Events with Microsoft Teams

  1. Click on Meetings tab -> Schedule a meetingobs_01
  2. Be careful to click on the arrow to open the meeting type window and choose New live event
    obs_02n
  3. Fill meeting informations and click Next
    obs_03n
  4. Now you have to choose Live event settings.
    These are the default settings, Org-wide and Teams as producer
    obs_04n
    But we want to use an external encoder like OBS Studio, so we need to change the production type to External encoder.
    obs_04bis
    Note: doing that will greyed out the Public option.
    This table show you why: Who can watch live events?
    obs_05n
  5. Meeting is ready and published in Stream.
    Click Join to start the pre-live setup
    obs_06.jpg
  6. When you join the live meeting you will see a window like this one.
    Note that the meeting is powered by Stream, that you are Offline and follow the instruction on the left.
    First of all you have to click Start setup to prepare the live meeting
    obs_09
  7. Wait few seconds…
    obs_10
  8. Now the live meeting is ready to accept incoming stream from your external encoder (OBS Studio in this article).
    Note that you are now in Pre-Live status.
    Copy the Server Ingest URL on the right, we’ll use it with OBS Studio later
    obs_11.jpg

Live Events with Microsoft Stream

  1. Go to Office 365 Portal and open Stream.
    Click on Create -> Live event
    obs_07
  2. Fill meeting informations and click Save
    obs_08
  3. After the event is saved, you will see the informations to send the stream from an external encoder. In Select encoder choose Configure manually because OBS Studio is not listed (yet).
    Note also that the Live event is saved but not published. Click on Publish now to set the event public to your Company.To go in Pre-Live status click on Start setup.
    obs_12
  4. Few seconds after, the live event is ready
    obs_13
  5. Now you are in Pre-Live status.
    Copy the Server Ingest URL, we’ll use it with OBS Studio later
    obs_14

OBS Studio setup

As said before, OBS Studio is a free and open source software for video recording and live streamig, you can download it from the official site https://obsproject.com/download

First of all, there is a Portable Edition (in my utopian world every program should be Portable!), plus the program is free, plus there are many plug-in (https://obsproject.com/forum/resources/),  and last but not least it’s very stable, I’ve used it during many tests without any issue.

It’s important to understand that this article is not a guide to OBS Studio (I’ll write other article on this program in the future), I’ll give you only the basic informations to start sending video streams to Teams and Microsoft Stream.

OBS Studio first impression is a bit “hard”. This is the main windowobs_15

In this article I’ll add few sources to compose the video layout.

Desktop with PowerPoint presentation

  1. In Sources click on the + icon -> Display Captureobs_16
  2. Select Create new then inser the name of the source (for example Display 2)
    obs_17
  3. Choose the correct display where PowerPoint is open
    obs_18
  4. The new Dysplay 2 source is placed in upper-left corner.
    To crop the area hold the Alt key and drag the bounding box.
    The edges will change to green to show it’s being cropped
    obs_19
    Drag the bounding box to resizeobs_20

Video capture device(s)

  1. Now add two different cameras.
    In Sources click on the + icon -> Video Capture Device
    obs_24
  2. Select Create new then inser the name of the source (for example CAM1)obs_21
  3. In Device choose the right cameraobs_22
  4. Repeat this step to add a second camera attached to the same PC.
    In this example I have a Logitech Rally Camera connected to my laptopobs_23
  5. Place CAM1 and CAM2 where you want on the scene
    obs_34.jpg

Scrolling text

  1. To finish the scene composition, we can add some scrolling text, just to show you how powerful is OBS Studio
    In Sources click on the + icon -> Text (GDI+)
    obs_27
  2. Select Create new then inser the name of the source (for example Scrolling Text)obs_28
  3. Insert the text you want than click OK
    obs_29
  4. Select the new source, right-click on it then select Filters
    obs_30
  5. In Effect Filters click on the + icon -> Scroll
    obs_31
  6. Choose the Horizontal Speed you prefer, then click Close
    obs_32
  7. Place and resize the scrolling text object where you want
    The scene should be something like this one.
    obs_33

OBS Studio streaming

Now the final step, configure OBS Studio to send the video stream to Microsoft Teams or Microsoft Stream (the process is the same).

  1. In Controls click on Settings
    obs_36
  2. Select Stream, then Custom Streaming Server in Stream Type
    obs_37
  3. In Microsoft Teams copy the Server Ingest URL
    obs_35
    If the Live Event is created in Stream, copy the Server Ingest URL from Stream
    obs_38
  4.  Paste the Server Ingest URL in OBS Studio Settings
    Make SURE you enter something as Stream key, it’s not important what you enter, a random numer is perfect, but is MANDATORY to add something here, then click OKobs_39.jpg
  5. Click Start Streaming in Controls to start video output to Teams or Streams
    obs_40.jpg
  6. After few seconds you will start to see the video stream from OBS Studio in Microsoft Teams
    obs_41
    This is the same in Microsoft Stream (with a different Server Ingest URL)
    obs_42

That’s all. Enjoy streaming!

Other articles on OBS Studio you can find interesting:
How to use OBS Studio as an external encoder for Yammer Live Events

How to use OBS Studio as a virtual webcam source in Teams and Live Event with NDI Tools

Best Regards
Luca

43 thoughts on “How to use OBS Studio as an external encoder for Microsoft Teams and Stream Live Events

Add yours

  1. Hi,
    I’m trying to tun OBS with microsoftstream but keep on getting error “invalid path or connection url” what can be the issue?? I’ve added admin authentication to the stream settings… can it be it just takes time from when I create an even until I can access it via OBS?
    Thank you

    Like

    1. Hi Chani,
      have you created a private or public (anonymous) Live Event?
      Because you cannot use (at this moment) an External Encoder with a public Live Event.

      The RTMP link is immediate, have you entered the random Stream Key in OBS?
      Regards
      Luca

      Like

      1. Thank you so much, how do I know if it’s a private or public event? I created it while logged onto microsoftstream through create live event

        Like

      2. You choose it during the Live Event creation wizard. You need to choose Org-Wide to have External Encoder available. Please read carefully my guide above to check every step.

        Like

  2. Hey Luca,

    Thanks for detailed explanation.

    But I am getting below error when I put any random number as Stream Key.

    Can you please advise what can be the issue?

    “Could not access the specified channel or stream key, please double-check your stream key. If it is correct, there may be a problem connecting to the server.”

    Like

    1. Hi Ganesh,
      nice to be helpful. I’ve made a test with latest OBS Studio (24.0.3) and Stream Live Event without any problem. I’ve entered 12345 as Stream Key. Please double-check every steps above.
      Best. Luca

      Liked by 1 person

  3. Thank you so much! This was so helpful as I was confused as to which to put in the stream type, URL and stream key. Your post has all the answers! Thanks again!

    Liked by 1 person

  4. I have to make lessons on line using Microsoft Teams and I need to use a DSLR camera as a webcam. This is why I found this article very interesing. Unfortunately I have two setting problems. First problem. When I reach the “Informazioni per le dirette” window in OBS’ “Configurazione guidata automatica” I can’t go on because I don’t know which “servizio” to choose and overall I don’t have any “Codice delle dirette”. This means that if I don’t fix this I can’t use OBS at all. Second problem. The graphic organization of my Microsoft Teams version is different from yours so that I can’t access nor to “New live event” nor “New live event permissions” commands. Should I give up my project?

    Liked by 1 person

    1. Hi Luigi,
      about first question: which is your DSLR camera output? HDMI or USB? If you have HDMI output, you have to buy a HDMI to USB adapter, I suggest a BlackMagic Design ATEM Mini, it’s impressive and quite cheep.
      About Live Event: Teams graphics is always changing, it’s nearly impossible to stay update. But if you DO NOT HAVE some features, it’s not a graphic change, it’s a settings issue. You have to ask to your O365 Tenant Admins to allow Teams Live Events for everyone in the Teams Admins Center.
      Hope this could help. Best. Luca

      Like

  5. Hi, Luca. Thanks for your great tutorial. I tried myself to stream OBS 25.0.4 (for Mac) on Microsoft Teams on my MacBook Pro. Everything seem to work, but when I copy-paste the Server ingest URL to the OBS Settings and Start streaming, the connection doesn’t seem to work: all frames get dropped and after some timeout Teams goes “There’s a problem playing the video. Please try again later. Try again/Report an issue (Error code 0x20400005)”
    Note that OBS seems to be aware of the connection (when I Leave the event OBS gets noticed).
    Any idea?

    Liked by 1 person

    1. Hi Paolo,
      I never tested OBS on a Mac, I’m sorry. It seems a Codec issue. I do not have any other hint to give you. Let me know please. Best. Luca

      Like

      1. Hi Luca,I have the same bug inTeams as Pablo but I use OBS 25.0.8 in Windows 10
        There are some settings that the administrator can make to prevent a stream.
        OBS starts with the transmission but cannot deliver data.
        Other Ideas?

        Like

  6. Thanks for the great post Luca. I am trying to use webcam feeds from 2 presenters on a Teams Live Event so they show up side-by-side. How do I get the live webcam feeds into OBS?

    Liked by 1 person

  7. I was having problems with OBS Studio Mac (v25) and went ahead and tried v23 per your comment. Worked first time with that older version!!

    Liked by 1 person

  8. Absolutely awesome tutorial! Can I just add, I was having an issue with the video not displaying in teams (teams encoder error error code 0x20400005). The issue turned out to be that it didn’t like the video resolution from my Surface Pro. I had to set the base (canvas) to 1080 X 1920 and the FPS value at 30 and boom, it all started working.
    Thanks again for the detailed tutorial. Super work!

    Liked by 1 person

  9. Hi when I’m setting up the live event I don’t see options available for Streams could you please help ?

    Like

  10. Great tutorial, thanks! It works great for video streaming and more but I am trying to figure out how to stream video sound as well. I don’t want to stream the system sound, only the sound included in a video. Any ideas?

    Like

    1. Hi Christian, maybe you can use “Media Source” in OBS.
      OBS -> Sources -> + to add a new source -> Media Source -> choose the video file. Let me know if this will help you. Best. Luca

      Like

  11. Hi Luca, Thanks for this article. I am on Mac, and at the first attempt, just to create a new meeting, I don’t have any options that you show in your images (New Live Event). All I have is the name of the meeting, date and time, then Plan button. Is it because I have the free version of Teams? I want to know before I purchase Teams.

    Like

    1. Hi Thierry,
      To create Live Events you need an Enterprise License, like E1, E3 or E5. Live Events are not available on Business Plan or Free Plan.

      Like

  12. And with a Live event, can I still have interactions with the people connected with me?

    Like

    1. Live Event is designed to be a one-to-many communication, with a good Question&Answer tool that allow end users to send questions to the presenters and receive answers and messages.

      Like

      1. Hi Luca, I purchased an enterprise Licence (E1), having issues to connect participants:

        When I invite someone (I copied the ‘get attendee link’) they get this message (my translation from french) “Participation requires an authorization. Contact the organizer to get access to the live event”.

        How can I make people join the live event ?

        Like

      2. Hi Thierry, do you need to add someone as a Speaker into the Live Event or you just need to send the public invite to allow the end users to join the event?

        Like

      3. The latter : I just need to send the public invite to allow the end user to join the event..

        I invited myself on my Teams free account, and got the message above.

        Like

      4. To Join the Live Event as a viewer, end users just need a link and a supported Browser, nothing more. They do not need Teams to view the event.

        Like

      5. Ok, so why doesn’t it work for me ? I send the “get attendee’s link”

        Like

  13. Hi Luca, now that OBS 26 has the virtual camera option, is this still relevant ? I tried the virtual camera with ZOOM, GOOGLE Meet and it works like a charm. Unfortunately it didn’t work with TEAMS.

    Like

    1. Hi Thierry, thank you for this question. It’s still relevant because Virtual Cam feed video only, you cannot send audio to Teams in this way, so if you need to manage audio and video with OBS, you still need NDI. Anyway it’s strange you cannot use Virtual Cam with Teams, check it again, it has to work.

      Like

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Create a free website or blog at WordPress.com.

Up ↑