I want to create an Android application that receives a video stream from GStreamer through RTP with a low latency, like a security camera app. I am a beginner on GStreamer and Android. The video is encoded with h264.
For that, I have several ideas :
- use ExoPlayer2, but I am not sure if it's possible to add specific options to be compatible with the gstreamer stream.
- use GStreamer for Android, but it's not beginner-friendly.
I tried to read the video stream and it's successful with VLC on Windows with a sdp file like this :
v=0
m=video 5000 RTP/AVP 96
c=IN IP4 127.0.0.1
a=rtpmap:96 H264/90000
But the latency is high because of buffer.
It's successful with GStreamer thanks to this command line : .gst-launch-1.0.exe -v udpsrc port=5000 ! "application/x-rtp,clock-rate=(int)90000,payload=(int)96" ! rtph264depay ! avdec_h264 ! fpsdisplaysink sync=false text-overlay=true
And on Android with QGroundControl (using GStreamer), however the latency is high.
I followed tutorials to read video with ExoPlayer2 but I didn't manage to read video stream.
I tried to follow the GStreamer Android tutorial however I have the impression that the tutorial is outdated and only allows to display a video and not a video stream (please tell me if I'm wrong).
I am confused, all the results of my research are old (more than 5 years) and I think that the technologies to realize my application have evolved (at least I hope so).
Please, help me to find a way to follow.
Best regards.
question from:
https://stackoverflow.com/questions/65915846/receiving-video-stream-on-android-from-gstreamer-through-rtp 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…