This program will help you to connect AntMedia to Gstreamer. There are three modes available.
- you can connect two peers with each other in p2p mode using AMS server.
- you can publish a audio video streams to AMS from gstreamer in publish mode
- you can play the streams in gstreamer in play mode.
Run the following command:
apt-get install libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libgstreamer-plugins-bad1.0-dev gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly gstreamer1.0-libav gstreamer1.0-doc gstreamer1.0-tools gstreamer1.0-x gstreamer1.0-alsa gstreamer1.0-gl gstreamer1.0-gtk3 gstreamer1.0-qt5 libjson-glib-dev gstreamer1.0-nice gstreamer1.0-pulseaudio
There are two installer binaries gstreamer-1.0 and gstreamer-devel make sure you install both of them
download the windows installer from https://gstreamer.freedesktop.org/download/#windows
There are two installer binaries gstreamer-1.0 and gstreamer-devel make sure you install both of them
download the Mac installer from https://gstreamer.freedesktop.org/download/#macos
Add to path export PKG_CONFIG_PATH="/Library/Frameworks/GStreamer.framework/Versions/Current/lib/pkgconfig${PKG_CONFIG_PATH:+:$PKG_CONFIG_PATH}"
mkdir build
cd build
cmake ..
make
sendRecvAnt - Gstreamer Antmedia Webrtc Publish and Play
Help Options:
-h, --help Show help options
Application Options: Default
-s, --ip ip address of antmedia server
-p, --port Antmedia server Port default : 5080
-f, --filename specify file path which you want to stream
-m, --mode publish or play or p2p default : publish
-a, --appname Appname for publishing the Stream : WebRTCAppEE
-i, --streamids you can pass n number of streamid to play like this -i streamid -i streamid ....
Two peers will connect in p2p mode with Bi-Directional audio video stream
On first peer ./sendRecvAnt --mode p2p --ip AMS_IP --streamid streamid
On second peer ./sendRecvAnt --mode p2p --ip AMS_IP --streamid streamid
by default videotest src will be streamed if you want to use a file for streaming please specify file name with as -f test.mp4
only mp4 file will work
We can either send or receive streams from gstreamer to AMS
video stream with id stream1 will be send to.Publish is the defalut mode
sendRecvAnt --ip AMS_IP -i stream1
will receive stream with id stream1 in Gstreamer
sendRecvAnt --ip AMS_IP --mode play -i stream1
you can also specifie N number of stream ids like this to receive multiple streams
sendRecvAnt --ip AMS_IP --mode play -i stream1 -i stream2 -i stream3
and so on