<div dir="ltr"><div>Hi</div><div><br></div><div>The pipeline I tested works. Can you try this "mp4mux", or the "mpegtsmux" must be used?</div><div>My webcam outputs raw video so need to be encoded first. </div><div>You need to change the "device" value for your video and audio devices. For audio, the device info can be found with command "arecord -l"<br></div><div>Note: I added "<b>queue leaky=downstream</b>" to get rid of the warnings.<br></div><div><br></div><div><i>gst-launch-1.0 -e -v v4l2src device=/dev/video0 ! queue ! videoconvert ! x264enc tune=zerolatency  ! h264parse ! queue ! mux. alsasrc device=hw:0,0 provide-clock=false ! queue leaky=downstream ! audioconvert ! avenc_aac ! queue ! mux. mp4mux name=mux ! queue ! filesink location='output.mp4'</i></div><div><br></div><div>GST version: 1.18.4 (but I am sure it works for early version)</div><div>OS: Ubuntu 18.04</div><div><br></div><div>Good luck.</div><div><br></div><div>Yu<br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, 3 Aug 2021 at 07:56, James Linder via gstreamer-devel <<a href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.freedesktop.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">> It must be my own naivet. Building from src, debugging led to the simple answer that works. Thanks specially to Nirbheek.<br>
> <br>
> gst-launch-1.0 $@ v4l2src device=/dev/video2 ! queue ! video/x-h264,width=1920,height=1080,framerate=30/1 ! h264parse ! queue max-size-buffers=0 max-size-bytes=0 max-size-time=1000000000 ! mux. pulsesrc device=0 ! audioconvert ! \<br>
> <br>
> audioresample ! audio/x-raw, rate=16000 \<br>
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^<br>
> <br>
> ! queue ! avenc_aac ! queue ! mux. mpegtsmux name=mux ! filesink location='output.mp4'<br>
<br>
I have a a 1:25min file recorded from above! yet today I can record only 25 sec before ‘underflow’<br>
<br>
I went spelunking<br>
<br>
————————————— on gst-launch -e -m <br>
[busy recording]<br>
time passes<br>
<br>
<br>
<br>
Got message #189 from element "pulsesrc0" (warning): GstMessageWarning, gerror=(GError)NULL, debug=(string)"gstaudiobasesrc.c\(845\):\ gst_audio_base_src_create\ \(\):\ /GstPipeline:pipeline0/GstPulseSrc:pulsesrc0:\012Dropped\ 3200\ samples.\ This\ is\ most\ likely\ because\ downstream\ can\'t\ keep\ up\ and\ is\ consuming\ samples\ too\ slowly.";<br>
WARNING: from element /GstPipeline:pipeline0/GstPulseSrc:pulsesrc0: Can't record audio fast enough<br>
Additional debug info:<br>
gstaudiobasesrc.c(845): gst_audio_base_src_create (): /GstPipeline:pipeline0/GstPulseSrc:pulsesrc0:<br>
—————————————————<br>
<br>
<br>
so why, with no messages in does pulsesrc suddenly decide ‘underflow’?<br>
and why a working pipeline suddenly goes tilt?<br>
<br>
James</blockquote></div>