Streaming Video from Computer to Android

Tim-Philipp Müller t.i.m at zen.co.uk
Thu Aug 1 07:43:15 PDT 2013


On Wed, 2013-07-31 at 14:10 -0700, davidlopez wrote:

Hi,

> 
> I'm working on a robotics project where I need to stream live video from an
> embedded computer to an Android app. I started off by following this
> tutorial:
> http://jumpnowtek.com/index.php?option=com_content&view=article&id=81:gumstix-dsp-gstreamer&catid=35:gumstix&Itemid=67
> 
> Basically what we end up with is on the server we run this command from the
> terminal:
> 
> gst-launch -v v4l2src ! video/x-raw-yuv,width=640,height=480 ! TIVidenc1
> codecName=h264enc engineName=codecServer ! rtph264pay pt=96 ! udpsink
> host=192.168.10.4 port=4000
> 
> and on the client side we run this command from the terminal:
> 
> gst-launch-0.10 -v udpsrc port=4000 caps='application/x-rtp,
> media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264,
> sprop-parameter-sets=(string)\"Z0KAHukBQHpCAAAH0AAB1MAIAA\\=\\=\\,aM48gAA\\=\"'
> ! rtph264depay ! ffdec_h264 ! xvimagesink sync=false

You might want an gstrtpjitterbuffer here (and configure the desired
latency), sync=false on the sink is often not what you want unless you
know that network jitter is going to be very very low.

Cheers
 -Tim

> And the video streaming works just fine with almost zero lag.
> 
> To build the android client end, I went through the gstreamer for android
> tutorials, and in order to test it I simply replaced
> 
> data->pipeline = gst_parse_launch("videotestsrc ! warptv ! ffmpegcolorspace
> ! autovideosink", &error);
> 
> with:
> 
> data->pipeline = gst_parse_launch("udpsrc port=4000
> caps=\"application/x-rtp, media=(string)video, clock-rate=(int)90000,
> encoding-name=(string)H264,
> sprop-parameter-sets=(string)\\\"Z0KAHukBQHpCAAAH0AAB1MAIAA\\\\=\\\\=\\\\,aM48gAA\\\\=\\\"\"
> ! rtph264depay ! decodebin2 ! autovideosink", &error);
> 
> with the addition of also adding extra plugins in the Android.mk file, in
> the tutorial 3 android sample project
> 
> When I test this code, I can see the video stream coming in, and I don't
> think the video is necessarily delayed but it the image is only refreshed
> about once every 2 seconds making the video very choppy and useless for the
> purpose of this project.
> 
> Not really sure where to look into as I'm completely new to Gstreamer, but
> hopefully someone can point me in the right direction.
> 
> Thanks!
> David
> 
> 
> 
> --
> View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Streaming-Video-from-Computer-to-Android-tp4661372.html
> Sent from the GStreamer-devel mailing list archive at Nabble.com.
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel




More information about the gstreamer-devel mailing list