我想使用 gstreamer 进行与操作系统无关的流式传输:
PC1:Windows 网络摄像头
PC2:Ubuntu 盒子
我甚至无法在 PC1 上显示我的网络摄像头并出现此错误:
C:\Users\gerri\Desktop>gst-launch-1.0 ksvideosrc device-path="\\\\\?\\display\#int3470\#4\&5178020\&0\&uid13424\#\{6994ad05-93ef-11d0-a3cc-00a0c9223196\}\\\{c9eab5b4-784a-47a2-b783-24ba0fa1f9a9\}" ! image/jpeg, width=640, height=480 ! jpegdec ! videoscale ! videoconvert ! x264enc tune=zerolatency bitrate=500 speed-preset=superfast ! rtph264pay ! autovideosink
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
ERROR: from element /GstPipeline:pipeline0/GstKsVideoSrc:ksvideosrc0: Internal data stream error.
Additional debug info:
../libs/gst/base/gstbasesrc.c(3072): gst_base_src_loop (): /GstPipeline:pipeline0/GstKsVideoSrc:ksvideosrc0:
streaming stopped, reason not-negotiated (-4)
ERROR: pipeline doesn't want to preroll.
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...
感谢@user.dz 对这篇文章的回答中的设置,而不是接受的答案: