<html><head><meta http-equiv="Content-Type" content="text/html; charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><br style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: Helvetica; font-size: 24px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><br class=""><blockquote type="cite" class=""><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;" class="">Utter frustration:<br class=""><br class="">I have a script<br class=""><br class="">#! /bin/bash<br class=""><br class="">GST_DEBUG_DUMP_DOT_DIR=/home/jam/DOT gst-launch-1.0 $@ v4l2src device=/dev/video2 ! \<br class=""><span class="Apple-tab-span" style="white-space: pre;">  </span>video/x-h264,width=1920,height=1080,framerate=30/1 ! \<br class=""><span class="Apple-tab-span" style="white-space: pre;">       </span>h264parse ! \<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>tee name=t \<br class=""><span class="Apple-tab-span" style="white-space: pre;"> </span>t. ! queue ! avdec_h264 ! xvimagesink sync=false \<br class=""><span class="Apple-tab-span" style="white-space: pre;">   </span>t. ! queue ! avdec_h264 ! xvimagesink sync=true \<br class=""><span class="Apple-tab-span" style="white-space: pre;">    </span>t. !  queue max-size-buffers=0 max-size-bytes=0 max-size-time=1000000000 ! \<br class=""><span class="Apple-tab-span" style="white-space: pre;">    </span>mux. pulsesrc device=0 ! \<br class=""><span class="Apple-tab-span" style="white-space: pre;">   </span>queue ! \<br class=""><span class="Apple-tab-span" style="white-space: pre;">    </span>audioconvert ! \<br class=""><span class="Apple-tab-span" style="white-space: pre;">     </span>audioresample ! audio/x-raw, rate=16000 ! \<br class=""><span class="Apple-tab-span" style="white-space: pre;">  </span>queue ! \<br class=""><span class="Apple-tab-span" style="white-space: pre;">    </span>avenc_aac ! \<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>queue ! \<br class=""><span class="Apple-tab-span" style="white-space: pre;">    </span>mux. mp4mux name=mux ! \<br class=""><span class="Apple-tab-span" style="white-space: pre;">     </span>filesink location=try9.mp4<br class=""><br class="">and a C version that behaves pretty much identically.<br class=""><br class="">Running the script on its own I have never seen it fail.<br class="">My app is a QT5 gui. Running my app AND the script OR the compiled version by QProcess sometimes fails with the dreaded pulsesrc underflow, downstream consuming too slowly message.<br class="">If it fails, it always fails until reboot.<br class=""><br class="">htop shows cpu usage of 10..30% 5..6G ram as cache and 0 swap being used.<br class="">gnome-system-monitor shows no spikes in cpu usage.<br class="">In desperation I swapped my 2 core i3 for a 4 core i7. Behaviour was the same.<br class=""><br class="">At other times it works for hours, many times in a row.<br class=""><br class="">What measurements might I make that may lead me to the problem.<br class=""><br class="">Needless to say if I leave the tee multiplex (and hence pulsesrc) out of the pipline then it never fails.<br class="">I've tried mp4mux, qtmux and (by accident) mpegtsmux without any change being visible. I tried matuska but that fails everytime.</blockquote><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;" class=""></blockquote><br class=""><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;" class=""></blockquote>This gets more outlandish:<br class=""><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;" class=""></blockquote>App->record: error after 25sec<br class=""><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;" class=""></blockquote>App->quit<br class=""><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;" class=""></blockquote>Script->record: all ok<br class=""><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;" class=""></blockquote>App->start<br class=""><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;" class=""></blockquote>Script stop<br class=""><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;" class=""></blockquote>App->record: all ok<br class=""><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;" class=""></blockquote>Repeatable, tried lots of times !!!<br class=""><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;" class=""></blockquote>Note<br class=""><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;" class=""></blockquote>App->record: error<br class=""><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;" class=""></blockquote>App->idle<br class=""><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;" class=""></blockquote>Script->record: error every time.<br class=""><span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: Helvetica; font-size: 24px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none; display: inline !important; float: none;" class="">cpu usage never goes over 40%</span><br class=""></blockquote><br class=""><div class="">On the chance someone recognises detail I post. This is playing a *bad* file:</div><div class=""><br class=""></div><div class=""><div class="">VLC error list</div><div class=""><br class=""></div><div class="">[00007fd5accd5840] main decoder error: Could not convert timestamp 2456057878 for FFmpeg</div><div class="">[00007fd5accd5840] main decoder error: Timestamp conversion failed (delay 1000000, buffering 100000, bound 9000000)</div><div class="">[00007fd5accd5840] main decoder error: Could not convert timestamp 2456093211 for FFmpeg</div><div class=""><br class=""></div><div class="">MPlayer error list</div><div class=""><br class=""></div><div class="">libavformat file format detected.</div><div class="">[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fa17f53b7a0]Protocol name not provided, cannot determine if input is local or a network protocol, buffers and access patterns cannot be configured optimally without knowing the protocol</div><div class="">[lavf] stream 0: video (h264), -vid 0</div><div class="">==========================================================================</div><div class="">AO: [pulse] 16000Hz 2ch floatle (4 bytes per sample)</div><div class="">Starting playback...</div><div class="">Movie-Aspect is 1.78:1 - prescaling to correct movie aspect.</div><div class=""><br class=""></div><div class="">Possibly bad interleaving detected.</div><div class="">Use -ni option if this causes playback issues and avoid or fix the program that created the file.</div><div class="">A: 153.6 V: 163.6 A-V: -9.965 ct: -0.587   0/  0 53%  1%  0.2% 0 0</div><div class=""><br class=""></div></div><div class="">Still trying to find out what happens when the system is in *bad* mode vs *good* mode</div><div class="">James</div></body></html>