Group 1:
Receive: gst-launch-0.10 udpsrc Port = 1234! Theoradec! Ffmpegcolorspace! Ximagesink
Send: gst-launch-0.10 v4l2src! Ffmpegcolorspace! Theoraenc! Udpsink host = 127.0.0.1 Port = 1234
This group can successfully display the camera image
You can also replace ximagesink with xvimagesink without any impact.
Note that you must first run the receive command
Group 2:
1. To send
GST-launch v4l2src device =/dev/video0! 'Video/X-raw-YUV, width = 640, Height = 100 '! Xforwarenc pass = qual quantizer = 20 tune = zerolatency! Rtph264pay! Udpsink host = 127.0.0.1 Port = 1234
2. To receive
GST-launch udpsrc Port = 1234! & Quot; application/X-RTP, payload = 127 & quot "! Rtph264depay! Ffdec_h264! Xvimagesink sync = false
This group is somewhat problematic.
I would like to first encounter: Warning: erroneous pipeline: No element "xforwarenc"
Solution: APT-Get install gstreamer0.10-plugins-uugly-multiverse
Note: Warning: erroneous pipeline: No property "tune" in element "xforwarenc0"
When I remove tune = zerolatency with zero latency, the following error occurs: Maid ():/MAID: pipeline0/gstudpsrc: udpsrc0:
Streaming task paused, reason not-negotiated (-4)
I am confused.
You can tell me what the experts know !!!! Thank you !!
I have found a group on the Internet that has not been tested. If you have any requirements, I can test it.
1) RTP send webcam and audio
gst-launch gstrtpbin name=rtpbin latency=0 v4l2src device=/dev/video0 ! typefind ! ffmpegcolorspace ! videoscale ! video/x-raw-yuv, width=640, height=480 ! videorate ! video/x-raw-yuv, framerate=30/1 ! ffenc_mpeg4 ! rtpmp4vpay send-config=true ! rtpbin.send_rtp_sink_0
rtpbin.send_rtp_src_0 ! udpsink port=5502 host=127.0.0.1 rtpbin.send_rtcp_src_0 ! udpsink port=5510 host=127.0.0.1 sync=false async=false udpsrc port=5510 ! rtpbin.recv_rtcp_sink_0 autoaudiosrc samplesperbuffer=1000 ! alawenc ! rtppcmapay ! rtpbin.send_rtp_sink_1
rtpbin.send_rtp_src_1 ! udpsink port=5504 host=127.0.0.1 rtpbin.send_rtcp_src_1 ! udpsink port=5512 host=127.0.0.1 sync=false async=false udpsrc port=5512 ! rtpbin.recv_rtcp_sink_1
2) RTP receive webcam and audio
gst-launch gstrtpbin name=rtpbin2 latency=0 udpsrc caps="application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)MP4V-ES, profile-level-id=(string)1" port=5502 ! rtpbin2.recv_rtp_sink_0 rtpbin2. ! rtpmp4vdepay ! ffdec_mpeg4
! videoscale ! video/x-raw-yuv, width=640, height=480 ! videorate ! video/x-raw-yuv, framerate=30/1 ! ffmpegcolorspace ! autovideosink udpsrc port=5510 ! rtpbin2.recv_rtcp_sink_0 rtpbin2.send_rtcp_src_0 ! udpsink host=127.0.0.1 port=5510 sync=false async=false
udpsrc caps="application/x-rtp,media=(string)audio, clock-rate=(int)8000, encoding-name=(string)PCMA" port=5504 ! rtpbin2.recv_rtp_sink_1 rtpbin2. ! rtppcmadepay ! alawdec ! autoaudiosink buffer-time=10000 udpsrc port=5512 ! rtpbin2.recv_rtcp_sink_1 rtpbin2.send_rtcp_src_1
! udpsink host=127.0.0.1 port=5512 sync=false async=false
Group 4:
Send:
Gst-launch-0.10-V gstrtpbin name = rtpbin v4l2src device =/dev/video0! Videorate! Videoscale! Ffmpegcolorspace! 'Video/X-raw-YUV, width = (INT) 320, Height = (INT) 240, framerate = (fraction) 100 '! Rtpvrawpay! Rtpbin. send_rtp_sink_0 rtpbin. send_rtp_src_0!
Multiudpsink clients = "127.0.0.1: 9996" rtpbin. send_rtcp_src_0! Multiudpsink clients = "127.0.0.1: 9997" Sync = false async = false udpsrc Port = 10000! Rtpbin. recv_rtcp_sink_0
Recv:
GST-launch udpsrc caps = "application/X-RTP, media = (string) video, clock-rate = (INT) 90000, encoding-name = (string) raw, sampling = (string) YCbCr-4: 2: 0, depth = (string) 8, width = (string) 320, Height = (string) 240, Colorimetry = (string) smpte240m, SSRC = (guint) 4294234526,
Payload = (INT) 96, clock-base = (guint) 520513122, seqnum-base = (guint) 28177 "Port = 9996! Queue! Rtpvrawdepay! Queue! Ffmpegcolorspace! Autovideosink
Recv caps = "" you need to obtain the caps refill according to the send command. Note !!!!
Group 5:
Generate an AVI file
GST-launch v4l2src! Video/X-raw-YUV, width = 320, Height = 240! Ffmpegcolorspace! Jpegenc! Avimux! Filesink location = osug-1.avi
Generate an Ogg File
GST-launch v4l2src! Video/X-raw-YUV, width = 320, Height = 240! Ffmpegcolorspace! Theoraenc! Oggmux! Filesink location1_osug-1.ogg
Combined with stream processing in group 4 and Group 5: Both displaying and generating files
Send is the same as the fourth group.
Recv-to-display-and-Avi
GST-launch udpsrc caps = "application/X-RTP, media = (string) video, clock-rate = (INT) 90000, encoding-name = (string) raw, sampling = (string) YCbCr-4: 2: 0, depth = (string) 8, width = (string) 320, Height = (string) 240, Colorimetry = (string) smpte240m,
SSRC = (guint) 4294234526, payload = (INT) 96, clock-base = (guint) 520513122, seqnum-base = (guint) 28177 "Port = 9996! Queue! Rtpvrawdepay! Queue! Tee name = "splitter "! Queue! Ffmpegcolorspace! Autovideosink splitter .! Queue! Ffmpegcolorspace! Jpegenc! Avimux
! Filesink location = osug-udp-2.avi