Created
November 1, 2024 11:05
-
-
Save LucasPlacentino/231ada4a22dfb28469b080b236da8574 to your computer and use it in GitHub Desktop.
multiple rtmp stream nginx-rtmp (youtube and twitch)
This file contains hidden or 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 {} | |
error_log /dev/stdout info; | |
#daemon off; | |
rtmp { | |
server { | |
listen 1935; # 1935 is the rtmp port | |
listen [::]:1935; # ipv6 | |
chunk_size 4096; # 4096 or 8192 ? | |
meta copy; | |
allow publish 127.0.0.1; # allow only localhost to stream to here (ipv4) | |
allow publish ::1; # allow only localhost to stream to here (ipv6) | |
deny publish all; # deny all other | |
application stream { # stream from OBS to rtmp://localhost/stream | |
live on; | |
record off; | |
# Youtube : | |
push rtmp://a.rtmp.youtube.com/live2/{YT_STREM_KEY}; | |
# Twitch : | |
push rtmp://{TWITCH_RTMP_STREAM_URL}/{TWITCH_STREAM_KEY}; | |
# live.twitch.tv/app/ or see https://help.twitch.tv/s/twitch-ingest-recommendation | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment