avfvideosrc Consuming Too much CPU
Submitted by Prafulla Kumar Singh
Link to original bug (#796478)
Description
Compare to videotestsrc, avfvideosrc taking too much CPU.
pipeline with videotestsrc CPU use : ~ 28.2%
pipeline with avfvideosrc CPU use : ~ 207.2%
Following are terminal log for reference:
ADFGTECHs-MacBook-Pro-2:iOSGstreamerClient prafullasingh$ ps
PID TTY TIME CMD
1111 ttys000 0:00.49 -bash
12116 ttys000 0:20.14 ./objs/srs -c ./conf/srs.conf
12196 ttys000 0:00.06 tail -f objs/srs.log
14198 ttys002 0:00.46 -bash
22944 ttys002 0:03.17 gst-launch-1.0 videotestsrc is-live=true ! videoconvert ! x264enc tune=zerolatency ! video/x-h264 ! mpegtsmux name=mux ! queu
22733 ttys003 0:00.15 -bash
ADFGTECHs-MacBook-Pro-2:iOSGstreamerClient prafullasingh$ ps -p 22944 -o %cpu,%mem
%CPU %MEM
25.6 0.4
ADFGTECHs-MacBook-Pro-2:iOSGstreamerClient prafullasingh$ ps -p 22944 -o %cpu,%mem
%CPU %MEM
28.2 0.4
ADFGTECHs-MacBook-Pro-2:iOSGstreamerClient prafullasingh$ ps -p 22944 -o %cpu,%mem
%CPU %MEM
28.5 0.4
ADFGTECHs-MacBook-Pro-2:iOSGstreamerClient prafullasingh$ ps
PID TTY TIME CMD
1111 ttys000 0:00.49 -bash
12116 ttys000 0:20.15 ./objs/srs -c ./conf/srs.conf
12196 ttys000 0:00.06 tail -f objs/srs.log
14198 ttys002 0:00.47 -bash
22951 ttys002 0:11.46 gst-launch-1.0 avfvideosrc ! videoconvert ! x264enc tune=zerolatency ! video/x-h264 ! mpegtsmux name=mux ! queue ! udpsink ho
22733 ttys003 0:00.17 -bash
ADFGTECHs-MacBook-Pro-2:iOSGstreamerClient prafullasingh$ ps -p 22951 -o %cpu,%mem
%CPU %MEM
211.1 0.7
ADFGTECHs-MacBook-Pro-2:iOSGstreamerClient prafullasingh$ ps -p 22951 -o %cpu,%mem
%CPU %MEM
207.2 0.7
ADFGTECHs-MacBook-Pro-2:iOSGstreamerClient prafullasingh$ gst-inspect-1.0 --version
gst-inspect-1.0 version 1.14.0
GStreamer 1.14.0
Version: 1.x