I'm working on an Android app using GStreamer and I have some trouble with my pipeline to receive the video stream. I'm starting with GStreamer, that's why I'm using the Tutorial 3 for Android and I try to modify as few code as possible because I don't master it.
Brief summary: my server uses GStreamer to manage video stream and sends to my Android device the video stream through RTP. The video is encoded with h264. The stream reception is successful on Windows but not on Android, and that's my problem.
Pipeline used on Windows powershell to receive the video stream (it works) :
.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
Pipeline used on Android app (it doesn't work) :
udpsrc port=5000 caps="application/x-rtp,clock-rate=90000,payload=96" ! rtph264depay ! avdec_h264 ! glimagesink
I tried with many video sink and I came across errors :
- glimagesink:
Error received from element udpsrc0: could not open resource for reading
is displayed on device screen and when I search in Info logs I see ... gst_udpsrc_open:<udpsrc0> error: no socket error: Unable to create socket: Permission denied
- autovideosink: I see the same error as before in Info logs but the on screen error message is not displayed and I have an error in Error logs:
... /tutorial-3.c:202:app_function Could not retrieve video sink
. Maybe this error has a higher priority ?
- fpsdisplaysink: same as autovideosink.
But all these video sinks work with the default pipeline (videotestsrc ! warptv ! videoconvert ! autovideosink
) that's why I don't really understand where the error comes from.
If someone has an idea on how to detect the origin of the problem or how to fix it, I'm interested. Don't hesistate to ask me if I'm not clear. Thanks !
question from:
https://stackoverflow.com/questions/65938765/gstreamer-pipeline-issues-for-android-using-rtp-and-h264 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…