isomp4mux can stall pipeline waiting for video
When using isofmp4mux
, we observe pipeline stalls in certain scenarios.
We have audio & video path, feeding a video and audio tee. These tees then feed the two bins downstream. One bin has queue
+ flvmux
+ rtmp2sink
. Other has queue
+ fmp4mux
+ awss3sink
. flvmux
latency is set to 100ms. Fragment duration is set at 2 seconds and queue sizes have max-size-time=5s
. (See attached images for details).
Either of the two bins might be attached dynamically at runtime depending on user request for streaming or recording. We observe a stall where the RTMP stream completely freezes just after attaching the recording bin. A section of the dot graph, captured just around the time of freeze is attached. The problem seems to go away if queue sizes are increased with max-size-time=15s
. However, if chunk-duration
is set, the problem is even more easily reproducible every time even with max-size-time=15s
. This goes away if we set max-size-time/buffers/bytes=0
.
Occasionally we also see Don't have a complete GOP for the first stream on timeout in a live pipeline
messages from the video sink pad of isofmp4mux
. From the dot graphs, it would seem that isofmp4mux
might stall waiting for video keyframe?.
If it helps, upstream to the video tee, we have x264enc
, capsfilter
and h264parse
. For x264enc
, we set bitrate=5000
, key-int-max=60
, speed-preset=veryfast
and tune=zerolatency
.