Easily broadcast any number of RTSP streams to YouTube's livestream service.
-
Install this package using NPM:
npm i youtube-rtsp
-
Install FFMPEG on your system. For Ubuntu 16.04, follow these instructions.
-
Create a "client_secret.json" file from the Google Developer Console.
- Using Google's Developer Console, generate a new OAuth2 credential.
- Enable YouTube Data API for the credential you just made.
- Download the "client_secret.json" file to the youtube-rtsp directory.
- Further instructions are located here.
-
Open "local.json" and change the settings to match your needs.
- Change the "rtsp:" setting to the RTSP URL of your stream.
- If using a Ubiquiti camera with UniFi Video:
- Go to "Cameras."
- Click the camera you wish to broadcast.
- Click "RTSP Service" in the popout.
- Choose a resolution and copy the RTSP url after enabling the service.
-
Run with 'npm start' or 'node index.js.'
-
Upon the first run of the program, you will be asked to go to a Google webpage in order to link your account with the program. Choose the Google account that you want to manage the livestream.