rtsp audio/video streaming using Gstreamer Android

Sebastian Dröge sebastian at centricular.com
Fri Mar 13 01:28:46 PDT 2015


On Do, 2015-03-12 at 21:30 -0700, pushpa wrote:
> I am trying to construct a RTSP pipeline on the client side to receive audio
> and video streams on android platform
> 
> Only video pipeline works fine
> 
> data->pipeline = gst_parse_launch("rtspsrc
> location=rtsp://192.168.1.100:8554/ss ! gstrtpjitterbuffer ! rtph264depay !
> h264parse !  amcviddec-omxtiducati1videodecoder  ! ffmpegcolorspace !
> autovideosink",&error);
> 
> 
> I need to receive audio streams also, so I tried with below pipeline
> 
> data->pipeline = gst_parse_launch("rtspsrc
> location=rtsp://192.168.1.100:8554/ss latency=0  !tee name=t ! queue  !
> rtpmp4gdepay  ! aacparse ! ffdec_aac ! audioconvert ! autoaudiosink t. !
> queue ! gstrtpjitterbuffer  ! rtph264depay ! h264parse ! 
> amcviddec-omxtiducati1videodecoder  ! ffmpegcolorspace  ! autovideosink ",
> &error);
> 
> But it's not working,Gstreamer shows as some internal flow error
> 
> Please let me know proper rtsp pipeline to receive audio and video streams
> on android

First of all, please use a recent version of GStreamer. What you use
there is 0.10 and not maintained anymore since almost 3 years. You can
get the latest binaries for Android here:
http://gstreamer.freedesktop.org/data/pkg/android/1.4.5/

Then, the best pipeline for playing RTSP streams is
  playbin uri=rtsp://....

It will select the best available decoders and other elements required
to display your stream and output any audio streams.


But in your pipeline above the problem is that you use a tee element.
Instead just link the audio and video branches directly to rtspsrc.
rtspsrc is adding two source pads to itself, one for audio and one for
video.

Also you don't have to add a jitterbuffer like that. rtspsrc already
contains it internally and adding a second one won't make things work
better :)

-- 
Sebastian Dröge, Centricular Ltd · http://www.centricular.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 949 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20150313/1634546d/attachment.sig>


More information about the gstreamer-devel mailing list