Skip to content

Commit db0d9c1

Browse files
committed
Improve stream stability by queueing muxers
1 parent 7bde5e1 commit db0d9c1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,9 +142,9 @@ const pipelineMachine = Machine(
142142

143143
let outStream
144144
if (outUri.startsWith('rtmp://')) {
145-
outStream = `flvmux name=mux streamable=true ! rtmpsink name=sink location="${outUri} live=1"`
145+
outStream = `flvmux name=mux streamable=true ! queue ! rtmpsink name=sink location="${outUri} live=1"`
146146
} else if (outUri.startsWith('srt://')) {
147-
outStream = `mpegtsmux name=mux ! srtsink name=sink uri=${outUri}`
147+
outStream = `mpegtsmux name=mux ! queue ! srtsink name=sink uri=${outUri}`
148148
} else {
149149
throw new Error(`Unexpected output stream protocol: ${outUri}`)
150150
}

0 commit comments

Comments
 (0)