简体   繁体   中英

Gstreamer: stream video over internet

I am using nVidia TX1 embedded board with Ubuntu 14.04.

I have attached a camera module to it which give UYVY video output in 1080p60. I am using gstreamer 1.2.4 pipeline for preview, udp & rtsp streaming. And This works fine.

I can view streaming video using VLC player or gstreamer pipeline from Clinet PC in local LAN.

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. But the problem is that My camera feed is UYVY so i can't directly play video0 device from any 3rd party software. I need gstreamer to do color conversion.

So how can i directly stream from Gstreamer Pipeline over Internet? Any software like wowza or other method available?

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? 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.

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.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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