ximagesrc and RTP streaming, evaluate solution and performance

alexxtasi alextasikas at gmail.com
Sun May 3 18:41:41 UTC 2020


Hi all
My use case is grab the screen of a system and stream over the network
(gigabit) to another machine and I am evaluating gstreamer as a solution,
which I think is the only one. Cause I am new in gstreamer, I try some
pipelines based on examples over the web.

So far, I found out that my case includes
- the source machine (mostly with resolution 1080p or 720p and 25fps) :
ximagesrc <--> videoconvert <--> x264enc <--> rtph264pay <--> udpsink
- the receiver:
udpsrc <--> rtph264depay <--> avdec_h264 <--> videoconvert <--> videoscale
<--> ximagesink

and the exact pipelines I've tested, are:
- source
gst-launch-1.0 ximagesrc use-damage=0 \
	! video/x-raw,framerate=25/1 \
	! videoscale method=0 \
	! video/x-raw \
	! videoconvert \
	! x264enc \
	! rtph264pay \
	! udpsink host=192.168.1.5 port=5601
(for windows machine I used gdiscreencapsrc and video/x-raw,format=I420)

- receiver
gst-launch-1.0 -e udpsrc port=5601 caps="application/x-rtp,
media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264,
payload=96" \
	! rtpjitterbuffer \
	! rtph264depay \
	! avdec_h264 \
	! videoconvert \
	! videoscale \
	! ximagesink sync=false

The results till now are disappointing, the delay is unacceptable. And since
I understand this happening while testing in a single machine (my pc and a
vm inside), this also happens and in a pc - raspberryPi test. Even when
raspberryPi sends low resolution (720 × 480) and framerate (10fps), which I
think is weird !!

Some could argue that raspberryPi isn't power enough for this, but there are
cases that it is a part of a gstreamer pipeline (underwater vehicles
streaming video from rpi to the ground pc using gstreamer).
In such a case I based my pipeline. The main difference is they use v4l2src
on the raspberryPi instead of ximagesrc, but the solution is working.

While searching this mail list, I found some topics about poor performance
in ximagesrc :
-  ximagesrc performance
<http://gstreamer-devel.966125.n4.nabble.com/ximagesrc-performance-td4657884.html>  
-  ximagesrc performace issue
<http://gstreamer-devel.966125.n4.nabble.com/ximagesrc-performace-issue-td4658073.html>  
-  ximagesrc at 144 fps
<http://gstreamer-devel.966125.n4.nabble.com/ximagesrc-at-144-fps-td4694010.html>  
as far as I understand from these, ximagesrc is old and also has many tricks
as "use-damage=false".

My questions are:
1- those delays, are the result of bad configuration of my pipelines ? (eg
use of rtpjitterbuffer, videoscale method=0, etc)
2- if yes, what pipeline should I use ?
3- is ximagesrc the appropriate element for my use case and  also is this
use case feasible at all ?

thanks in advance



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/


More information about the gstreamer-devel mailing list