Skip to content

Commit

Permalink
Improve stream stability by queueing muxers
Browse files Browse the repository at this point in the history
  • Loading branch information
chromakode committed Jun 28, 2020
1 parent 7bde5e1 commit db0d9c1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,9 +142,9 @@ const pipelineMachine = Machine(

let outStream
if (outUri.startsWith('rtmp://')) {
outStream = `flvmux name=mux streamable=true ! rtmpsink name=sink location="${outUri} live=1"`
outStream = `flvmux name=mux streamable=true ! queue ! rtmpsink name=sink location="${outUri} live=1"`
} else if (outUri.startsWith('srt://')) {
outStream = `mpegtsmux name=mux ! srtsink name=sink uri=${outUri}`
outStream = `mpegtsmux name=mux ! queue ! srtsink name=sink uri=${outUri}`
} else {
throw new Error(`Unexpected output stream protocol: ${outUri}`)
}
Expand Down

0 comments on commit db0d9c1

Please sign in to comment.