High/unreasonable CPU utilization when RTP loopback of video & audio streams together on the same machine.
jy
jyaccess at yahoo.com
Thu Jul 18 04:32:30 UTC 2019
env: gstreamer-1.16, Windows 10, Dell XPS desktop, cpu: i7.
I'm running RTP video & audio tests.
Both server & client are run on the same machine.
video RTP with THEORA, audio RTP with OPUS
I notice that if running , cpu load observed with "top -c" command
video only, cpu load is about 17% total (server + client processes)
audio only, cpu load is about 3% total
video + audio together, cpu load jumps to 50%+ on server side (this is
weird or wrong)
my test commands are as follow.
=========================================================
**** This is video only test on same machine. cpu load ~17% total
server command process cpu load ~14%
gst-launch-1.0 ksvideosrc ! \
"video/x-raw,\
framerate=15/1,\
width=352,height=288" ! \
theoraenc ! \
rtptheorapay config-interval=2 ! \
udpsink host="127.0.0.1" port=5555
client command: process cpu load ~3%
gst-launch-1.0 \
udpsrc port=5555 ! \
"application/x-rtp,media=video,clock-rate=90000,\
encoding-name=THEORA" ! \
rtpjitterbuffer latency=500 ! \
rtptheoradepay ! \
queue ! \
theoradec ! \
queue ! \
videoconvert ! \
autovideosink sync=false
=============================================================
**** This is audio only test on same machine cpu load ~3% total
server command: process cpu load ~1.9%
gst-launch-1.0 \
wasapisrc ! \
audioconvert ! queue ! \
"audio/x-raw,format=S16LE,layout=interleaved,channels=2" ! \
opusenc ! \
"audio/x-opus, channels =2" ! \
rtpopuspay ! \
udpsink host="127.0.0.1" port=5560
client command: process cpu load ~1%
gst-launch-1.0 \
udpsrc port=5560 ! \
"application/x-rtp,media=audio,clock-rate=48000," \
"encoding-name=OPUS,"\
"payload=96" ! \
queue ! \
rtpopusdepay ! queue ! opusdec ! \
audioconvert ! audioresample ! autoaudiosink
===================================================================
**** This is video & audio run together on the same machine, cpu load jumps
to 50%+
****
server command: process cpu load ~49%
gst-launch-1.0 ksvideosrc device-name-partial="C270" ! \
"video/x-raw,\
framerate=15/1,\
width=352,height=288" ! \
theoraenc ! \
rtptheorapay config-interval=2 ! \
udpsink host="127.0.0.1" port=5555 \
\
wasapisrc device-name="TAND" ! \
audioconvert ! queue ! \
"audio/x-raw,format=S16LE,layout=interleaved,channels=2" ! \
opusenc ! \
"audio/x-opus, channels =2" ! \
rtpopuspay ! \
udpsink host="127.0.0.1" port=5560
client command: process cpu load ~4%
gst-launch-1.0 \
udpsrc port=5555 ! \
"application/x-rtp,media=video,clock-rate=90000,\
encoding-name=THEORA" ! \
rtpjitterbuffer latency=500 ! \
rtptheoradepay ! \
queue ! \
theoradec ! \
queue ! \
videoconvert ! \
autovideosink sync=false \
\
udpsrc port=5560 ! \
"application/x-rtp,media=audio,clock-rate=48000," \
"encoding-name=OPUS,"\
"payload=96" ! \
queue ! \
rtpopusdepay ! queue ! opusdec ! \
audioconvert ! audioresample ! autoaudiosink
==========================================================================
So, why the huge cpu load jump on server side, almost trippled, when both
video & audio are run together?
The internal thread overhead is causing problem?
Please comment.
--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
More information about the gstreamer-devel
mailing list