Take control over your live stream video by running it yourself. Streaming + chat out of the box.
HTML activitypubbroadcastingchatdecentralizedfederationfediversegolanghacktoberfesthlslivelivestreamowncastrtmpself-hostedstreaming-videovideo
Allow unique streampipe fifos. Closes #883
Gabe Kangas53c883b213f6
diff --git a/core/rtmp/rtmp.go b/core/rtmp/rtmp.goindex aaba031ee5..7fa8e35a21 100644--- a/core/rtmp/rtmp.go+++ b/core/rtmp/rtmp.go@@ -89,7 +89,7 @@ func HandleConn(c *rtmp.Conn, nc net.Conn) {log.Infoln("Inbound stream connected.")_setStreamAsConnected()- pipePath := utils.GetTemporaryPipePath()+ pipePath := utils.GetTemporaryPipePath(fmt.Sprint(data.GetRTMPPortNumber()))if !utils.DoesFileExists(pipePath) {err := syscall.Mkfifo(pipePath, 0666)if err != nil {diff --git a/core/transcoder/transcoder.go b/core/transcoder/transcoder.goindex d10f4d0004..57cc457d9a 100644--- a/core/transcoder/transcoder.go+++ b/core/transcoder/transcoder.go@@ -216,7 +216,7 @@ func NewTranscoder() *Transcoder {// Playlists are available via the local HTTP servertranscoder.playlistOutputPath = config.PublicHLSStoragePath- transcoder.input = utils.GetTemporaryPipePath()+ transcoder.input = utils.GetTemporaryPipePath(fmt.Sprint(data.GetRTMPPortNumber()))for index, quality := range transcoder.currentStreamOutputSettings {variant := getVariantFromConfigQuality(quality, index)diff --git a/utils/utils.go b/utils/utils.goindex ef70cb8cfb..45ed69f0e6 100644--- a/utils/utils.go+++ b/utils/utils.go@@ -21,8 +21,8 @@ import ()// GetTemporaryPipePath gets the temporary path for the streampipe.flv file.-func GetTemporaryPipePath() string {- return filepath.Join(os.TempDir(), "streampipe.flv")+func GetTemporaryPipePath(identifier string) string {+ return filepath.Join(os.TempDir(), "streampipe."+identifier)}// DoesFileExists checks if the file exists.