<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">2017-12-21 16:48 GMT-02:00 Nicolas Dufresne <span dir="ltr"><<a href="mailto:nicolas@ndufresne.ca" target="_blank">nicolas@ndufresne.ca</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">Le jeudi 21 décembre 2017 à 15:35 -0200, Rodrigo Severo a écrit :<br>
> gst-launch-1.0 v4l2src device=/dev/video0 norm=45056 ! queue !<br>
> videoconvert ! videoscale ! videorate ! 'video/x-raw, width=640,<br>
> height=400, framerate=15/1, format=I420' ! x264enc ! h264parse !<br>
> stream. pulsesrc device="alsa_input.usb-<br>
> Hauppauge_Hauppauge_Device_<wbr>0013745411-01.analog-stereo" ! queue !<br>
> audioconvert ! audioresample ! 'audio/x-raw, channels=2, rate=48000'<br>
> ! lamemp3enc ! mpegaudioparse ! stream. mpegtsmux name=stream ! queue<br>
> ! filesink location=/home/rodrigo/temp/<wbr>test.mpeg<br>
><br>
> To my surprise I get several messages like:<br>
><br>
> Setting pipeline to PAUSED ...<br>
> Pipeline is live and does not need PREROLL ...<br>
> Setting pipeline to PLAYING ...<br>
> New clock: GstPulseSrcClock<br>
> Redistribute latency...<br>
> Redistribute latency...<br>
> Redistribute latency...<br>
> WARNING: from element /GstPipeline:pipeline0/<wbr>GstPulseSrc:pulsesrc0:<br>
> Can't record audio fast enough<br>
> Additional debug info:<br>
> gstaudiobasesrc.c(847): gst_audio_base_src_create ():<br>
> /GstPipeline:pipeline0/<wbr>GstPulseSrc:pulsesrc0:<br>
> Dropped 125760 samples. This is most likely because downstream can't<br>
> keep up and is consuming samples too slowly.<br>
><br>
> All messages from the warning to the "too slowly" are repeated all<br>
> the time.<br>
><br>
> My first surprise: I believe an eight core processor should be much<br>
> more than enough to do such a job without problems but apparently it<br>
> isn't.<br>
><br>
> My second surprise,: it's the _audio_ that's being too slowly<br>
> processed, not the video.<br>
><br>
> In reality I believe I'm doing something wrong. Can someone help me<br>
> find what it is?<br>
><br>
> BTW, I'm using GStreamer 1.12.3 on Ubuntu 17.10.<br>
<br>
</div></div>It's propably a buffering issue. Disable bytes size limited on your<br>
queus, maybe that will fix it. Note that x264enc in default<br>
configuration is designed of offline encoding. Just retry and<br>
tune=zerolatency you'll see a large difference.<br></blockquote><div><br></div><div>Yes, it seems to work much  better.</div><div><br></div><div><br></div><div>Thanks,</div><div><br></div><div>Rodrigo</div><div><br></div></div></div></div>