RASPI # Gstreamer-tcpclientsink and UDPSRC plugin usage

Source: Internet
Author: User
Tags gstreamer raspi

Prerequisite Description:

  When doing the GStreamer project, it is necessary to actively send the data collected from the device to the server.

This allows you to proactively send data to the specified server using the Tcpclientsink and Udpsink plugins.

Tcpclientsink usage

Note: If you want to proactively send data to the server, you can transfer it via the Tcpclientsink plugin.

The specific code is as follows

Data-client:

Send to Linux:

0 - - - 5 4000000 640,480 -O-| gst-launch-1.0 fdsrc! h264parsegdppay! Tcpclientsink host= 192.168. 11.35 port=3000

Send to Windows:

Raspivid-t 0-w 800-h 600-fps 25-g 5-b 4000000-vf-p 20,20,640,480-o-| gst-launch-1.0 fdsrc! h264parse! rtph264pay config-interval=2! Tcpclientsink host=192.168.11.35 port=3000

Server

Linux:

gst-launch-1.0 tcpserversrc host=192.168. 11.35 port= fdsink fd=2

Windows:
TCPSERVERSRC host=192.168.11.35 port=3000! APPLICATION/X-RTP, payload=96! Rtpjitterbuffer! Rtph264depay! avdec_h264! Fpsdisplaysink Sync=false Text-overlay=false

RTSP server: (in the Gst-rtsp-server example project)



" (tcpserversrc host=192.168.11.35 port=3000! gdpdepay! Rtph264pay name=pay0 pt=96) "

Windows:

./test-launch "(Tcpserversrc host=192.168.11.35 port=3000! Application/x-rtp,payload=96! Rtpjitterbuffer! Rtph264depay! H264parse! Rtph264pay name=pay0 pt=96) "

This allows for real-time video transmission on the phone or client with RTSP software.

Rtsp-server need to note:

Because the RTSP server is required data to accept data from TCPSERVERSRC, so must be on the phone or client connection on the server side of RTSP, open data-client only valid.

Open in order for Rtsp-server->rtsp-client->tcpclientsink

Udpsink usage:

Data-client:

Send to Linux:

Raspivid-t0-W --H --fps --G5-B1000000-vf-p -, -,640,480-n-o-| gst-launch-1.0--gst-debug=3Fdsrc! H264parse! Gdppay! Udpsink host=192.168.11.12port=3000

Send to Windows:

Raspivid-t 0-w 800-h 600-fps 16-g 5-b 1000000-vf-p 20,20,640,480-n-O-| gst-launch-1.0--gst-debug=3 FDSRC! H264parse! Rtph264pay config-interval=2! Udpsink host=192.168.11.36 port=3000

Server

Linux:  

gst-launch-1.0 udpsrc port= ! Fdsink fd=2


GST-launch-1.0 udpsrc port= ! APPLICATION/X-RTP, payload=-Sync=false text-overlay=false

Rtsp-server:



" (udpsrc port=3000! gdpdepay! Rtph264pay name=pay0 pt=96) "


. /test-launch--gst-debug=3"(udpsrc port=3000!) Application/x-rtp,payload=96! Rtpjitterbuffer! Rtph264depay! H264parse! Rtph264pay name=pay0 pt=96)"

Need to note:

In UDP mode, regardless of whether or not the rtsp-server is turned on, the data-client end will consume traffic for data transmission.

Rtsp-server need to note:

Under Linux, the data-client must be turned on when the phone or client is connected to the server side of RTSP.

Open in order for Rtsp-server->rtsp-client->udpsink

and Windows won't be so

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.