stuttering

James jam at tigger.ws
Fri Jan 21 06:48:14 UTC 2022


Hi
I'm making progress and wonder if someone can guide me:

I have a (coded in C, but looks like this) pipeline 

#! /bin/bash

IP=192.168.5.150

gst-launch-1.0 -e -v v4l2src device=/dev/video2 ! \
	video/x-h264,width=1920,height=1080,framerate=30/1 ! \
	tee name=vt \
	at. ! queue ! avenc_aac ! hl.audio \
	vt. ! h264parse ! queue ! avdec_h264 ! xvimagesink \
	vt. ! h264parse ! queue ! avdec_h264 ! xvimagesink \
	vt. ! avdec_h264 ! x264enc tune=zerolatency bitrate=1000 ! \
	h264parse ! hlssink2 max-files=15 name=hl \
	playlist-root=http://$IP playlist-location=/dev/shm/ch1.m3u8 location=/dev/shm/ch1_%05d.ts \
	vt. ! h264parse ! queue max-size-buffers=0 max-size-bytes=0 max-size-time=1000000000 ! \
	mux. \
	pulsesrc device=0 ! queue ! audioconvert ! \
	tee name=at \
	at. ! audioresample ! audio/x-raw, rate=48000 ! \
	queue ! avenc_aac ! queue ! \
	mux. mp4mux name=mux ! \
	filesink location=try6.mp4

If I set the camera bitrate to 3Mb/s then everything is good. Files have no dropped frames.
If I set the camera bitrate to 10 Mb/s then playback stutters and frames are dropped.
I each case htop shows cpu usage around 50% on a 4core intel i7.
nmon shows nothing glaringly wrong.

Logic says 'turn the record rate down" as per hlssink2 but I can just turn the camera rate down.
If I record at 10 Mb/s using audiotestsrc then recording is fine.
The error messages from pulsesrc are confusing saying "Down stream can't keep up"

What might I do to pulsesrc to be like audiotestsrc so that 10 Mb/s recording is OK

Thanks
James


More information about the gstreamer-devel mailing list