- Notifications
You must be signed in to change notification settings - Fork4
mareksuma1985/GStreamer_Tutorial_udpsink
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
GStreamer Tutorial udpsink created using instructions posted on Stack Overflow by Eduardo Fernando. VariableGSTREAMER_ROOT_ANDROID must be defined in/etc/profile or/home/USERNAME/.profile and show to a path where you have extracted GStreamer Android binaries, for example:export GSTREAMER_ROOT_ANDROID=/home/USERNAME/gstreamer-1.0-android-universal-1.14.2If you're having trouble building the project, download and unzip revision 10e of the NDK, set path pointing to it in your project's settings and copy filesource.properties from the up-to-date NDK folder to folder containing the 10e version.The app streams phone's main camera feed to a given IP address using openh264enc, default receiver's port number is 5000.
- Create
local.propertiesand addsdk.dirandndk.dirproperties:
ndk.dir=~/Library/Android/android-sdk-linux/android-ndk-r10e sdk.dir=~/Library/Android/android-sdk-linuxTo play the video stream execute one of following commands on target machine:
gst-launch-1.0 udpsrc port=5000 ! h264parse ! avdec_h264 ! autovideosinkgst-launch-1.0 udpsrc port=5000 ! queue ! h264parse ! avdec_h264 ! queue ! videoscale ! video/x-raw,width=640,height=480 ! autovideosinkTo play the video stream withrtph264pay enabled, execute:
gst-launch-1.0 udpsrc port=5000 caps='application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264' ! rtpjitterbuffer ! rtph264depay ! h264parse ! avdec_h264 ! autovideosink fps-update-interval=1000 sync=falseTo play the audio stream, execute:
gst-launch-1.0 udpsrc port=5001 ! flacparse ! flacdec ! autoaudiosink sync=falseTo play both video and audio, execute:
gst-launch-1.0 udpsrc port=5000 ! h264parse ! avdec_h264 ! autovideosink udpsrc port=5001 ! flacparse ! flacdec ! autoaudiosink sync=falseAll commands can be copied to clipboard in the app. Enabling RTP packetization and setting port to 5600 makes the stream compatible withQGroundControl. Rotating your device before you start streaming will cause the stream to rotate accordingly. This feature can be disabled in preferences.
About
Streams video from main camera to a given IP address.
Topics
Resources
Uh oh!
There was an error while loading.Please reload this page.
