Created
August 24, 2019 15:34
-
-
Save LeonDevLifeLog/df82e6bb3e1b6086305215ca5c12a8ef to your computer and use it in GitHub Desktop.
youtube rtmp proxy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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