Skip to content

Instantly share code, notes, and snippets.

@LeonDevLifeLog
Created August 24, 2019 15:34
Show Gist options
  • Save LeonDevLifeLog/df82e6bb3e1b6086305215ca5c12a8ef to your computer and use it in GitHub Desktop.
Save LeonDevLifeLog/df82e6bb3e1b6086305215ca5c12a8ef to your computer and use it in GitHub Desktop.
youtube rtmp proxy
#!/bin/bash
apt-get update
apt-get install apt-transport-https ca-certificates curl gnupg-agent software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io
docker pull tiangolo/nginx-rtmp
docker run -d -p 1935:1935 --name nginx-rtmp tiangolo/nginx-rtmp
docker cp nginx.conf nginx-rtmp:/etc/nginx/nginx.conf
docker restart nginx-rtmp
worker_processes auto;
rtmp_auto_push on;
events {}
rtmp {
server {
listen 1935;
listen [::]:1935 ipv6only=on;
application live {
live on;
record off;
push rtmp://a.rtmp.youtube.com/live2;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment