diff --git a/main.go b/main.go index 3a51fcd87..267cb21d7 100644 --- a/main.go +++ b/main.go @@ -42,6 +42,7 @@ func main() { restoreDatabaseFile := flag.String("restoreDatabase", "", "Restore an Owncast database backup") newStreamKey := flag.String("streamkey", "", "Set your stream key/admin password") webServerPortOverride := flag.String("webserverport", "", "Force the web server to listen on a specific port") + rtmpPortOverride := flag.Int("rtmpport", 0, "Set listen port for the RTMP server") flag.Parse() @@ -124,6 +125,12 @@ func main() { config.WebServerPort = data.GetHTTPPortNumber() + // Set the rtmp server port + if *rtmpPortOverride > 0 { + log.Println("Saving new RTMP server port number to", *rtmpPortOverride) + data.SetRTMPPortNumber(float64(*rtmpPortOverride)) + } + // starts the core if err := core.Start(); err != nil { log.Fatalln("failed to start the core package", err)