我正在尝试使用GStreamer使UDP多播屏幕流。我的屏幕转换服务器应该在上运行,我的客户端应该运行在Linux上。
如果我在服务器之前启动客户机,那么一切都很好。
问题是,当我启动客户端时,服务器已经启动。视频被接收到了,但它被严重扭曲了。
服务器:
gst-launch-1.0 -e gdiscreencapsrc ! queue ! video/x-raw, framerate=25/1 ! videoconvert ! \
x264enc noise-reduction=10000 tune=zerolatency bitrate=2500 speed-preset="fast" byte-stream=true threads=4 key-int-max=15 intra-refresh=true ! \
h264parse ! rtph264pay config-interval=1 \
! udpsink host=224.1.1.1 port=5000 auto-multicast=true客户端:
gst-launch-1.0 -v udpsrc multicast-group=224.1.1.1 auto-multicast=true port=5000 ! application/x-rtp ! rtph264depay ! h264parse ! queue ! decodebin ! videoconvert ! autovideosink caps='video/x-raw, format=RGB'我已经尝试过使用dx9screencapsrc,但是行为是一样的。只有当我将gdiscreencapsrc替换为videotestsrc时,问题才会得到解决。
如果我使用ximagesrc在Linux上启动服务器,我仍然会遇到一些问题,但随着时间的推移,视频正在改善。
任何帮助都将不胜感激!
发布于 2018-07-16 11:50:11
将cabac=false添加到我的x264enc元素中,修复了ussue。
gst-launch-1.0 -v gdiscreencapsrc ! queue ! video/x-raw,framerate=60/1 ! decodebin ! videoscale ! videoconvert ! \
x264enc cabac=false tune=zerolatency bitrate=4000 speed-preset="fast" ! \
h264parse ! rtph264pay config-interval=-1 \
! udpsink host=224.1.1.1 port=5000 auto-multicast=true sync=falsehttps://stackoverflow.com/questions/51326357
复制相似问题