Skip to content

Latest commit

 

History

History
76 lines (59 loc) · 1.88 KB

README.md

File metadata and controls

76 lines (59 loc) · 1.88 KB

This project is inspired and based on the alexellis/raspberrypi-youtube-streaming code and docker image.

The app was tested against Raspberry Pi A and Raspberry Pi 2

  • Get Raspberry PI

  • Install Jessie image and configure it so that it can connect to the internet

  • Update firmware (rpi-update) and software (apt-get update && at-get upgrade)

  • Make sure camera module is enabled (raspi-config)

  • Get your stream secret key (STREAM_YOUTUBE_SECRET) from https://www.youtube.com/live_dashboard

  • Install docker

$ curl -sSL get.docker.com | sh
$ sudo usermod pi -aG docker
$ reboot
  • Clone this repository
$ git clone https://github.com/ChieftainY2k/raspberrypi-video-streamer 
  • Goto repo directory
$ cd raspberrypi-video-streamer
  • Build docker image for the "camera" container
$ docker build -t streamer ./docker 
  • Initiate and run streamer container (replace xxxxxxx with your secret key)
$ docker run --detach --restart unless-stopped --privileged -e STREAM_YOUTUBE_SECRET="xxxxxxxxxxxxxxxx" -e STREAM_BITRATE=500000 -e STREAM_FPS=30 -e STREAM_WIDTH=800 -e STREAM_HEIGHT=600 --name camera streamer

Note: stream container will restart automatically on reboot or failure unless you stop it with the "docker stop" command.

$ docker stop camera  
  • Start the stopped streamer container
$ docker start camera
  • Attach to container console
$ docker attach camera
  • Kill stream process and remove container
$ docker rm -f camera
  • Show container logs
$ docker logs camera
  • (optional) Install python PIP
$sudo apt-get install python3-pip
  • (optional) Install docker-compose
$ sudo pip3 install docker-compose