Making a virtual credits sequence for your video calls with OBS and CodePen
Tags: codepen, obs, html, css
Published: 2021-02-23 18:23:42

---
title: Making a virtual credits sequence for your video calls with OBS and CodePen
published: true
description: Using HTML, CSS, and OBS, make your calls a little more fun with a virtual credits sequence!
tags: codepen, obs, html, css
cover_image: https://images.unsplash.com/photo-1489599849927-2ee91cede3ba
---

I saw Scott Hanselman make this tweet the other day about adding credits at the end of meetings:

{% twitter 1357036562077241344 %}

I love this idea and decided to make one myself!

## The Code

First, I went over to CodePen and threw together an array of text to scroll. I used [a list of blog posts](https://hubs.ly/H0H4RDm0) that I've written on the Netlify Blog.

```js
let posts = [
  "An Incredibly Serious Discussion about Next.js at Reactathon",
  "Enabling AMP in your Next.js projects",
  "Adding Babel presets and plugins in Next.js",
  "React Children: The misunderstood prop",
  "Query an API at both build time and runtime with Next.js",
  "How to turn off telemetry in Next.js",
  "Add Web Monetization to your sites with Snippet Injection",
  "Logging in Next.js",
  ...
]
```

From there, I made a small function to add each of these into a `<div>`, which I add into an existing `container` on my page.

```js
(() => {
  posts.map((p) => {
    document.querySelector('.container').innerHTML += `<div>${p}</div>`
  })
})()
```

In the CSS, I made the background `limegreen` and did some animations to scroll it. I also added a custom font and stuff, this part you can just do to your heart's desire.

Here's the final Pen for you to try out:

{% codepen https://codepen.io/cassidoo/pen/MWbOYeO %}

Feel free to fork this if you'd like to customize it!

## OBS

[OBS (Open Broadcaster Software)](https://obsproject.com) is a free program that works across operating systems that we can use for making a "virtual camera". 

Download OBS, and make a new Scene. There's a Scenes panel in the bottom right of the app:

![Add a Scene](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/s9nddfa4pi4w9wx7fv9l.png)
 
Click the `+` sign in the bottom left corner of and name it whatever you'd like. As you can see, I named mine "Scene", because I am not clever.

In the panel next to Scenes, there's a Sources panel. We're going to add two Sources to our Scene by clicking that `+` sign again.

First, add a Video Capture Device, and choose your webcam. 

![Choose a camera](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kflbkyw66o41sejg02bl.png)
 
Then, add a Browser, and put in your CodePen's URL. I personally used my Pen in Live View, but you can also use Full Page View.

![Adding a Pen](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/x7a1sirzmfkbacri7qox.png)
 
Yours will probably still have the green background. Let's remove that! In the Sources panel, right click on your Browser and click "Filters".

Under Effect Filters, click the `+` and add a Color Key filter. Make the Key Color Type Green, and adjust the levels until all of the green is transparent on your Pen in the preview, like so:

![Color key selector](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3383kriu7jbv1evrlov2.png)

Close this window when you're happy with it, and now it's time for the final adjustments.

Inside of the main preview window in OBS, you can drag around your camera and text until you're happy with it. For example, I made my browser slightly wider than the preview itself, so that the scrollbar wouldn't appear in the frame.

![Preview window](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mzud8pgwr0gyblzsbnuq.png)
 

And you're done! Click "Start Virtual Camera" on the bottom right so that you can use it in other applications:

![Virtual Camera button](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ea3qz24skchz1mm80yga.png)

## Use it!

Now whenever you're in a Zoom, a Google Meet, a conference, livestreaming, or anything else, you can choose this virtual camera that you've made instead of your normal webcam!

![Cassidy dancing with credits](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2heb66lssdcktd7qbbx7.gif)

You can do more than just a credits sequence, too. You could add diagrams, fun popups, animations, and moooore. Go forth and create!