# discord-obs-stream

> Stream OBS output to Discord.

Latest version **0.0.2** (published 2023-06-23) · GPL-3.0-or-later license · 0 weekly downloads

## Install

```sh
npm install discord-obs-stream
pnpm add discord-obs-stream
yarn add discord-obs-stream
bun add discord-obs-stream
```

Provides the command `discord-obs-stream`.

## Health

**Score 30/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.2 |
| Published | 2023-06-23 |
| First published | 2023-06-23 |
| Weekly downloads | 0 |
| License | GPL-3.0-or-later |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 4 |
| Unpacked size | 41.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | NorthWestWind |
| Maintainers | northwestwind |
| Keywords | discord, obs-studio, stream |

## Links

- npm: https://www.npmjs.com/package/discord-obs-stream
- Repository: https://github.com/North-West-Wind/discord-obs-stream
- Homepage: https://github.com/North-West-Wind/discord-obs-stream#readme
- Issues: https://github.com/North-West-Wind/discord-obs-stream/issues
- npm.io page: https://npm.io/package/discord-obs-stream

## Dependencies (4)

- [inquirer](https://npm.io/package/inquirer.md) ^9.2.7
- [env-paths](https://npm.io/package/env-paths.md) ^3.0.0
- [discord-stream-client](https://npm.io/package/discord-stream-client.md) ^1.0.4
- [discord.js-selfbot-v13](https://npm.io/package/discord.js-selfbot-v13.md) ^2.14.5

## Alternatives

- [byte-size](https://npm.io/package/byte-size.md) — 2.1M weekly downloads
- [speed-limiter](https://npm.io/package/speed-limiter.md) — 16.0K weekly downloads
- [@powersync/node](https://npm.io/package/@powersync/node.md) — 10.9K weekly downloads
- [@ledgerhq/coin-cardano](https://npm.io/package/@ledgerhq/coin-cardano.md) — 1.0K weekly downloads
- [@jayesol/jayeson.lib.streamfinder](https://npm.io/package/@jayesol/jayeson.lib.streamfinder.md) — 1.0K weekly downloads

## Recent versions

- 0.0.2 (latest) — 2023-06-23
- 0.0.1 — 2023-06-23

## README

# Discord OBS Stream
Stream OBS output to Discord. Works on all platforms.

# Installation
## Requirements
- [FFmpeg](https://ffmpeg.org)
- [Node.js](https://nodejs.org)
- [OBS Studio](https://obsproject.com) (or any recording software that can output with FFmpeg)

## Download
You download this program using an `npm` command:
```
npm i -g discord-obs-stream
```

# Configuration
## Getting Token
You will need to obtain the token of a Discord account. I recommend doing this on an alt account. PLEASE KEEP YOUR TOKEN SECURE, as having the token basically means you're logged in as that user. If you leak it accidentally, reset your password.

[Here](https://github.com/aiko-chan-ai/discord.js-selfbot-v13#get-token-) are the codes to automatically grab it for you.

## Setting Token and User
Running the program will tell you where the config file is located. This file contains 2 configuration fields:
- `token`: The token you obtained from above
- `user`: The user ID of your main account
- `url` (optional): Don't touch if you are not sure what it does. Default: `udp://@:1234?overrun_nonfatal=1&fifo_size=50000000`
- `bitrate` (optional): Bitrate of video. Default: `2500`
- `fps` (optional): FPS of video. Default: `30`

## OBS Studio
You will need to modify OBS recording settings for this to work. I recommend creating a new profile for it.
1. Go to Settings -> Output -> Recording.
2. Change `Type` to `Custom Output (FFmpeg)`.
3. Set `FFmpeg Output Type` to `Output to URL`.
4. Input `udp://127.0.0.1:1234` to `File path or URL`.
5. Change `Container Format` to `mpegts`.
6. Click `Apply`.

# Running
Run `discord-obs-stream` in a console. If success, it will output `Logged in as ${alt account}`.

Before you start streaming on Discord, you need to click `Start Recording` in OBS Studio.

## Commands
- `on`: Start streaming
- `off`: Stop streaming
- `reload`: Reload config
- `stop`: Exit the program

---
_Source: https://npm.io/package/discord-obs-stream · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
