使用基于UDP的gstreamer进行网络摄像头流式传输 [英] Webcam streaming using gstreamer over UDP

查看:678
本文介绍了使用基于UDP的gstreamer进行网络摄像头流式传输的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我正在尝试的:

gst-launch -v udpsrc port=1234 ! fakesink dump=1

我通过以下方式进行测试:

I test with:

gst-launch -v audiotestsrc ! udpsink host=127.0.0.1 port=1234

一切正常,我可以看到来自audiotestsrc

And everything works fine, I can see the packages arriving from the audiotestsrc

现在让我们使用网络摄像头源进行测试:

Now lets test with the webcam source:

gst-launch -v v4l2src device=/dev/video0 ! queue ! videoscale method=1 ! "video/x-raw-yuv,width=320,height=240" ! queue ! videorate ! "video/x-raw-yuv,framerate=(fraction)15/1" ! queue ! udpsink host=127.0.0.1 port=1234

什么也没有发生,转储中没有软件包.

And nothing happens, no package appears in the dump.

这是服务器上显示的详细信息的日志转储.

Here is a logdump of what verbose shows in the server.

有人对此有任何线索吗?

Does anyone have a clue on this?

推荐答案

尝试一下(您可能需要为此安装gstreamer-ugly插件)

Try these (You may have to install gstreamer-ugly plugins for this one)

来自网络摄像头的UDP流(通过网络流)

gst-launch v4l2src device=/dev/video0 ! 'video/x-raw-yuv,width=640,height=480' !  x264enc pass=qual quantizer=20 tune=zerolatency ! rtph264pay ! udpsink host=127.0.0.1 port=1234

从网络摄像头收到的UDP流(通过网络接收)

gst-launch udpsrc port=1234 ! "application/x-rtp, payload=127" ! rtph264depay ! ffdec_h264 ! xvimagesink sync=false

更新

要确定流传输端的有效负载,只需在gst-launch -v ...

To determine the payload at the streaming end simply use verbose option with gst-launch -v ...

这篇关于使用基于UDP的gstreamer进行网络摄像头流式传输的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆