I have a pipeline which I see fail intermittently on startup due to a toilet overflow of a realtimer element. The downstream element of the realtimer is a rtmp sink.
In my pipeline I have specified the toilet capacity with via_in
to the realtimer as shown in the docs:
# shortened for brevity
|> child(:h264_encoder, %Membrane.H264.FFmpeg.Encoder{preset: :ultrafast})
|> child(:h264_parser, %Membrane.H264.FFmpeg.Parser{
framerate: {30, 1},
alignment: :au,
attach_nalus?: true,
skip_until_keyframe?: false
})
|> child(:video_payloader, Membrane.MP4.Payloader.H264)
|> via_in(:input, toilet_capacity: 500)
|> child(:video_realtimer, Membrane.Realtimer)
|> via_in(:video)
|> get_child(:rtmp_sink),
################################################################
# shortened for brevity
|> child(:aac_encoder, Membrane.AAC.FDK.Encoder)
|> child(:aac_parser, %Membrane.AAC.Parser{
in_encapsulation: :ADTS,
out_encapsulation: :ADTS
})
|> via_in(:input, toilet_capacity: 500)
|> child(:audio_realtimer, Membrane.Realtimer)
|> via_in(:audio)
|> get_child(:rtmp_sink)
However, I see the reported toilet size as 200 instead of the specified value when the pipeline. crashes:
10:58:09.755 [error] <0.591.0>/:audio_realtimer/ Toilet overflow.
Reached the size of 201, which is above toilet capacity (200)
when storing data from output working in push mode. It means that some element in the pipeline
processes the stream too slow or doesn't process it at all.
To have control over amount of buffers being produced, consider using output in pull mode
(see `Membrane.Pad.mode_t`).
You can also try changing the `toilet_capacity` in `Membrane.ChildrenSpec.via_in/3`.
Any thoughts on why the config isn't bubbling down to the realtimer?