|# linux send h264 rtp stream:|
|gst-launch-1.0 -v ximagesrc ! video/x-raw,framerate=20/1 ! videoscale ! videoconvert ! x264enc tune=zerolatency bitrate=500 speed-preset=superfast ! rtph264pay ! udpsink host=127.0.0.1 port=5000|
|# Macos send h264 rtp stream:|
|gst-launch-1.0 -v avfvideosrc capture-screen=true ! video/x-raw,framerate=20/1 ! videoscale ! videoconvert ! x264enc tune=zerolatency bitrate=500 speed-preset=superfast ! rtph264pay ! udpsink host=127.0.0.1 port=5000|
|# receive h264 rtp stream:|
|gst-launch-1.0 -v udpsrc port=5000 caps = "application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264, payload=(int)96" ! rtph264depay ! decodebin ! videoconvert ! autovideosink|
Also to generate a stream with a test video instead of a screen capture in osx do:
You generate a video appling videobalance saturation=0 "greyscale"
Consume it :)
If you need to stream the video to another computer you need to change the host ip and it was what i was doing it wrongly!
The host is the machine tha will recive the stream and not where the place when the video is hosted
gst-launch-1.0 videotestsrc ! videobalance saturation=0 ! x264enc ! video/x-h264, stream-format=byte-stream ! rtph264pay ! udpsink host=SERVER_THAR_WILL_RECIVE_THE_VIDEO port=5000
sudo -E gst-launch-1.0 udpsrc port=5000 ! application/x-rtp, encoding-name=H264, payload=96 ! rtph264depay ! h264parse ! avdec_h264 ! autovideosink
I need your help. On my computer I am receiving stream as UDPSRC on some port(port 5004) . I need to forward this from a different port to an end point that receives rstp streams. I am using the following:
udpsrc uri=udp://localhost:5004 ! application/x-rtp, encoding-name=H264, payload=96 ! rtph264depay ! h264parse ! avdec_h264 ! rtspclientsink location=rtsp://localhsot:5006/test
I even tried this:
udpsrc uri=udp://localhost:5004 ! rtspclientsink location=rtsp://localhsot:5006/test and didn't work.
But I cannot get it working. Anyone has any idea? what I am doing wrong. I am new to streaming. I am not sure if all these pipe are necessary or not. I would greatly appreciate your help.
I have this and works fine but I don't want to create .m3u8 files
Follow these steps to generate a sdp source
b) This will give verbose output like one below
c) Use the information above to make your sdp file.
d) Note that in the SDP file the IP address is that of the server. In the server gstreamer code, the IP address is that of the client