首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >用Gstreamer和easycap从raspberry到Ubuntu机的流摄像机视频

用Gstreamer和easycap从raspberry到Ubuntu机的流摄像机视频
EN

Stack Overflow用户
提问于 2018-10-09 12:41:57
回答 1查看 991关注 0票数 0

我正在尝试使用pi2将相机图像从覆盆子GStreamer流到Ubuntu机器。

该相机是连接到覆盆子π使用USB和易写盘。

用于流照相机的代码是:

代码语言:javascript
复制
  #!/bin/bash
clear 
gst-launch-1.0 -v v4l2src device=/dev/video0 !omxh264enc ! avimux !udpsink host=192.168.0.102 port=6030

对于Ubuntu,我使用以下方法

代码语言:javascript
复制
    #!/bin/bash
clear
gst-launch-1.0 -e -v udpsrc port=6000 ! application/x-rtp, payload=96 ! rtpjitterbuffer ! rtph264depay ! avdec_h264 ! fpsdisplaysink sync=false text-overlay=false

当我运行代码时,raspberry pi流数据,ubuntu接收数据,但是没有打开流窗口,我得到以下错误

代码语言:javascript
复制
WARNING: from element /GstPipeline:pipeline0/GstRtpJitterBuffer:rtpjitterbuffer0: Could not decode stream.
Additional debug info:
gstrtpjitterbuffer.c(3247): gst_rtp_jitter_buffer_chain (): /GstPipeline:pipeline0/GstRtpJitterBuffer:rtpjitterbuffer0:
Received invalid RTP payload, dropping

我愿意听取你的建议,谢谢

EN

回答 1

Stack Overflow用户

发布于 2018-10-09 13:46:57

尝试以下几点:

  1. 为了简单起见,在发送方和接收方使用相同的端口号。
  2. 在发件人处,使用元素rtph264pay gst-launch-1.0 -v v4l2src device=/dev/video0 ! omxh264enc ! rtph264pay ! udpsink host=192.168.0.102 port=6030
  3. 在接收端使用以下命令之一监视UDP统计信息: cat /proc/net/snmp | grep Udp\: cat /proc/net/udp

此外,还可以在管道中使用元素h264parse

代码语言:javascript
复制
#Sender
gst-launch-1.0 -v v4l2src device=/dev/video0 ! omxh264enc ! h264parse ! rtph264pay ! udpsink host=192.168.0.102 port=6030


#Receiver
gst-launch-1.0 -e -v udpsrc port=6030 ! application/x-rtp, payload=96 ! rtpjitterbuffer ! rtph264depay ! h264parse ! avdec_h264 ! fpsdisplaysink sync=false text-overlay=false
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/52721357

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档