Wiki

Clone wiki

simplemjpegview_gst / Home

This is an Android mjpeg streaming viewer. This project is a clone from SimpleMjpegView.

Modified

For streaming from gstreamer, java.net.Socket is used instead of java.net.HttpURLConnection. See detail here.

Required

Before you build this project, you need to modify the following codes.

(1) MjpegActivity.java, at line 19

#!java

    private String mHostName = "192.168.0.118";      <-- gstreamer host
    private int mPort = 5000;                        <-- gstreamer port

(2) MjpegViewer.java, at line 51

#!java

        public static final int IMG_WIDTH=320;
        public static final int IMG_HEIGHT=240;

gstreamer server sample

Here is a server sample script.

#!bash

gst-launch -v v4l2src !\
  ffmpegcolorspace !\
  video/x-raw-yuv,width=320,height=240,framerate=\(fraction\)30/1 !\
  jpegenc !\
  tcpserversink host=192.168.0.118 port=5000

Updated