Such an easy question

Yu You youyu.youyu at gmail.com
Tue Aug 3 10:26:21 UTC 2021


Hi

The pipeline I tested works. Can you try this "mp4mux", or the "mpegtsmux"
must be used?
My webcam outputs raw video so need to be encoded first.
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"
Note: I added "*queue leaky=downstream*" to get rid of the warnings.

*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'*

GST version: 1.18.4 (but I am sure it works for early version)
OS: Ubuntu 18.04

Good luck.

Yu


On Tue, 3 Aug 2021 at 07:56, James Linder via gstreamer-devel <
gstreamer-devel at lists.freedesktop.org> wrote:

> > It must be my own naivet. Building from src, debugging led to the simple
> answer that works. Thanks specially to Nirbheek.
> >
> > 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 ! \
> >
> > audioresample ! audio/x-raw, rate=16000 \
> > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> >
> > ! queue ! avenc_aac ! queue ! mux. mpegtsmux name=mux ! filesink
> location='output.mp4'
>
> I have a a 1:25min file recorded from above! yet today I can record only
> 25 sec before ‘underflow’
>
> I went spelunking
>
> ————————————— on gst-launch -e -m
> [busy recording]
> time passes
>
>
>
> 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.";
> WARNING: from element /GstPipeline:pipeline0/GstPulseSrc:pulsesrc0: Can't
> record audio fast enough
> Additional debug info:
> gstaudiobasesrc.c(845): gst_audio_base_src_create ():
> /GstPipeline:pipeline0/GstPulseSrc:pulsesrc0:
> —————————————————
>
>
> so why, with no messages in does pulsesrc suddenly decide ‘underflow’?
> and why a working pipeline suddenly goes tilt?
>
> James
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20210803/18ab9f31/attachment.htm>


More information about the gstreamer-devel mailing list