rpi-camera-youtube-streamer

Raspberry Pi Camera: Youtube Streamer

Stars
9
Committers
1

Raspberry Pi Camera: Youtube Streamer

0. What is this?

It's a go application for streaming video through Youtube Live Stream, using raspivid and ffmpeg on Raspberry Pi.

1. What do I need before running it?

You need:

2. How can I configure it?

You need to create your own config file.

Sample file is included, so feel free to copy it and change values as you want.

$ cp config.json.sample config.json
$ vi config.json

At least you have to change the youtube_stream_key value for running it.

You can get your key in your Live Stream Dashboard, which is labeled as 'Stream name/key'.

3. How can I build it?

A. Manually,

$ git clone https://github.com/meinside/rpi-camera-youtube-streamer.git
$ cd rpi-camera-youtube-streamer
$ go build

B. Or with docker-compose

a. Raspberry Pi 3B, 3B+, 4

$ docker-compose build

b. Raspberry Pi 2

$ docker-compose build --build-arg RPI=raspberry-pi2

c. Raspberry Pi B / Zero

$ docker-compose build --build-arg RPI=raspberry-pi

4. How can I run it?

A. Manually,

Just execute the binary:

$ ./rpi-cameera-youtube-streamer

If nothing goes wrong, you'll see your live streaming in your dashboard in several seconds.

B. Or with docker-compose

$ docker-compose up

5. How can I run it as a service?

A. With systemd

$ sudo cp systemd/rpi-camera-youtube-streamer.service /lib/systemd/system/
$ sudo vi /lib/systemd/system/rpi-camera-youtube-streamer.service

and edit User, Group, WorkingDirectory, and ExecStart values.

You can simply start/stop it with:

$ sudo systemctl start rpi-camera-youtube-streamer.service
$ sudo systemctl stop rpi-camera-youtube-streamer.service

If you want to launch it automatically on boot:

$ sudo systemctl enable rpi-camera-youtube-streamer.service

B. Or with docker-compose

$ docker-compose up -d

998. Any trouble?

Please open an issue.

999. License?

MIT

Package Rankings
Top 8.17% on Proxy.golang.org
Related Projects