<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <pre>I noticed in gstreamer 1.18 there is a patch which has ported mp4mux to GstAggregator
<a class="moz-txt-link-freetext" href="https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/commit/e2462005fbac72bd49c4158e9476c5f76919f887">https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/commit/e2462005fbac72bd49c4158e9476c5f76919f887</a>

I retested the below pipeline example with 1.18.2, but noticed that it still does not work, and the video output blocks after a
few frames of video. I am using async=false everywhere, so hoped that this would work now.

Does anyone have any other suggestions on how to make this work with optional inputs?

thanks,
Wayne

On Sun Aug 25 2019, Nicolas Dufresne wrote: 
>Le jeudi 15 août 2019 à 13:15 -0700, Wayne Piekarski a écrit :
>><i> Hi everyone,
</i>>><i> 
</i>>><i> I have a use case where I'm recording a V4L H264 camera along with a UDP 
</i>>><i> audio stream into an mp4mux file, and also displaying the video to the 
</i>>><i> screen.
</i>>><i> 
</i>>><i> gst-launch-1.0 -v \
</i>>><i> mp4mux name=combo fragment-duration=1000 ! fakesink async=false \
</i>>><i> \
</i>>><i> v4l2src 
</i>>><i> device=/dev/v4l/by-path/pci-0000:00:14.0-usb-0:2:1.0-video-index1 
</i>>><i> do-timestamp=false ! video/x-h264, width=320, height=240, framerate=15/1 
</i>>><i> ! h264parse ! tee name=tv0 ! queue ! h264parse ! avdec_h264 ! 
</i>>><i> videoconvert ! autovideosink    tv0. ! queue ! combo.video_0 \
</i>>><i> \
</i>>><i> udpsrc port=5701 do-timestamp=false ! application/x-rtp, 
</i>>><i> clock-rate=44100, config=40002410adca00 ! rtpmp4adepay ! aacparse ! 
</i>>><i> queue ! combo.audio_1
</i>>><i> 
</i>>><i> This works fine if there are UDP packets coming in. However, if the UDP 
</i>>><i> source has not sent any packets, then the video stops displaying on the 
</i>>><i> screen after about 50 frames of working fine.
</i>>><i> 
</i>>><i> However, if you send just one valid RTP packet to the port, then 
</i>>><i> everything starts working, and stays working, even though no new UDP 
</i>>><i> packets are arriving.
</i>>><i> 
</i>>><i> Is there anyway to tell the pipeline to not block like this? I tried 
</i>>><i> putting async=false everywhere as recommended to me in 
</i>>><i> <a href="https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/issues/628">https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/issues/628</a> but 
</i>>><i> that is not working in this new scenario. I've tested this on the latest 
</i>><i>> gstreamer 1.16.0.
</i>>
>Muxers using GstCollectPad facility have this issue. This could be
>resolved by porting the respective muxer to GstAggregator base class.
><i>From my knowlege, flvmux has been ported.</i>
</pre>
  </body>
</html>