Such an easy question

James jam at tigger.ws
Sun Aug 15 06:41:55 UTC 2021


Utter frustration:

I have a script

#! /bin/bash

GST_DEBUG_DUMP_DOT_DIR=/home/jam/DOT gst-launch-1.0 $@ v4l2src device=/dev/video2 ! \
	video/x-h264,width=1920,height=1080,framerate=30/1 ! \
	h264parse ! \
	tee name=t \
	t. ! queue ! avdec_h264 ! xvimagesink sync=false \
	t. ! queue ! avdec_h264 ! xvimagesink sync=true \
	t. !  queue max-size-buffers=0 max-size-bytes=0 max-size-time=1000000000 ! \
	mux. pulsesrc device=0 ! \
	queue ! \
	audioconvert ! \
	audioresample ! audio/x-raw, rate=16000 ! \
	queue ! \
	avenc_aac ! \
	queue ! \
	mux. mp4mux name=mux ! \
	filesink location=try9.mp4

and a C version that behaves pretty much identically.

Running the script on its own I have never seen it fail.
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.
If it fails, it always fails until reboot.

htop shows cpu usage of 10..30% 5..6G ram as cache and 0 swap being used.
gnome-system-monitor shows no spikes in cpu usage.
In desperation I swapped my 2 core i3 for a 4 core i7. Behaviour was the same.

At other times it works for hours, many times in a row.

What measurements might I make that may lead me to the problem.

Needless to say if I leave the tee multiplex (and hence pulsesrc) out of the pipline then it never fails.
I've tried mp4mux, qtmux and (by accident) mpegtsmux without any change being visible. I tried matuska but that fails everytime.

James









More information about the gstreamer-devel mailing list