Using Gstreamer or ffmpeg to create an rtsp client on Android

I want to transfer the rtsp stream to Android, and I finally came to the conclusion that I cannot use the Android APIs APIs MediaPlayer, Videoview, etc., because Delay is a big problem for me. I need latency <500 ms. Now I'm planning on using Gstreamer or ffmpeg to create an android rtsp client. I just have little doubt

  • Will the Gstreamer or ffmpeg client provide a delay of <500ms. I read that there are some parameters that I can configure to get a very low latency. I just want to confirm. I have very good network bandwidth. The frame size is usually 1920X1080.

  • I read that Gstreamer is one level higher than ffmpeg and uses ffmpeg codecs to work. I want to know who it’s easier to work with to create an Android client. Work with Gstreamer or work directly on ffmpeg.

  • If I use the Gstreamer android client, do I need to use the Gstreamer server for streaming data? I am currently using a Live555 RTSP server to transfer data

+5
source share
1 answer

I can not talk about ffmpeg, but for GStreamer:

1) Yes, you can get delays well below 500 ms using GStreamer as an RTSP client. See The latency property on rtspsrc (which, for example, can be accessed through the signal from the configuration source if you use playbin ... and you need to). By default, it is set to 2000 milliseconds (which is safe by default), but if you connect fast enough, you can set it much lower.

2) It depends on your experience with both APIs. For me, the GStreamer application would be much simpler, and you could find several 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 (android tutorials )

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

+6
source

Source: https://habr.com/ru/post/1204518/


All Articles