Skip to content

Instantly share code, notes, and snippets.

@murano500k
Last active September 4, 2017 10:44
Show Gist options
  • Save murano500k/75b5f7d4d2c587fdf69bedae8a3f2286 to your computer and use it in GitHub Desktop.
Save murano500k/75b5f7d4d2c587fdf69bedae8a3f2286 to your computer and use it in GitHub Desktop.
ubuntu sender
gst-launch-1.0 v4l2src \
! 'video/x-raw, width=640, height=480, framerate=30/1'\
! videoconvert ! x264enc pass=qual quantizer=20 tune=zerolatency \
! rtph264pay ! udpsink host=127.0.0.1 port=1234
ubuntu reciever
gst-launch-1.0 udpsrc port=1234 ! "application/x-rtp, payload=127" !\
rtph264depay ! avdec_h264 ! videoconvert ! ximagesink
2
#######################
sender ubuntu
gst-launch-1.0 v4l2src ! 'video/x-raw, width=640, height=480, framerate=30/1' ! videoconvert ! x264enc pass=qual quantizer=20 tune=zerolatency ! rtph264pay ! udpsink host=172.22.89.45 port=5004
reciever ubuntu
gst-launch-1.0 udpsrc address=172.22.89.45 port=5004 ! "application/x-rtp, payload=127" ! rtph264depay ! avdec_h264 ! videoconvert ! ximagesink sync=false
sudo apt install gstreamer1.0-libav gstreamer1.0-plugins-good gstreamer1.0-tools gstreamer1.0-plugins-base gstreamer1.0-plugins-bad gstreamer1.0-x
Changing the source video from a web solved the caps negotiation issue. The final pipeline was:
v4l2src ! videoscale ! video/x-raw,width=1600,height=1150 ! x264enc tune=zerolatency ! rtph264pay ! udpsink host=192.168.0.100 port=5000
And:
udpsrc port=5000 caps = "application/x-rtp, media=video, clock-rate=90000, encoding-name=H264, payload=96" ! rtph264depay ! avdec_h264 ! autovideosink
Thought, bigger resolutions are crashing the app.
https://github.com/sdroege/gst-launch-remote
https://coaxion.net/blog/2014/10/gstreamer-remote-controlled-testing-application-for-android-ios-and-more/
http://gstreamer-devel.966125.n4.nabble.com/Appsrc-link-with-android-screen-record-td4667883.html
https://gist.github.com/beeender/d539734794606a38d4e3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment