简体   繁体   English

Gstreamer:通过互联网流式传输视频

[英]Gstreamer: stream video over internet

I am using nVidia TX1 embedded board with Ubuntu 14.04. 我在Ubuntu 14.04上使用nVidia TX1嵌入式板。

I have attached a camera module to it which give UYVY video output in 1080p60. 我已将相机模块连接到该模块,以1080p60的分辨率提供UYVY视频输出。 I am using gstreamer 1.2.4 pipeline for preview, udp & rtsp streaming. 我正在使用gstreamer 1.2.4管道进行预览,udp和rtsp流。 And This works fine. 并且这很好。

I can view streaming video using VLC player or gstreamer pipeline from Clinet PC in local LAN. 我可以使用VLC播放器或gstreamer管道从本地LAN中的Clinet PC观看流式视频。

But How can i stream this live video feed over Internet so it can be viewed from anywhere in the world? 但是,我如何通过互联网流式传输此实时视频提要,以便可以在世界任何地方观看?

I came across some software which can stream WebCam video over internet. 我遇到了一些可以通过互联网流式传输WebCam视频的软件。 But the problem is that My camera feed is UYVY so i can't directly play video0 device from any 3rd party software. 但是问题是我的相机提要是UYVY,所以我不能直接从任何第三方软件播放video0设备。 I need gstreamer to do color conversion. 我需要gstreamer进行颜色转换。

So how can i directly stream from Gstreamer Pipeline over Internet? 那么我如何直接通过Internet从Gstreamer Pipeline流式传输呢? Any software like wowza or other method available? 是否有wowza之类的软件或其他可用方法?

Without providing your pipeline I can't see specifically which components you are using, so to answer your question without many permutations - how can you directly stream with a gstreamer pipeline over the internet? 没有提供您的管道,我看不到您正在使用的特定组件,因此在没有很多排列的情况下回答您的问题-您如何直接通过Internet使用gstreamer管道进行流式传输? here is a basic working example of a server and client, you will obviously need to change the sources for your application. 这是服务器和客户端的基本工作示例,显然您将需要更改应用程序的源。 You will likely want to change autovideo sink to something with h264 hardware video acceleration, otherwise this can be very slow. 您可能希望将自动视频接收器更改为具有h264硬件视频加速的功能,否则可能会很慢。

server 服务器

gst-launch videotestsrc ! queue ! x264enc ! queue ! rtph264pay ! queue ! udpsink host=10.0.0.2 port=9002

client 客户

gst-launch udpsrc port=9002 caps="application/x-rtp" ! queue ! rtph264depay ! queue ! ffdec_h264 ! queue ! autovideosink

h263 - in case hardware decoding in not an option, it will be much faster. h263-如果无法进行硬件解码,则速度会更快。

server 服务器

gst-launch videotestsrc \
! video/x-raw-yuv, width=704, height=576, format='(fourcc)'UYVY \
! ffmpegcolorspace \
! ffenc_h263 \
! video/x-h263 \
! rtph263ppay pt=96 \
! udpsink host=127.0.0.1 port=9002 sync=false

client 客户

gst-launch  udpsrc  port=9002 \
! application/x-rtp, clock-rate=90000,payload=96,media=video, encoding-name=H263! rtph263pdepay queue-delay=0 \
! ffdec_h263 \
! autovideosink

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM