I am working on a project to create a robot using raspberries pi, which will send video to an Android device and will be controlled from it.
I decided to use a RaspberryPi camera (maybe a USB webcam is better?). I want the video to be in H264 format, but I have a problem with streaming in this format. I tried using gstreamer and vlc:
- If I use vlc, I get a very delayed video, not smooth.
- If I use gstreamer, I get a good video, but I do not know how to set the URL to add the Android application code. I see a video by running the gstreamer command on my computer. I use the following commands:
On RaspberryPi:
raspivid -t 999999 -h 720 -w 1080 -fps 25 -hf -b 2000000 -o - | gst-launch-1.0 -v fdsrc ! h264parse ! rtph264pay config-interval=1 pt=96 ! gdppay ! tcpserversink host=192.168.1.102 port=5000
On my PC (to watch the video):
gst-launch-1.0 -v tcpclientsrc host=192.168.1.102 port=5000 ! gdpdepay ! rtph264depay ! avdec_h264 ! videoconvert ! autovideosink sync=false
So firstly, my question is, is there a way to set the url to catch this gstreamer stream (or any other way to catch the stream in the Android application code)?
Secondly, if you have other tips, for example, using a different camera, a different format (not mpg), a different stream, etc.
A. Sarid
source share