Sunday, March 17, 2013

Raspberry Pi: Streaming video and microphone with Android

  1. Android Application
    SimpleMjpegView was modified using Audiotrack.
    Source code is available here. (TBD)

  2. Gstreamer SettingsTX (RPi)
    gst-launch -v v4l2src ! ffmpegcolorspace ! video/x-raw-yuv,width=320,height=240,framerate=\(fraction\)30/1 ! queue ! videorate ! video/x-raw-yuv,framerate=15/1 ! jpegenc quality=50 ! multipartmux ! tcpserversink host=x.x.x.x port=5000 sync=false alsasrc device=hw:1 ! audioconvert ! audioresample ! 'audio/x-raw-int,rate=8000,width=16,channels=1' ! udpsink host=x.x.x.x port=5001
      (Note: host IP address should be android IP address.)


Hardware:
    Raspberry Pi
    PS3 Eye
    EW-7781Uh WiFi dongle
    Android phone (Droid X)

Summary:
    Android application was tested.
    Jpecenc and PCM was used for video and audio encoder, respectively.
    The audio latency was still not so great (~1 sec), but video was reasonable (< 1 sec). 
    RPi CPU usage was around 70%. (top command)  

Reference:
http://rxwen.blogspot.com/2011/10/stream-audio-via-udp-on-android.html
https://bitbucket.org/neuralassembly/simplemjpegview

2 comments:

  1. so does this send microphone audio from android to the raspberry pi?

    ReplyDelete
  2. Can you share your android project file? I can't solve android side

    ReplyDelete