This tutorial follows the steps found here.
When we first attempted this project we used the 5MP CSI camera but were unable to make the 5MP CSI camera work with gstreamer. So we switch to the USB web cam and it works perfectly.
Install gstreamer:
$sudo apt-get install gstreamer-tools gstreamer0.10-plugins-bad gstreamer0.10-plugins-good v4l-utils
To create gstreamer start script we used tcsh shell. First we install it with this command.
$sudo apt-get install tcsh
Create the script file ‘gst-server.sh’ that is used to start gstreamer streaming server.
Please use the IP address found in your ‘$ifconfig’ in place of 192.168.0.103 shown here.
#!/bin/tcsh set myip=192.168.0.103 set port=5000 set width=320 set height=240 gst-launch\ v4l2src !\ ffmpegcolorspace !\ video/x-raw-yuv,width=${width},height=${height},framerate=\(fraction\)30/1 !\ jpegenc !\ tcpserversink host=${myip} port=${port} sync=false
Next add an executable permission to the script.
$sudo chmod u+x gst-server.sh
Start gstreamer server using this command.
sudo ./gst-server.sh
On the Android side, you can download the Android apk file from here.
The source files for the Android APK can be found at simplemjpegview_gst which is based on SimpleMjpegStreamer.
Leave a Reply
You must be logged in to post a comment.