Using Gstreamer or ffmpeg to create rtsp client on Android
Asked Answered
E

1

7

I want to stream a rtsp stream on android and I finally have come to conclusion that I can't use android API's MediaPlayer,Videoview etc because latency is big issue for me. I need an latency of <500 ms. Now I am planning to use Gstreamer or ffmpeg to create an android rtsp client. I just have few doubts

  1. Will the Gstreamer or ffmpeg client be able to provide latency <500ms. I read there are some parameters which I can tweak to get very low latency. Just want to confirm. I have very good network bandwidth. The frame size is generally 1920X1080.

  2. I read Gstreamer is one made one level above ffmpeg and uses ffmpeg codecs to work. I want to know which one is easier to work with for creating an android client. Working on Gstreamer or workig directly on ffmpeg.

  3. If I use Gstreamer android client, Will I have to use the Gstreamer server as well to stream the data? Currently I am using Live555 RTSP server to stream data

Eponymous answered 12/10, 2014 at 18:21 Comment(10)
can you please give some reason for down voting my question ?Eponymous
Do you have any great success with rtsp player. I am struggling to acheive the performance (less than 1 sec dealy in stream) can you share knowledgeScrimpy
@Scrimpy Ni I could not achieve it. GStreamer people told me there is some bug in android port of GStreamer and I will not achieve stream at 720P. Are you able to stream at 720P. The delay is also more than 2 secondsEponymous
i am working on it so far not a great success.Scrimpy
did you try a ffmpeg?Scrimpy
I have shifted to using vlc android now. I don't think GStreamer can serve the purposeEponymous
how much delay you are getting using vlc? is it less than 1sec?Scrimpy
Actually I have tried the vlc android plugin from play store and its able to run 720P video easily but the delay is more. Delay can be adjusted by using some flags which I can configure by compiling the vlc code myself. I am doing that right now.Eponymous
Have you tried ffmpeg or GStreamer and able to play stream at good quality ?Eponymous
Currently i am working on gstreamer but i have heard some good words about ffmpegScrimpy
B
6

I can't speak about ffmpeg, but for GStreamer:

1) Yes, you can get latencies much lower than 500ms with GStreamer as an RTSP client. See the latency property on rtspsrc (which e.g. can be accessed via the setup-source signal if you use playbin... and you should). By default this is set to 2000 miliseconds (which is a safe default) but if you network is fast enough you can set this much lower.

2) That depends on your experience with both APIs. For myself a GStreamer application would be much easier, and you can find a few samples on the internet: https://coaxion.net/blog/2014/08/gstreamer-playback-api/ http://cgit.freedesktop.org/~slomo/gst-sdk-tutorials/tree/gst-sdk/tutorials (the android tutorials)

3) You can use any standard conformant RTSP server, both should work. GStreamer's has a very simple but powerful API, and is included with the GStreamer binaries for Android that you can get here: http://gstreamer.freedesktop.org/data/pkg/android/1.4.3/

Boudreau answered 19/10, 2014 at 13:53 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.