Hi, I’m working with GStreamer and trying to figure out how to set it up properly on Android, I’ve been doing it for 2 weeks now and still can’t figure it out as there is very little information on the internet about it… So the last hope is on you.
But my video that I stream from the camera is all in artefacts and I can’t fix it in any way(
Could you please give me some advice on how to set up all three of these GStreamers correctly, I would really appreciate a detailed comment where you explain to me how it should work!
With these pipelines its a bit hard to control the quality of the stream. If you have access to the original source of the stream (rtsp://192.150.142/stream1) you could modify the encoding settings to get better quality.
Also, streaming to the the android application without the retranslator pipeline could improve the performance.
Thank you for your time and response!
What do you mean by access to the original source? In my case, it’s a camera with proprietary software that allows me to change only the codec and stream resolution.
If you get artifacts that don’t go away (ie. not just in the beginning) that usually indicates that there’s some packet loss somewhere.
So you might want to figure out if that’s the case and where in the chain that occurs (between rtsp camera and relay or between relay and receiver).
That’s something you would usually investigate with a packet capture tool like tcpdump (which can also capture udp) or wireshark, but I’m not sure what’s available on Android exactly.
If the stream is fairly high bitrate, it’s also possible that the udp send/receive buffers are too small by default. On a Linux system one would check/configure those with sysctl net.core.rmem_max net.core.wmem_max (and can then use e.g. udpsink buffer-size=X and udpsrc buffer-size=X to make the buffers larger).
You could also try using interleaved TCP as transport instead of UDP (would need a different relay/proxy then though).
Lastly, on the receiver application you may want to use udpsrc ! rtpjitterbuffer latency=100 ! rtph264depay ! .... although that adds some additional delay of course (configurable though).