Long time back I am looking for a solution to stream android live camera video to a webpage over internet (not wifi). After doing some research I came up with a working solution by combining multiple components together. The tutorial helps you get started with real time video streaming.

If you are beginner, this article will introduce you to lot new things like real time streaming protocols (RTSP, RTMP), Wowza Media Engine, libstreaming, WAMP and jwplayer.

android live video streaming

Below are the two protocols on which real time streaming really works. Go through the wikipedia links to get enough knowledge on underlaying technology behind real time streaming.

RTSP Protocol
Real Time Streaming Protocol is a networking protocol mainly used to stream real time media data like audio or video. It establishes a streaming session between client and server. In this tutorial we use this protocol while sending video stream from android mobile to streaming server.

Lean more about Real Time Streaming Protocol

RTMP Protocol
Real Time Messaging Protocol was developed by Adobe for Flash Player to transmit the realtime media (audio, video) between server and flash player. This protocol we use to receive video stream from server to flash player.

Lean more about Real Time Messaging Protocol

Below diagram is a high level architecture diagram of android video streaming. First android streams camera video to wowza media engine. Second wowza decodes the video and starts a streaming channel. Thirst webpage consumes wowza stream and plays the video on the page.

android-video-streaming-architecture

1. Downloading Libstreaming library

Building a RTSP library involves deep understanding of real time streaming protocols and good command over multiple java media APIs which is not easy for every beginner. Luckly Fyhertz made our lives easier by providing an excellent RTSP library called libstreaming for android. Using this library, streaming video / audio from android mobile can done with very few lines of code.

Download the library and keep it aside.

2. Installing & Configuring Wowza Media Engine

Wowza Media Engine is very popular streaming engine which can stream high quality video and audio. In our project it acts as server side streaming framework which receives video from android device and starts a streaming service which will be again consumed by webpage to display the video.

Wowza also comes with an admin panel called Wowza Media Engine Manager to control streaming channels, publishers and other stuff. Unfortunately wowza is not a free software, you will have to buy a commercial license. But don’t worry, it comes with a trail period of 6 months which is more than enough for testing.

2.1 Registration
In order to use Wowa media engine you need to register and get a license key first. The key will be sent to your email address after the registration. So make sure that you entered a valid email address instead of abc@abc.com 🙂

Once you complete registration here, you can find the license key in the email.

wowza registration license key android

2.2 Downloading & Installing
1. Download Wowza Media Engine from here
2. Run the installer and enter the license key when it asks for it.

2.3 Creating publisher username and password
Once wowza installed, open Wowza Streaming Engine Manager from Start => All Programs. This opens up an admin panel in the browser. While streaming from android mobile, the streaming video needs to be authenticated with Wowza before start decoding it. So we need to create a publisher username and password first. These credentials we will use in our android app later.

To create a publisher, click on Server ⇒ Publisher ⇒ Add Publisher and enter credentials.

wowza creating publisher android video streaming
wowza creating publisher android video streaming

2.4 Creating streaming channel
You can create your own streaming url in the admin panel. But Wowza already creates a channel(app) for you named live. I am going to use the same app in this tutorial. If you want, you can create your own.

Here we completes wowza setup. Now let’s start the android project.

3. Creating Android project

1. In Eclipse create a new project by navigating to File ⇒ New ⇒ Android Application Project and fill required details.

2. Now import the downloaded libstreaming project into your Eclipse workspace. File ⇒ Import ⇒ Android ⇒ Existing Android Code Into Workspace and browse to libstreaming.

3. Now add the libstreaming project as a library project to our project. Right click on our project ⇒ Properties. It will open up a dialog window. On the left select Android and on the Right under Library add libstreaming project.

android libstreaming library

4. As we are accessing the camera, we need to add the permissions in AndroidManifest.xml first. Add INTERNET, WRITE_EXTERNAL_STORAGE, RECORD_AUDIO, CAMERA permissions in your mainifest file.

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="info.androidhive.androidvideostreaming"
    android:versionCode="1"
    android:versionName="1.0" >

    <uses-sdk
        android:minSdkVersion="8"
        android:targetSdkVersion="18" />

    <uses-feature
        android:name="android.hardware.camera"
        android:required="true" />
    <uses-feature
        android:name="android.hardware.camera.autofocus"
        android:required="false" />

    <supports-screens
        android:largeScreens="true"
        android:normalScreens="true"
        android:smallScreens="true"
        android:xlargeScreens="true" />

    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.RECORD_AUDIO" />
    <uses-permission android:name="android.permission.CAMERA" />

    <application
        android:allowBackup="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme" >
        <activity
            android:name="info.androidhive.androidvideostreaming.MainActivity"
            android:label="@string/app_name"
            android:screenOrientation="landscape" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>

</manifest>

5. Open the activity layout file main activity and add the following content (My layout file name activity_main.xml). Here we are adding libstreaming surfaceview for camera preview.

<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/surface_layout"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:layout_alignParentLeft="true"
    android:layout_alignParentTop="true"
    android:background="@android:color/black" >

    <net.majorkernelpanic.streaming.gl.SurfaceView
        android:id="@+id/surface"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="center" />

</FrameLayout>

6. Now I am creating a class to keep wowza configuration values like streaming url, publisher username and password. Create a class named AppConfig.java and add the following. Replace the streaming url (keep your PC ip address), username and password with your wowza details.

public class AppConfig {
	public static final String STREAM_URL = "rtsp://192.168.43.233:1935/live/android_test";
	public static final String PUBLISHER_USERNAME = "ravi";
	public static final String PUBLISHER_PASSWORD = "passtemp";
}

7. Open your main activity class and implement the class from RtspClient.Callback, Session.Callback, SurfaceHolder.Callback and initialize required variables and class instances.

public class MainActivity extends Activity implements RtspClient.Callback,
		Session.Callback, SurfaceHolder.Callback {
import net.majorkernelpanic.streaming.Session;
import net.majorkernelpanic.streaming.gl.SurfaceView;
import net.majorkernelpanic.streaming.rtsp.RtspClient;
import android.app.Activity;
import android.os.Bundle;
import android.view.SurfaceHolder;
import android.view.Window;
import android.view.WindowManager;

public class MainActivity extends Activity implements RtspClient.Callback,
		Session.Callback, SurfaceHolder.Callback {

	// log tag
	public final static String TAG = MainActivity.class.getSimpleName();

	// surfaceview
	private static SurfaceView mSurfaceView;

	// Rtsp session
	private Session mSession;
	private static RtspClient mClient;
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
		// getWindow().addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
		requestWindowFeature(Window.FEATURE_NO_TITLE);

		setContentView(R.layout.activity_main);

		mSurfaceView = (SurfaceView) findViewById(R.id.surface);

		mSurfaceView.getHolder().addCallback(this);

		// Initialize RTSP client
		initRtspClient();
	}

	@Override
	protected void onResume() {
		super.onResume();
		
		toggleStreaming();
	}
	
	@Override
	protected void onPause(){
		super.onPause();
		
		toggleStreaming();
	}

	@Override
	public void surfaceChanged(SurfaceHolder arg0, int arg1, int arg2, int arg3) {
	}

	@Override
	public void surfaceCreated(SurfaceHolder arg0) {

	}

	@Override
	public void surfaceDestroyed(SurfaceHolder holder) {

	}

	@Override
	public void onBitrareUpdate(long bitrate) {

	}

	@Override
	public void onSessionError(int reason, int streamType, Exception e) {

	}

	@Override
	public void onPreviewStarted() {

	}

	@Override
	public void onSessionConfigured() {

	}

	@Override
	public void onSessionStarted() {

	}

	@Override
	public void onSessionStopped() {

	}

	@Override
	public void onRtspUpdate(int message, Exception exception) {

	}
}

8. initRtspClient() will initialize Rtsp client which takes care of streaming video to wowza media server. Add the following code in your main activity. toggleStreaming() takes care of toggling video stream on/off. Finally in OnDestroy() method we have to release rtsp client, session and surfaceview.

private void initRtspClient() {
		// Configures the SessionBuilder
		mSession = SessionBuilder.getInstance()
				.setContext(getApplicationContext())
				.setAudioEncoder(SessionBuilder.AUDIO_NONE)
				.setAudioQuality(new AudioQuality(8000, 16000))
				.setVideoEncoder(SessionBuilder.VIDEO_H264)
				.setSurfaceView(mSurfaceView).setPreviewOrientation(0)
				.setCallback(this).build();

		// Configures the RTSP client
		mClient = new RtspClient();
		mClient.setSession(mSession);
		mClient.setCallback(this);
		mSurfaceView.setAspectRatioMode(SurfaceView.ASPECT_RATIO_PREVIEW);
		String ip, port, path;

		// We parse the URI written in the Editext
		Pattern uri = Pattern.compile("rtsp://(.+):(\\d+)/(.+)");
		Matcher m = uri.matcher(AppConfig.STREAM_URL);
		m.find();
		ip = m.group(1);
		port = m.group(2);
		path = m.group(3);

		mClient.setCredentials(AppConfig.PUBLISHER_USERNAME,
				AppConfig.PUBLISHER_PASSWORD);
		mClient.setServerAddress(ip, Integer.parseInt(port));
		mClient.setStreamPath("/" + path);
	}

	private void toggleStreaming() {
		if (!mClient.isStreaming()) {
			// Start camera preview
			mSession.startPreview();

			// Start video stream
			mClient.startStream();
		} else {
			// already streaming, stop streaming
			// stop camera preview
			mSession.stopPreview();

			// stop streaming
			mClient.stopStream();
		}
	}

	@Override
	public void onDestroy() {
		super.onDestroy();
		mClient.release();
		mSession.release();
		mSurfaceView.getHolder().removeCallback(this);
	}

Complete Code
Following is the full code of my main activity.

package info.androidhive.androidvideostreaming;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

import net.majorkernelpanic.streaming.Session;
import net.majorkernelpanic.streaming.SessionBuilder;
import net.majorkernelpanic.streaming.audio.AudioQuality;
import net.majorkernelpanic.streaming.gl.SurfaceView;
import net.majorkernelpanic.streaming.rtsp.RtspClient;
import net.majorkernelpanic.streaming.video.VideoQuality;
import android.app.Activity;
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.os.Bundle;
import android.view.Menu;
import android.view.SurfaceHolder;
import android.view.Window;
import android.view.WindowManager;

public class MainActivity extends Activity implements RtspClient.Callback,
		Session.Callback, SurfaceHolder.Callback {
	// log tag
	public final static String TAG = MainActivity.class.getSimpleName();

	// surfaceview
	private static SurfaceView mSurfaceView;

	// Rtsp session
	private Session mSession;
	private static RtspClient mClient;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
		// getWindow().addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
		requestWindowFeature(Window.FEATURE_NO_TITLE);

		setContentView(R.layout.activity_main);

		mSurfaceView = (SurfaceView) findViewById(R.id.surface);

		mSurfaceView.getHolder().addCallback(this);

		// Initialize RTSP client
		initRtspClient();		

	}

	@Override
	protected void onResume() {
		super.onResume();
		
		toggleStreaming();
	}
	
	@Override
	protected void onPause(){
		super.onPause();
		
		toggleStreaming();
	}

	private void initRtspClient() {
		// Configures the SessionBuilder
		mSession = SessionBuilder.getInstance()
				.setContext(getApplicationContext())
				.setAudioEncoder(SessionBuilder.AUDIO_NONE)
				.setAudioQuality(new AudioQuality(8000, 16000))				
				.setVideoEncoder(SessionBuilder.VIDEO_H264)
				.setSurfaceView(mSurfaceView).setPreviewOrientation(0)
				.setCallback(this).build();

		// Configures the RTSP client
		mClient = new RtspClient();
		mClient.setSession(mSession);
		mClient.setCallback(this);
		mSurfaceView.setAspectRatioMode(SurfaceView.ASPECT_RATIO_PREVIEW);
		String ip, port, path;

		// We parse the URI written in the Editext
		Pattern uri = Pattern.compile("rtsp://(.+):(\\d+)/(.+)");
		Matcher m = uri.matcher(AppConfig.STREAM_URL);
		m.find();
		ip = m.group(1);
		port = m.group(2);
		path = m.group(3);

		mClient.setCredentials(AppConfig.PUBLISHER_USERNAME,
				AppConfig.PUBLISHER_PASSWORD);
		mClient.setServerAddress(ip, Integer.parseInt(port));
		mClient.setStreamPath("/" + path);
	}

	private void toggleStreaming() {
		if (!mClient.isStreaming()) {
			// Start camera preview
			mSession.startPreview();

			// Start video stream
			mClient.startStream();
		} else {
			// already streaming, stop streaming
			// stop camera preview
			mSession.stopPreview();

			// stop streaming
			mClient.stopStream();
		}
	}

	@Override
	public void onDestroy() {
		super.onDestroy();
		mClient.release();
		mSession.release();
		mSurfaceView.getHolder().removeCallback(this);
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		getMenuInflater().inflate(R.menu.main, menu);
		return true;
	}

	@Override
	public void onSessionError(int reason, int streamType, Exception e) {
		switch (reason) {
		case Session.ERROR_CAMERA_ALREADY_IN_USE:
			break;
		case Session.ERROR_CAMERA_HAS_NO_FLASH:
			break;
		case Session.ERROR_INVALID_SURFACE:
			break;
		case Session.ERROR_STORAGE_NOT_READY:
			break;
		case Session.ERROR_CONFIGURATION_NOT_SUPPORTED:
			break;
		case Session.ERROR_OTHER:
			break;
		}

		if (e != null) {
			alertError(e.getMessage());
			e.printStackTrace();
		}
	}

	private void alertError(final String msg) {
		final String error = (msg == null) ? "Unknown error: " : msg;
		AlertDialog.Builder builder = new AlertDialog.Builder(MainActivity.this);
		builder.setMessage(error).setPositiveButton("Ok",
				new DialogInterface.OnClickListener() {
					public void onClick(DialogInterface dialog, int id) {
					}
				});
		AlertDialog dialog = builder.create();
		dialog.show();
	}

	@Override
	public void onRtspUpdate(int message, Exception exception) {
		switch (message) {
		case RtspClient.ERROR_CONNECTION_FAILED:
		case RtspClient.ERROR_WRONG_CREDENTIALS:
			alertError(exception.getMessage());
			exception.printStackTrace();
			break;
		}
	}

	@Override
	public void onPreviewStarted() {
	}

	@Override
	public void onSessionConfigured() {
	}

	@Override
	public void onSessionStarted() {
	}

	@Override
	public void onSessionStopped() {
	}

	@Override
	public void surfaceChanged(SurfaceHolder arg0, int arg1, int arg2, int arg3) {
	}

	@Override
	public void surfaceCreated(SurfaceHolder holder) {
	}

	@Override
	public void surfaceDestroyed(SurfaceHolder holder) {
	}

	@Override
	public void onBitrareUpdate(long bitrate) {
	}

}

Now we are done with our android application. Let’s create a web application which displays the streaming video on web page.

4. Creating web app

4.1 Installing WAMP:
I have already explained lot of times what is WAMP and it’s use (here & here). Download and Install WAMP from http://www.wampserver.com/en/ and start the program from Start => All Programs. Once started, you should be able to access http://localhost/ in the browser.

4.2 jWPlayer
On the web page to play streamed I am using jwplayer which supports RTMP protocol. jwplayer is a flash player with javascript API enabled which means you can control the player with javascript methods.

Create an account at http://www.jwplayer.com/sign-up/ and download the jWplayer. Once you login into jwplayer.com, you can download a copy from https://account.jwplayer.com/#/account. Click on Download Self-Hosted Player at the bottom of the page.

1. Now create a folder in your wamp/www directory (Normally wamp will be located at C:/wamp). I am creating a folder named wowza_web_app inside www.

2. Inside wowza_web_app create two more folders named css and js.

3. Paste jwplayer files inside js folder. You have to copy jwplayer.js, jwplayer.html5.js and jwplayer.flash.swf. Also paste jquery-1.9.1.min. Download jquery from here

4. Create an html file named index.html in wowza_web_app and paste the following content. This page will have jwplayer and other UI to play and stop streaming video.

<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <title>Android Video Streaming</title>
        <script src="js/jquery-1.9.1.min.js" type="text/javascript"></script>
        <script type="text/javascript" src="js/jwplayer.js"></script>       
        <script src="js/player.js" type="text/javascript"></script>
        <script>jwplayer.key = ""</script>
        <link rel="stylesheet" type="text/css" href="css/style.css" />       
    </head>

    <body>
        <!-- Header -->
        <div id="header">
            <div class="container">
                <h1>Android Video Streaming</h1>
            </div>
        </div>
        <!-- ./Header -->

        <!-- Video Preview -->
        <div class="container">            
            <div id="video_preview">                    
                <div id="player"></div><div class="clear"></div>
                <br/><br/><br/>
                <input type="text" id="stream_url" value="rtmp://192.168.43.233:1935/live/android_test"/><br/>
                <input type="button" id="btn_start" class="" value="Start" />
                <input type="button" id="btn_stop" class="" value="Stop"/>
            </div>
            <div class="clear"></div>
        </div>
        <!-- ./Video Preview -->

        <div class="container">
            <div class="info"><p>
                    Tutorial: <a href="#">https://www.androidhive.info/?p=4449&preview=true</a><br/>
                    <a href="http://www.wowza.com/">Wowza Media Engine</a><br/>
                    Thanks <a href="Fyhertz">@Fyhertz</a> for <a href="https://github.com/fyhertz/libstreaming">libstreaming</a><br/>
                    www.androidhive.info
                </p>
            </div>
        </div>
    </body>
</html>

5. Inside css folder create a file named style.css and paste the following styles.

/* 
    Document   : style
    Created on : May 31, 2014, 2:09:28 AM
    Author     : Ravi Tamada    
*/

body { 
    padding:0;
    margin: 0;
}
.clear{
    clear: both;
}
.container{
    width: 1100px;
    margin: 0 auto;
    padding: 0;
}
#header{
    text-align: left; 
    box-shadow: 0px 3px 3px #e3e3e3;
}
#header h1{
    font:normal 35px arial;
    color: #ed4365;
    margin: 0;
    padding: 15px 0;
}
#video_preview{
    text-align: center;
}
#player, #player_wrapper{
    margin: 0 auto !important;
    margin-bottom: 20px !important;
    margin-top: 60px !important;    
}
input#stream_url{
    background: none;
    border: 2px solid #92d07f;
    outline: none;
    padding: 5px 10px;
    font: 18px arial;
    color: #666;
    width: 600px;
    text-align: center;
}
#btn_start, #btn_stop{
    padding: 8px 30px;
    color: #fff;
    border: none;
    outline: none;
    font: normal 16px arial;
    border-radius: 6px;
    cursor: pointer;
    margin-top: 15px;
}
#btn_start{
    background: #3bbe13;    
}
#btn_stop{
    background: #e6304f;   
}
.info{
    margin-top: 80px;
    text-align: center;    
    font:normal 13px verdana;
}
.info p{
    line-height: 25px;
}
.info a{
    color: #f05539;
}

6. Create player.js file inside js folder and paste following javascript. This script takes care of initializing jwplayer and other button click events.

var data = [];
var jw_width = 640, jw_height = 360;

// Outputs some logs about jwplayer
function print(t, obj) {
    for (var a in obj) {
        if (typeof obj[a] === "object")
            print(t + '.' + a, obj[a]);
        else
            data[t + '.' + a] = obj[a];
    }
}

$(document).ready(function() {

    jwplayer('player').setup({
        wmode: 'transparent',
        width: jw_width,
        height: jw_height,
        stretching: 'exactfit'
    });

    $('#btn_start').click(function() {
        startPlayer($('#stream_url').val());
    });

    $('#btn_stop').click(function() {
        jwplayer('player').stop();
    });



    startPlayer($('#stream_url').val());
});

// Starts the flash player
function startPlayer(stream) {

    jwplayer('player').setup({
        height: jw_height,
        width: jw_width,
        stretching: 'exactfit',
        sources: [{
                file: stream
            }],
        rtmp: {
            bufferlength: 3
        }
    });

    jwplayer("player").onMeta(function(event) {
        var info = "";
        for (var key in data) {
            info += key + " = " + data[key] + "<BR>";
        }
        print("event", event);
    });

    jwplayer('player').play();
}

7. Now if you access http://localhost/wowza_web_app/index.html in browser, the page should render like below.

android video streaming using wowza media engine

Testing the app (localhost)

Start Wowza Enginer Mangaer from Start => All Programs. Once started you should able to access http://localhost:8088/enginemanager/ in PC browser.

Make sure that the mobile and the PC are in the same wifi network.

Use Android Terminal Emulator app to check communication between mobile and PC. If you execute “ping pc_ip_address“, you should receive some data.

Try accessing http://your_pc_ip_address:8088/enginemanager/ in mobile browser. You should see wowza engine manager home page.

Once you are sure that the PC and mobile are in the same network, open both the apps (android & web) and click on Start in web page. You should able to see camera video streamed to webpage.

Exploring the libstreaming

The android app that I have created in this tutorial is very simple which lacks of lot options like start/stop video stream, changing video quality, using camera flash, using front and rare cameras. My intention was to make it as much as simple, so that every beginner can understands it. But the example given by libstreaming covers all these advanced options.

Download the Example3 and do explore yourself.

Hosting the wowza server (going live)

If you are serious about going the app to be public where anybody can stream their camera video over intenet, you need to host the Wowza engine on a server. The following links will gives you a hosting solution to host Wowza Media Engine (personally I haven’t tried though).

Google Cloud Platform Hosting
http://googlecloudplatform.blogspot.in/2013/12/you-can-now-deliver-any-screen.html

Wowza Featured Service Providers
http://www.wowza.com/customers

Ravi is hardcore Android programmer and Android programming has been his passion since he compiled his first hello-world program. Solving real problems of Android developers through tutorials has always been interesting part for him.
  • EhteshamMehmood

    Its Awsome 🙂

  • Prathap

    Ravi
    Rocks..

  • great post sir!

  • siddhu

    guruji u are great

  • Sara M

    Thanks for the post!

    I have a question: Can you record video in sd card and stream to the server at the same time?

    • Yes, we can. But we have to do the changes in libstreaming library.

      • Sara M

        I have been checking libstreaming library and I saw that it makes some recording test into mp4 file in order to know if this format is supported.
        Can you give me some orientation of which part of library code would I have to change to record and stream?

        Thank you very much

        • I’ll look into it and let you know.

          • Sara M

            Thank you!

  • Venkata Prasad

    This application not working in my device. I am using 2.3 version device.

    I am getting this error:

    java.lang.RuntimeException: Unable to start activity ComponentInfo{info.androidhive.androidvideostreaming/info.androidhive.androidvideostreaming.MainActivity}: android.view.InflateException: Binary XML file line #9: Error inflating class net.majorkernelpanic.streaming.gl.SurfaceView

    please tell why this error came.

    Thanks,

    • Did you tried downloading code and run on your device?

  • Ahsan

    Ravi,
    I have read this tutorial carefully and successfully installed Wowza Engine and also create publisher. Updated my Stream Url, Publisher_Username and password in AppConfig.java file according to my engine account.
    Also updated RTMP address in index.html file.

    RTMP url: “rtmp://192.168.79.1:1935/live/android_test”
    Stream Url: rtsp://192.168.79.1:1935/live/android_test

    and now trying to run this application but i’m getting multiple errors;
    I’m getting camera view in my device but also getting these errors.

    In android App:

    1-

    A/CodecManager(12113): null
    A/CodecManager(12113): java.lang.IllegalArgumentException
    A/CodecManager(12113): at android.media.MediaCodecList.getCodecCapabilities(Native Method)
    A/CodecManager(12113): at android.media.MediaCodecInfo.getCapabilitiesForType(MediaCodecInfo.java:211)
    A/CodecManager(12113): at net.majorkernelpanic.streaming.hw.CodecManager.findEncodersForMimeType(CodecManager.java:76)
    A/CodecManager(12113): at net.majorkernelpanic.streaming.hw.EncoderDebugger.debug(EncoderDebugger.java:192)
    A/CodecManager(12113): at net.majorkernelpanic.streaming.hw.EncoderDebugger.debug(EncoderDebugger.java:115)
    A/CodecManager(12113): at net.majorkernelpanic.streaming.video.H264Stream.testMediaCodecAPI(H264Stream.java:132)
    A/CodecManager(12113): at net.majorkernelpanic.streaming.video.H264Stream.testH264(H264Stream.java:119)
    A/CodecManager(12113): at net.majorkernelpanic.streaming.video.H264Stream.configure(H264Stream.java:111)
    A/CodecManager(12113): at net.majorkernelpanic.streaming.Session.syncConfigure(Session.java:395)
    A/CodecManager(12113): at net.majorkernelpanic.streaming.rtsp.RtspClient$4.run(RtspClient.java:242)
    A/CodecManager(12113): at android.os.Handler.handleCallback(Handler.java:615)
    A/CodecManager(12113): at android.os.Handler.dispatchMessage(Handler.java:92)
    A/CodecManager(12113): at android.os.Looper.loop(Looper.java:137)
    A/CodecManager(12113): at android.os.HandlerThread.run(HandlerThread.java:60)

    2-
    OMXNodeInstance(12113): OMX_GetExtensionIndex failed

    3-
    java.lang.RuntimeException: The decoder did not decode anything.

    4-
    EncoderDebugger(12113): No usable encoder were found on the phone for resolution 176×144
    H264Stream(12113): Resolution not supported with the MediaCodec API, we fallback on the old streamign method.

    On JWPlayer:

    1-
    Error loading stream: ID not found on server.

    And after few minutes application shows dialog “failed to connect to /192.168.79.1 (port 1935): connection failed: ETIMEDOUT (Connection timed out)”

    Please let me know if i’m wrong on any point.
    Looking for your response.

    Regrads;

  • samuel

    Help, don’t know while? liveStream folder (gl and video package) keep showing error after importing it to my work space… please help!

    • Did you added libstreaming project as library project?

  • Ajay

    I am getting this Exception..

    06-03 16:53:13.134: E/AndroidRuntime(23151): FATAL EXCEPTION: main

    06-03 16:53:13.134: E/AndroidRuntime(23151): Process: com.emavnes.androidstreamproject, PID: 23151

    06-03 16:53:13.134: E/AndroidRuntime(23151): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.emavnes.androidstreamproject/com.emavnes.androidstreamproject.MainActivity}: java.lang.IllegalStateException: No successful match so far

    06-03 16:53:13.134: E/AndroidRuntime(23151): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2209)

    06-03 16:53:13.134: E/AndroidRuntime(23151): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2269)

    06-03 16:53:13.134: E/AndroidRuntime(23151): at android.app.ActivityThread.access$800(ActivityThread.java:139)

    06-03 16:53:13.134: E/AndroidRuntime(23151): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1210)

    06-03 16:53:13.134: E/AndroidRuntime(23151): at android.os.Handler.dispatchMessage(Handler.java:102)

    06-03 16:53:13.134: E/AndroidRuntime(23151): at android.os.Looper.loop(Looper.java:136)

    06-03 16:53:13.134: E/AndroidRuntime(23151): at android.app.ActivityThread.main(ActivityThread.java:5102)

    06-03 16:53:13.134: E/AndroidRuntime(23151): at java.lang.reflect.Method.invokeNative(Native Method)

    06-03 16:53:13.134: E/AndroidRuntime(23151): at java.lang.reflect.Method.invoke(Method.java:515)

    06-03 16:53:13.134: E/AndroidRuntime(23151): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785)

    06-03 16:53:13.134: E/AndroidRuntime(23151): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)

    06-03 16:53:13.134: E/AndroidRuntime(23151): at dalvik.system.NativeStart.main(Native Method)

    06-03 16:53:13.134: E/AndroidRuntime(23151): Caused by: java.lang.IllegalStateException: No successful match so far

    06-03 16:53:13.134: E/AndroidRuntime(23151): at java.util.regex.Matcher.ensureMatch(Matcher.java:596)

    06-03 16:53:13.134: E/AndroidRuntime(23151): at java.util.regex.Matcher.group(Matcher.java:357)

    06-03 16:53:13.134: E/AndroidRuntime(23151): at com.emavnes.androidstreamproject.MainActivity.initRtspClient(MainActivity.java:71)

    06-03 16:53:13.134: E/AndroidRuntime(23151): at com.emavnes.androidstreamproject.MainActivity.onCreate(MainActivity.java:41)

    06-03 16:53:13.134: E/AndroidRuntime(23151): at android.app.Activity.performCreate(Activity.java:5248)

    06-03 16:53:13.134: E/AndroidRuntime(23151): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1110)

    06-03 16:53:13.134: E/AndroidRuntime(23151): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2173)

    06-03 16:53:13.134: E/AndroidRuntime(23151): … 11 more

    • Check whether you kept your streaming url correctly or not

  • Ajay

    hey i solve my problem missing port no. in url,
    nice tutorial ravi keep it up budy..

  • waren

    Hello,
    I followed step by step this tutorial , however when i launch index.htm , i face this error : “Error loading player offline playback not supported” , then i downloaded your code source and the problem persists.

    and thank you very much for this tutorial (excuse my english , i’m not fluent yet in)

    • Ajay

      check your wamp server is started correctly or not.
      If it status in green color than it is ok. else start your wamp server.

    • I guess you opened the index.html in the browser directly instead of opening it from wamp. The page should be opened through wamp server.

  • Siva

    It captures the video,after 3 secs it shows Error 100. Media server died error in the LogCat .

  • Kevin

    06-04 11:34:26.379: E/dalvikvm(3945): Could not find class ‘net.majorkernelpanic.streaming.gl.SurfaceView’, referenced from method info.androidhive.androidvideostreaming.MainActivity.onCreate
    Run your code on Android 2.3
    I imported “libstreaming” into “AndroidVideoStreaming” but it also have this error ?

  • jai mishra

    Hi Ravi . First I would like to congrats. It is great tutorial. I got error i thing my wamp server is not working . I am getting error Error loading player offline playback not supported. i have seen discussion. Wamp is not showing green . Its red. Please help how to start this from wamp. I did all step but I am getting error here.

  • andre

    Can this be use to stream directly to another android device within a app? Not by a broswer

  • Nguyen Khoa

    Hi Ravi! when i launch index.htm i got this error: “Error loading stream, could not connect to server”, please help me, thanks!

  • lord med

    It is possible to open the web page from phone (http://pc_ip/folder/index.html)?

  • priyanka das

    Hey ravi! when im launching the index.html from wamp, i got this error Error loading stream, could not connect to server”, and my android device hangs…. can u pls provide a solution to this problem as early as possible…

  • Great tutorial….
    cpn-dev.com

  • Guest

    Hey ravi! I saw your post, but unable to download, when I click on “Download Code”..its just loading and say”No data received”..

  • Nilay Sheth

    It gives me following Warning:

    06-10 15:53:10.327: W/System.err(15080): java.lang.RuntimeException: Failed to decode NALs from the encoder.

    06-10 15:53:10.327: W/System.err(15080): at net.majorkernelpanic.streaming.hw.EncoderDebugger.debug(EncoderDebugger.java:258)

    06-10 15:53:10.337: W/System.err(15080): at net.majorkernelpanic.streaming.hw.EncoderDebugger.debug(EncoderDebugger.java:115)

    06-10 15:53:10.337: W/System.err(15080): at net.majorkernelpanic.streaming.video.H264Stream.testMediaCodecAPI(H264Stream.java:132)

    06-10 15:53:10.337: W/System.err(15080): at net.majorkernelpanic.streaming.video.H264Stream.testH264(H264Stream.java:119)

    06-10 15:53:10.337: W/System.err(15080): at net.majorkernelpanic.streaming.video.H264Stream.configure(H264Stream.java:111)

    06-10 15:53:10.337: W/System.err(15080): at net.majorkernelpanic.streaming.Session.syncConfigure(Session.java:408)

    06-10 15:53:10.337: W/System.err(15080): at net.majorkernelpanic.streaming.rtsp.RtspClient$4.run(RtspClient.java:242)

    06-10 15:53:10.337: W/System.err(15080): at android.os.Handler.handleCallback(Handler.java:615)

    06-10 15:53:10.337: W/System.err(15080): at android.os.Handler.dispatchMessage(Handler.java:92)

    06-10 15:53:10.337: W/System.err(15080): at android.os.Looper.loop(Looper.java:155)

    06-10 15:53:10.337: W/System.err(15080): at android.os.HandlerThread.run(HandlerThread.java:60)

    I am not getting audio on my end. i don’t know if that’s relevant !!

    • Nilay Sheth

      Hi Ravi, can you please look at my issue as I am running in a bit of deadline and I can’t achieve success with Video broadcasting. Your tutorial is the giving me video on my end in other Android/iOS devices but i am unable to still fetch audio. Please help me with this little issue.Thanks a lot in advance.

  • samet

    everything ok. i can hear audio but i cant see anything. sometimes i can see something. but this time broken show object. why ?

  • Joseph Anand

    Great tutorial, thanks for doing this. If I wanted a permanent solution, what is a good free alternative to Wowza? I am just wifi streaming from android to laptop. Thanks again!

    • Check the example2 in libstreaming. You can use vlc player to stream from mobile to laptop.

    • Maria Papadopoulou

      Red5 is a free media server but you should check if it suits your needs and this (awesome) example.

  • tigani jaber

    ravi ineeeeeeeeeeeed your help ….i saved image to server then stored thier names in mysql iwant to retrivre them in listview how to do it………thanks in advance

  • Guest

    Sir access forbidden…

    • Er Siddharth Sahni

      me to face this problem

  • guest

    how to add stream dynamically, here we are creating stream manually just for one user, also for different user there will be different wowza server address, i checked for wowza server api but i didnt get anything, need some solution

    • Maria Papadopoulou

      In wowza server username and pass is not user authentication but it is used so you are authenticated to publish stream. If you want many users to publish stream you should include that option at server’s configuration file for publish. Is that what you asked?

  • question

    can you give brief explanation on how to run example2, got the ip address but how to create sdp file and run through vlc?

  • jaber

    Error loading stream: ID not found on server.

  • Denis Ladeira

    Ravi, Trank you for tutorial, I very appreciate your work. Greetings from Brazil.

  • lucky Rana

    Thanks a lot for such a great tutorials , Every time your tutorial come up with a great idea and with great work

  • Abdul Rahman Majeed

    it just buffering and display nothing ….

  • Abdul Rahman Majeed

    The JW Player not showing any stream JUst run preloader or showing Exception ID not found on server

  • Rajshekar Targar

    hey nice. thanks my question is now you are streaming from android to webpage. so can another mobile user connect to the webpage and watch it in his/her mobile?

  • Guillermo Gonzalez

    Nice tutorial Ravi, i only have a question or more than that a request, how can i do streaming between Android? i mean, one android send the stream video and audio to the server and other receive it…

  • neha

    http://your_pc_ip_address:8088/enginemanager/ not able to open in my mobile

  • neha

    The JW Player not showing any stream JUst run preloader or showing Exception ID not found on server http://your_pc_ip_address:8088/enginemanager/ not able to open in my mobile

    • Replace ‘your_pc_ip_address’ with your actual Ip address of your computer.

  • Guest

    what changed is to do if i have to publish on RTMP … eg….rtmp://XXXXXXXXXX:1935/live/android_test

  • Guest

    i have replaced rtsp with rtmp >> connection is established with wowza server but there is no any video data there on wowza i am getting

    Network Throughput

    Bytes In: 0 @ 0.000 bits/s

  • M.S.

    Can we use it to steam local video file from device ?

  • neha

    Sir thanks For replying ….. Sir I have done all the steps still getting connection lost message when i start Application

    • jitesh mohite

      sir i got error when i add libstreaming in my project

  • Chahit

    Can we use our servers as media engine ?? or any other way (without using wowza media engine).
    Kindly respond over chahit93@gmail.com

  • Nilay Sheth

    I am facing a weird scenario in that one. It works perfectly fine (can broadcast Video with Audio) for localhost links like rtsp://192.168.1.58:1935/live/myStream but it fails to Broadcast live links like rtsp://54.208.***.***:1935/live/myStream. It shows as playing in wowza server but I cannot see Video or hear Audio from that link.

    Please suggest a way to overcome this problem so that I can get Video and Audio at my end while boradcasting

    • Wish

      Hi All,
      I am also having same issue..please help me out.

    • Rajesh

      Having the same problem ….. did you find any solution for that.

  • rohit mudgal

    Thank you very much Ravi for the tutorial have been digging for the same since quite some time. It really helped me a lot, and I got everything working fine as per the tutorial. But I am stuck in quite a unique scenario, I need to record the video on the android phone also as well as rtsp it, but I cannot do it, the reason i guess is, that two processes cannot simultaneously access the camera, so since the rtsp process is consuming the camera, so the video recording process cannot. I would be really grateful if you can guide me for this.
    Thanks and regards Rohit Mudgal

  • Varo

    Great job mate. I have a requirement with my client to stream the video to another android device without an intermediary server like wowzza. Is there a tweak around doing this? Please let me know

    • Yeah, check libstreaming other example. You can build android app which works as client also. In other words which can receive a video stream from other device and play.

      • Varo

        Cheers. I did look at that library but couldn’t do much as I couldn’t find much documentation. Unfortunately I’m a beginner and honestly lost. Is it possible to achieve streaming from one android device to another without a server

  • Ejeu Emmanuel

    urgent help on a 1 day project android phone starts camera view but on wowza server no video viewed only id not found error hence phone not streaming to wowza

  • Satya

    I am getting “failed to connect to 192.168.1.110(port 1935): connect failed : ENETURNEACH(Network is unreachable)”.

    And mClient.isStreaming is giving false each and every time.
    How can I know whether the live video from camera to server is storing/streaming or not?

    Regards,
    satyanarayana.

    • Your mobile and pc should be in the same network.

      • imen

        Hello,
        My mobile and my pc are in the same network but i am getting the same error as Satya , help please and thanks!

  • Peter

    Hello:

    I need help with the java codes. I did everything like the tut said; but my MainActivity.java file have some errors:

    some lines say: R can not be resolved to a variable

    and in the onBitrareUpdate method, said: that the method must override or implements a supertype method. My java skills are null so please could anybody help me with this?

    thanks in advance…

    • Ocramot

      1) be sure to have the correct R import at the beginning of the file. If you’re using an IDE like Eclipse, the R file should be generated autoamtically. If it is not generated, then you must have some error in your xml files in the res directory.
      2) there is a typo in the code: replace the onBitrareUpdate function with onBitrateUpdate

  • Gaurav Mehra

    thanks

    • Guest

      How to check the channel id???

  • Gaurav Mehra

    Everything works fine but index .html shows id not found on server please reply asap i tried terminal for reply works fine and changed ip address to my ip address but it shows same problem please help asap

    • check the channel id. It should be same in both wowza and android app.

      • Iskander Islamov

        How “check the channel id”?

    • Rajesh

      try the test player it will try to run with the default channel id then copy that id and paste this to your android app now video should stream in test player.

    • softex

      Remember to paste the jwplayer licence key into index.html

  • Siddhant

    can i use apache tomcat instead of wowza?

  • Carmine Schipani

    Hi, I must do an android app for my school and I don’t know why it doesn’t run. It’s an app like yours (android live camera video to a webpage) can you help me?

  • S_noor

    I have tried to implement to implement the web application but i am getting not found “The requested URL /wowza_web_app/index.html was not found on this server.” i have added cs and jr folders to a folder in www and have copied all .jr files and .css files but i am not getting where i might possibly b wrong canyou please help
    Thanks

  • Nilay Sheth

    Hi Ravi,
    I have successfully integrated the code in my app and it works fab. Now, is it possible to convert it into Portrait mode ? As I want this to work in Portrait mode as well. Please give me any suggestions or links to help in this matter.

  • zacky

    The type MainActivity must implement the inherited abstract method Session.Callback.onBitrateUpdate(long)

    i still get this error, anybody can help me?

    • Ocramot

      there is a typo in the code: replace the onBitrareUpdate function with onBitrateUpdate

  • Guest

    after install of WowzaStreamingEngine-4.1.0.exe , at time of finish , it giving error dialod ,something like: wowza machine can not start within 30seconds. then how to open next step ?

  • nirav

    i got the error : “the wowza streaming engine manager didn’t start within thirty seconds.” at the end of the installation of WowzaStreamingEngine-4.1.0.exe, what is the solution of it ?

  • AKOTB

    Excellent work Ravi thank you. I have made this working on localhost, then I wanted to get live, and I gave my pc a static ip and opened all the relevant ports on my router and again worked perfectly. Now I wanted to get it on the cloud, I tried the free trials with hosters that have wowza 4 engine included, I tried 5 different hosters and with no luck I can’t connect and I get error 401 (bad credentials). Does anyone had a solution for this??

    • I am sure that your Wowza credentials are wrong.

      • AKOTB

        Not wrong at all. You can try it yourself: http://hosting-marketers.com/ order a free trial (no credit card needed). Please have a try and tell me why the 401?

        I even switched off the authentication on wowza engine and still same message.

      • Guest

        Did you delete my reply? why!

        • Guest

          Anyhow, the credentials are correct and anyway I switched off the authentication on server, could you please try this and reply to me? thanks

      • Guest

        Anyhow, the credentials are correct and anyway I switched off the authentication on server, could you please try this and reply to me? thanks Ravi

  • plestarselvanr

    Thank you very much Ravi. This is what exactly i’ve been looking for.
    But unfortunately, i got the following error when i try to run this app
    “The application androidvidestreaming has stopped unexpectedly.Please try again”
    Can you suggest what the hitch is that?

    • Ocramot

      Hello, I have no idea about what your hitch could be, but I suggest you to connect your device to the PC using a USB cable, and check the logcat using an IDE like Eclipse or AndroidStudio. Surely the logcat and the Stacktrace will contain some more useful hint. 😉

  • AKOTB

    Ravi, I managed to get connected with cloud.influxis.com but now I get this error on their server side:
    QTWriterUtils.loadForAppend[D:Contentew985kRecordingmystream_2014-09-24T17.50.35.mp4][index]: Bad atom length: -8
    QTWriterUtils.loadForAppend[D:Contentew985kRecordingmystream_2014-09-24T17.50.35.mp4][index]: MDAT Atom is missing

    Any suggestions? Thanks

  • Ocramot

    Hello Ravi, thank you for your wonderful tutorial.
    …anyway, i can not connect to the wowza streaming engine on my localhost: he keeps telling me that the connection is timed out.
    I am sure the server is up and reachable, i tested it as you suggested in the “Testing the app (localhost)” paragraph; yet I cannot connect using your application as is.
    Here is the stacktrace, any help would be appreciated. thanks!

    TEARDOWN rtsp://192.168.42.23:1935/live/myStream RTSP/1.0
    java.net.ConnectException: failed to connect to /192.168.42.23 (port 1935): connect failed: ETIMEDOUT (Connection timed out)
    at libcore.io.IoBridge.connect(IoBridge.java:114)
    at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:192)
    at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172)
    at java.net.Socket.startupSocket(Socket.java:567)
    at java.net.Socket.tryAllAddresses(Socket.java:128)
    at java.net.Socket.(Socket.java:178)
    at java.net.Socket.(Socket.java:150)
    at net.majorkernelpanic.streaming.rtsp.RtspClient.tryConnection(RtspClient.java:309)
    at net.majorkernelpanic.streaming.rtsp.RtspClient.access$7(RtspClient.java:307)
    at net.majorkernelpanic.streaming.rtsp.RtspClient$4.run(RtspClient.java:250)
    at android.os.Handler.handleCallback(Handler.java:733)
    at android.os.Handler.dispatchMessage(Handler.java:95)
    at android.os.Looper.loop(Looper.java:136)
    at android.os.HandlerThread.run(HandlerThread.java:61)
    Caused by: libcore.io.ErrnoException: connect failed: ETIMEDOUT (Connection timed out)
    at libcore.io.Posix.connect(Native Method)
    at libcore.io.BlockGuardOs.connect(BlockGuardOs.java:85)
    at libcore.io.IoBridge.connectErrno(IoBridge.java:127)
    at libcore.io.IoBridge.connect(IoBridge.java:112)
    … 13 more

  • Masoud

    I have FMS . Can I use it instead of Wowza?

  • pidos

    can i use ivideon server instead??
    kuza07@yahoo.com reply me tq…asap

  • kk

    Nice, job, and I have make this work locally by following your steps. However I found that the video have delay of almost 5 seconds which means once I change the camera of the phone, I can see the new frames after 5 seconds in PC. I wonder if it can be improved?

    • That completely depends on network data transfer speed.

  • Bilal Korir

    Great tutorial, I appreciate the efforts put into it.
    Thank you, I’ve learned a lot.

  • Pratik

    Android Hive is great , awesum wrks Ravi

  • Shannanigans

    I was wondering if you could host the web app as a google drive site. I suspect you could, but it would be interesting to see it in action.

  • Aditya Harikishan

    Hi Ravi,

    I am appreciating your for your work

    We’re working on to develop a live video stream application based on android mobile camera. I used RTMP and RTSP ports using WOWZA server. It is working fine with almost all branded mobiles successfully. When the event is created and started broadcasting of video, data is posting successfully to server. But coming to some particular model mobiles like Micromax, Lenovo and etc., the app is not able to post the data from camera. The error message will be like ‘Try again..’ and broadcast is not successful.

    As per my observation, the above said model mobiles are using MT65XX chipset. I tried on various mobiles using the same chipset and failed to broadcast the data. But other applications like Livestream, Ustream and working fine with these models.

    Can someone help me to solve the issue with the above models so that my application runs successfully on all model chipsets.

    Here is my application environment: Developed on android Ice cream sandwich (android 4.0) and it’ll supports ICS & above android environments Library file used while developing application “[B]libstreaming-4.0.jar[/B]”
    Thanks in advance.
    Aditya

    • No clue Aditya. I haven’t much worked on that library.

  • FunApp

    I have problem with running Wowza Streaming Engine Manager

    when I try to open it the browser say this page is not available .

    thanks

  • Ashish Singh

    Hi Ravi ,

    Thanks for this great blog.

    I am working on to develop a live video stream application based on android mobile camera. I am using RTMP port using WOWZA server. It is working fine.

    But i am facing a problem, Streaming is not working more than 5 hours, it get disconnected from WOWZA server. i need to develop application which should work in 24*7.

    I would be really grateful if you can guide me for this.

    Thanks

    • Даулетхан Султангазы

      Hello! What library did you use for rtmp publishing?

      • Ashish Singh

        I have used same library, which one is used above

        • Даулетхан Султангазы

          Oh, and it worked with rtmp ? Can you show example how to use it ?

          • Ashish Singh

            Above example is not working for you ? I have used above example and it is working for me

          • Даулетхан Султангазы

            Above library (Libstreaming) work with RTMP ? I thought it’s working only rtsp. Did you just replaced rtsp to rtmp ?

          • Ashish Singh

            Yes, I have replaced rtsp with rtmp and is working fine

          • Даулетхан Султангазы

            I need to try it. Thanks you.

          • Даулетхан Султангазы

            it’s not work for me. “Unable to resolve host rtmp://live.boomstream.com. No address associated with host name. Can you show me part of your code where you set rtmp address ?

          • Даулетхан Султангазы

            Its not working for me. Can you show part of your code where you set server address ?

  • Teraiya Mayur

    Hi Ravi,

    It works fine broadcasting for me. It crash in Android Version 2.2. So Please update me if anything is missing or else. Waiting for you replay.

  • vidhin dev

    Hi Ravi,

    Thanks for your tutorial

    I am working on to develop a live video stream application based on android mobile camera. I have downloaded your code while running the application it show the error
    Error:
    net.majorkernelpanic.streaming.exceptions.ConfNotSupportedException: invalid preview surface

    Any suggestion? I’m waiting for your reply….

  • tigermasksim

    Thank you, but It is successful with GoCoder android app, But not work with this android code and Libstreaming’s example3 code. The Network Throughput is all 0 at the Incoming Streams page of Wowza streamming engine manager.

    • Teraiya Mayur

      Hi

      I am also getting same issue . you got any solution yet ?

      • JasApp Time

        Hi,

        Have you found any solution. I am facing with the same issue. Even I try to use latest Library.

    • JasApp Time

      Hi,

      Have you found any sloution. I am facing with the same issue. Even I try to use latest Library.

  • megha

    Hi Ravi,

    I have successfully integrated the code in my app and it works fab. Now, is it possible to convert it into Portrait mode ? As I want this to work in Portrait mode as well. Please give me any suggestions or links to help in this matter.

    • Kirill

      Hi Megha,

      I wonder whether you were successful with converting the app to portrait mode. I am looking into similar problem. Specifically I am looking to the right way to crop captured image do that it stays landscape even when device is in portrait. (A way to avoid “vertical video” problem even when device is in portrait mode)

      Thanks!

  • Çağan

    Hosting the wowza server (going live)
    If you are serious about going the app to be public where anybody can stream their camera video over intenet, you need to host the Wowza engine on a server. The following links will gives you a hosting solution to host Wowza Media Engine (personally I haven’t tried though).

    I want to do at the above. How can i do that? How can i host wowza engine on a server? I just want that to allow my users on streaming live video using my app. Please help me 🙂

  • mmy

    Hi everyone!
    I have Start failed when run on real device, how to solve? thanks

  • Jerome

    Same here, the app crashes when deployed to Android device.

    • Aditi

      Yeah! I faced the same issue. Did you manage solving it?

  • ranjit rr

    hi there, i have done with everything but when i open the app on my phone it gives and error saying “start failed” please help me some one…

  • parth

    hey ravi can you help me …… i have an problem in connection with the phone to streaming angeen

  • parth

    any one who comlited the streamiung plz help me

  • anoop

    Hi Ravi & Guys, Do you know whats the latency observed (in wifi)? ofcourse it matters many other factors (bandwidth, load etc.). But just to know a rough value. I was able to get 5-6secs with other system in android + ubuntu server.

  • Toprak

    hi mate. + No sound practice settings section is not working

  • jignesh patel

    Source stream or file could not be found or access was denied

  • Pramudita

    Hi Ravi, I got these errors:

    E/Camera-JNI﹕ Null byte array!

    E/Camera-JNI﹕ Callback buffer was too small! Expected 115200 bytes, but got 38016 bytes!

    E/Camera-JNI﹕ Couldn’t allocate byte array for JPEG data

    E/VideoStream﹕ Symptom of the “Callback buffer was to small” problem…

    V/MediaCodecInputStream﹕ No buffer available…

    Could you please help me?

    • jingjong chen

      find the code mSession = SessionBuilder.getInstance() in MainActivity.java
      and add this:
      .setVideoQuality(new VideoQuality(320, 240, 20, 500000))

  • Gourav

    Can we change the camera front and back end during Streaming here?

    • H!s1

      use mSession.switchCamera();

  • pinakin kansara

    Hi Ravi ,This tutorial is great help to me ,
    I would like to know that instead of using wowza can we use VLC with same library.

    • Yes you can.

      • pinakin kansara

        Ravi i would also like to know that is it possible to handle multiple device broadcast using wowza on the web site .

        Like What i want to achieve is to make a app which allow multiple user to make live streaming at a time like more than 100 or 1000 users stream the video using the app & then people can access that stream from the site .

  • Nurlan

    How can I stream voice as well using this app?

    • H!s1

      By Will – Set SessionBuilder.AUDIO_NONE to SessionBuilder.AUDIO_AAC other than AUDIO_NONE in your activity.
      I have tested its working…

  • Nurlan

    I want to use desktop application with usb webcam instead android phone. Is it possible to rewrite android code to desktop app in java? If so can you please give some idea? Thanks!

  • Sourav

    If i want to see the livestreaming from another wifi zone then what is the solution? Please reply ASAP

  • will

    Great stuff man, thanks. For anyone not getting audio see the SessionBuilder creation in your activity, you need: .setAudioEncoder(SessionBuilder.AUDIO_AAC) or any setting other than AUDIO_NONE

  • Mahek

    what can i use instead of jwplayer

  • Mahesh

    Hi Ravi ,

    i am getting the following error while login

    Wowza Streaming Engine Manager could not connect to the Wowza Steaming Engine (http://localhost:8087). Verify that the Wowza Streaming Engine service has started and is running.

    • H!s1

      Do exactly what this msg says… If you are on Windows Go to-> Task Manager-> See if your Wowza Streaming Engine service is running.. If Not then start it manually.
      If you are working on Linux, Start services using terminal.

  • Bhavik Rajpura

    Hi,

    Thanks for sharing this code . I have use this project but I have run time error. my logcat is bellow.

    03-17 03:21:31.075: W/ActivityThread(2358): Application info.androidhive.androidvideostreaming is waiting for the debugger on port 8100…

    03-17 03:21:31.295: I/System.out(2358): Sending WAIT chunk

    03-17 03:21:32.135: I/dalvikvm(2358): Debugger is active

    03-17 03:21:32.335: I/System.out(2358): Debugger has connected

    03-17 03:21:32.335: I/System.out(2358): waiting for debugger to settle…

    03-17 03:21:32.535: I/System.out(2358): waiting for debugger to settle…

    03-17 03:21:32.765: I/System.out(2358): waiting for debugger to settle…

    03-17 03:21:33.025: I/System.out(2358): waiting for debugger to settle…

    03-17 03:21:33.225: I/System.out(2358): waiting for debugger to settle…

    03-17 03:21:33.435: I/System.out(2358): waiting for debugger to settle…

    03-17 03:21:33.645: I/System.out(2358): waiting for debugger to settle…

    03-17 03:21:33.845: I/System.out(2358): waiting for debugger to settle…

    03-17 03:21:34.055: I/System.out(2358): waiting for debugger to settle…

    03-17 03:21:34.245: I/System.out(2358): waiting for debugger to settle…

    03-17 03:21:34.475: I/System.out(2358): waiting for debugger to settle…

    03-17 03:21:34.675: I/System.out(2358): waiting for debugger to settle…

    03-17 03:21:34.875: I/System.out(2358): debugger has settled (1457)

    03-17 03:21:37.515: I/MediaStream(2358): Phone supports the MediaCoded API

    03-17 03:21:37.515: D/AACStream(2358): AAC supported on this phone

    03-17 03:21:39.675: D/dalvikvm(2358): GC_FOR_ALLOC freed 75K, 5% free 3137K/3276K, paused 298ms, total 298ms

    03-17 03:21:40.405: D/RtspClient(2358): Connecting to RTSP server…

    03-17 03:21:41.075: I/Choreographer(2358): Skipped 77 frames! The application may be doing too much work on its main thread.

    03-17 03:21:43.805: D/VideoStream(2358): Surface Changed !

    03-17 03:21:43.855: I/Choreographer(2358): Skipped 1739 frames! The application may be doing too much work on its main thread.

    03-17 03:21:44.165: V/VideoQuality(2358): Supported resolutions: 640×480, 352×288, 320×240

    03-17 03:21:44.205: V/VideoQuality(2358): Resolution modified: 176×144->320×240

    03-17 03:21:44.225: V/VideoQuality(2358): Supported frame rates: 0-0fps

    03-17 03:21:44.265: D/gralloc_goldfish(2358): Emulator without GPU emulation detected.

    03-17 03:21:45.265: I/Choreographer(2358): Skipped 347 frames! The application may be doing too much work on its main thread.

    03-17 03:21:46.375: I/OMXClient(2358): Using client-side OMX mux.

    03-17 03:21:46.645: I/SoftAVCEncoder(2358): Construct SoftAVCEncoder

    03-17 03:21:47.475: I/OMXClient(2358): Using client-side OMX mux.

    03-17 03:21:47.685: E/OMXNodeInstance(2358): OMX_GetExtensionIndex OMX.google.android.index.storeMetaDataInBuffers failed

    03-17 03:21:47.685: W/OMXNodeInstance(2358): OMX_GetExtensionIndex OMX.google.android.index.prepareForAdaptivePlayback failed

    03-17 03:21:48.725: D/dalvikvm(2358): GC_FOR_ALLOC freed 47K, 3% free 3602K/3712K, paused 727ms, total 787ms

    03-17 03:21:49.245: D/dalvikvm(2358): GC_FOR_ALLOC freed 2K, 3% free 3602K/3712K, paused 507ms, total 509ms

    03-17 03:21:49.245: I/dalvikvm-heap(2358): Grow heap (frag case) to 5.775MB for 2304016-byte allocation

    03-17 03:21:49.925: D/dalvikvm(2358): GC_FOR_ALLOC freed <1K, 2% free 5852K/5964K, paused 583ms, total 583ms

    03-17 03:23:29.865: D/dalvikvm(2358): GC_FOR_ALLOC freed <1K, 2% free 5852K/5964K, paused 492ms, total 492ms

    03-17 03:23:29.865: I/dalvikvm-heap(2358): Grow heap (frag case) to 7.972MB for 2304016-byte allocation

    03-17 03:24:01.945: D/dalvikvm(2358): GC_FOR_ALLOC freed 0K, 2% free 8102K/8216K, paused 428ms, total 428ms

    03-17 03:24:02.235: I/OMXClient(2358): Using client-side OMX mux.

    03-17 03:24:02.345: I/SoftAVCEncoder(2358): Construct SoftAVCEncoder

    03-17 03:24:02.665: E/SoftAVCEncoder(2358): internalSetParameter: StoreMetadataInBuffersParams.nPortIndex not zero!

    03-17 03:24:02.665: E/OMXNodeInstance(2358): OMX_SetParameter() failed for StoreMetaDataInBuffers: 0x80001001

    03-17 03:24:02.675: E/ACodec(2358): [OMX.google.h264.encoder] storeMetaDataInBuffers (output) failed w/ err -2147483648

    03-17 03:24:02.675: I/ACodec(2358): setupVideoEncoder succeeded

    03-17 03:24:02.965: E/SoftAVCEncoder(2358): Failed to initialize the encoder: -8

    03-17 03:24:02.965: E/ACodec(2358): [OMX.google.h264.encoder] ERROR(0x80001001)

    03-17 03:24:02.965: E/MediaCodec(2358): Codec reported an error. (omx error 0x80001001, internalError -2147483648)

    03-17 03:24:04.015: W/System.err(2358): java.lang.IllegalStateException

    03-17 03:24:04.015: W/System.err(2358): at android.media.MediaCodec.queueInputBuffer(Native Method)

    03-17 03:24:04.055: W/System.err(2358): at net.majorkernelpanic.streaming.hw.EncoderDebugger.searchSPSandPPS(EncoderDebugger.java:624)

    03-17 03:24:04.115: W/System.err(2358): at net.majorkernelpanic.streaming.hw.EncoderDebugger.debug(EncoderDebugger.java:225)

    03-17 03:24:04.115: W/System.err(2358): at net.majorkernelpanic.streaming.hw.EncoderDebugger.debug(EncoderDebugger.java:115)

    03-17 03:24:04.125: W/System.err(2358): at net.majorkernelpanic.streaming.video.H264Stream.testMediaCodecAPI(H264Stream.java:132)

    03-17 03:24:04.165: W/System.err(2358): at net.majorkernelpanic.streaming.video.H264Stream.testH264(H264Stream.java:119)

    03-17 03:24:04.225: W/System.err(2358): at net.majorkernelpanic.streaming.video.H264Stream.configure(H264Stream.java:111)

    03-17 03:24:04.265: W/System.err(2358): at net.majorkernelpanic.streaming.Session$7.run(Session.java:566)

    03-17 03:24:04.325: W/System.err(2358): at android.os.Handler.handleCallback(Handler.java:733)

    03-17 03:24:04.335: W/System.err(2358): at android.os.Handler.dispatchMessage(Handler.java:95)

    03-17 03:24:04.335: W/System.err(2358): at android.os.Looper.loop(Looper.java:136)

    03-17 03:24:04.385: W/System.err(2358): at android.os.HandlerThread.run(HandlerThread.java:61)

    03-17 03:24:05.485: D/dalvikvm(2358): GC_FOR_ALLOC freed 2275K, 2% free 5862K/5964K, paused 818ms, total 818ms

    03-17 03:24:05.485: I/dalvikvm-heap(2358): Grow heap (frag case) to 7.982MB for 2304016-byte allocation

    03-17 03:25:57.555: D/dalvikvm(2358): GC_FOR_ALLOC freed 0K, 2% free 8112K/8216K, paused 984ms, total 984ms

    03-17 03:25:57.615: I/dalvikvm-heap(2358): Grow heap (frag case) to 10.179MB for 2304016-byte allocation

    03-17 03:26:39.995: D/dalvikvm(2358): GC_FOR_ALLOC freed 2250K, 23% free 8112K/10468K, paused 659ms, total 659ms

    03-17 03:26:40.205: I/OMXClient(2358): Using client-side OMX mux.

    03-17 03:26:40.215: I/SoftAVCEncoder(2358): Construct SoftAVCEncoder

    03-17 03:26:40.475: E/SoftAVCEncoder(2358): internalSetParameter: StoreMetadataInBuffersParams.nPortIndex not zero!

    03-17 03:26:40.475: E/OMXNodeInstance(2358): OMX_SetParameter() failed for StoreMetaDataInBuffers: 0x80001001

    03-17 03:26:40.485: E/ACodec(2358): [OMX.google.h264.encoder] storeMetaDataInBuffers (output) failed w/ err -2147483648

    03-17 03:26:40.485: I/ACodec(2358): setupVideoEncoder succeeded

    03-17 03:26:40.635: E/SoftAVCEncoder(2358): Failed to initialize the encoder: -8

    03-17 03:26:40.645: E/ACodec(2358): [OMX.google.h264.encoder] ERROR(0x80001001)

    03-17 03:26:40.645: E/MediaCodec(2358): Codec reported an error. (omx error 0x80001001, internalError -2147483648)

    03-17 03:26:41.605: W/System.err(2358): java.lang.IllegalStateException

    03-17 03:26:41.605: W/System.err(2358): at android.media.MediaCodec.dequeueOutputBuffer(Native Method)

    03-17 03:26:41.725: W/System.err(2358): at net.majorkernelpanic.streaming.hw.EncoderDebugger.searchSPSandPPS(EncoderDebugger.java:633)

    03-17 03:26:41.725: W/System.err(2358): at net.majorkernelpanic.streaming.hw.EncoderDebugger.debug(EncoderDebugger.java:225)

    03-17 03:26:41.835: W/System.err(2358): at net.majorkernelpanic.streaming.hw.EncoderDebugger.debug(EncoderDebugger.java:115)

    03-17 03:26:41.975: W/System.err(2358): at net.majorkernelpanic.streaming.video.H264Stream.testMediaCodecAPI(H264Stream.java:132)

    03-17 03:26:41.975: W/System.err(2358): at net.majorkernelpanic.streaming.video.H264Stream.testH264(H264Stream.java:119)

    03-17 03:26:42.065: W/System.err(2358): at net.majorkernelpanic.streaming.video.H264Stream.configure(H264Stream.java:111)

    03-17 03:26:42.145: W/System.err(2358): at net.majorkernelpanic.streaming.Session$7.run(Session.java:566)

    03-17 03:26:42.145: W/System.err(2358): at android.os.Handler.handleCallback(Handler.java:733)

    03-17 03:26:42.215: W/System.err(2358): at android.os.Handler.dispatchMessage(Handler.java:95)

    03-17 03:26:42.295: W/System.err(2358): at android.os.Looper.loop(Looper.java:136)

    03-17 03:26:42.295: W/System.err(2358): at android.os.HandlerThread.run(HandlerThread.java:61)

    03-17 03:26:43.065: E/EncoderDebugger(2358): No usable encoder were found on the phone for resolution 1920×800

    03-17 03:26:43.065: E/H264Stream(2358): Resolution not supported with the MediaCodec API, we fallback on the old streamign method.

    03-17 03:26:43.325: I/H264Stream(2358): Testing H264 support… Test file saved at: /storage/sdcard/spydroid-test.mp4

    03-17 03:26:44.085: D/VideoStream(2358): Unlocking camera

    03-17 03:26:44.555: I/MediaRecorderJNI(2358): prepare: surface=0xb8a2cbd0

    03-17 03:26:44.895: E/MediaRecorder(2358): start failed: -19

    03-17 03:26:44.955: E/MediaRecorder(2358): stop called in an invalid state: 0

    03-17 03:26:44.965: D/VideoStream(2358): Locking camera

    03-17 03:26:45.655: D/dalvikvm(2358): GC_FOR_ALLOC freed 71K, 23% free 8116K/10468K, paused 317ms, total 321ms

    03-17 03:26:45.655: I/dalvikvm-heap(2358): Grow heap (frag case) to 10.183MB for 2304016-byte allocation.

    03-17 03:26:46.075: D/dalvikvm(2358): GC_FOR_ALLOC freed <1K, 19% free 10366K/12720K, paused 376ms, total 376ms

    03-17 03:26:54.725: W/System.err(2358): net.majorkernelpanic.streaming.exceptions.ConfNotSupportedException: start failed.

    03-17 03:26:54.745: W/System.err(2358): at net.majorkernelpanic.streaming.video.H264Stream.testMediaRecorderAPI(H264Stream.java:239)

    03-17 03:26:54.805: W/System.err(2358): at net.majorkernelpanic.streaming.video.H264Stream.testH264(H264Stream.java:120)

    03-17 03:26:54.835: W/System.err(2358): at net.majorkernelpanic.streaming.video.H264Stream.testMediaCodecAPI(H264Stream.java:138)

    03-17 03:26:54.835: W/System.err(2358): at net.majorkernelpanic.streaming.video.H264Stream.testH264(H264Stream.java:119)

    03-17 03:26:54.845: W/System.err(2358): at net.majorkernelpanic.streaming.video.H264Stream.configure(H264Stream.java:111)

    03-17 03:26:54.935: W/System.err(2358): at net.majorkernelpanic.streaming.Session$7.run(Session.java:566)

    03-17 03:26:54.945: W/System.err(2358): at android.os.Handler.handleCallback(Handler.java:733)

    03-17 03:26:55.045: W/System.err(2358): at android.os.Handler.dispatchMessage(Handler.java:95)

    03-17 03:26:55.045: W/System.err(2358): at android.os.Looper.loop(Looper.java:136)

    03-17 03:26:55.055: W/System.err(2358): at android.os.HandlerThread.run(HandlerThread.java:61)

    03-17 03:26:55.145: I/Choreographer(2358): Skipped 439 frames! The application may be doing too much work on its main thread.

    03-17 03:26:59.105: I/Choreographer(2358): Skipped 1994 frames! The application may be doing too much work on its main thread.

    03-17 03:27:00.705: I/Choreographer(2358): Skipped 123 frames! The application may be doing too much work on its main thread.

    03-17 03:27:56.515: D/dalvikvm(2358): GC_FOR_ALLOC freed 30K, 16% free 10732K/12720K, paused 1098ms, total 1104ms

    03-17 03:27:56.515: I/dalvikvm-heap(2358): Grow heap (frag case) to 12.738MB for 2304016-byte allocation

    03-17 03:27:56.895: D/dalvikvm(2358): GC_FOR_ALLOC freed <1K, 14% free 12981K/14972K, paused 371ms, total 371ms

    03-17 03:28:04.015: I/Choreographer(2358): Skipped 501 frames! The application may be doing too much work on its main thread.

    03-17 03:28:06.385: W/ViewRootImpl(2358): Dropping event due to no window focus: KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_BACK, scanCode=158, metaState=0, flags=0x8, repeatCount=0, eventTime=8048408, downTime=8048408, deviceId=0, source=0x101 }

    03-17 03:28:06.395: I/Choreographer(2358): Skipped 947 frames! The application may be doing too much work on its main thread.

    03-17 03:28:07.025: D/InputEventConsistencyVerifier(2358): KeyEvent: ACTION_UP but key was not down.

    03-17 03:28:07.025: D/InputEventConsistencyVerifier(2358): in com.android.internal.policy.impl.PhoneWindow$DecorView{b2d46708 V.E….. R…..I. 0,0-438,320}

    03-17 03:28:07.025: D/InputEventConsistencyVerifier(2358): 0: sent at 8048527000000, KeyEvent { action=ACTION_UP, keyCode=KEYCODE_BACK, scanCode=158, metaState=0, flags=0x8, repeatCount=0, eventTime=8048527, downTime=8048408, deviceId=0, source=0x101 }

    03-17 03:28:14.665: I/OMXClient(2358): Using client-side OMX mux.

    03-17 03:28:14.675: I/SoftAVCEncoder(2358): Construct SoftAVCEncoder

    03-17 03:28:14.715: E/SoftAVCEncoder(2358): internalSetParameter: StoreMetadataInBuffersParams.nPortIndex not zero!

    03-17 03:28:14.715: E/OMXNodeInstance(2358): OMX_SetParameter() failed for StoreMetaDataInBuffers: 0x80001001

    03-17 03:28:14.715: E/ACodec(2358): [OMX.google.h264.encoder] storeMetaDataInBuffers (output) failed w/ err -2147483648

    03-17 03:28:14.725: I/ACodec(2358): setupVideoEncoder succeeded

    03-17 03:28:14.795: E/SoftAVCEncoder(2358): Failed to initialize the encoder: -8

    03-17 03:28:14.875: E/ACodec(2358): [OMX.google.h264.encoder] ERROR(0x80001001)

    03-17 03:28:14.875: E/MediaCodec(2358): Codec reported an error. (omx error 0x80001001, internalError -2147483648)

    03-17 03:28:15.335: W/System.err(2358): java.lang.IllegalStateException

    03-17 03:28:15.385: W/System.err(2358): at android.media.MediaCodec.getBuffers(Native Method)

    03-17 03:28:15.435: W/System.err(2358): at android.media.MediaCodec.getOutputBuffers(MediaCodec.java:551)

    03-17 03:28:15.485: W/System.err(2358): at net.majorkernelpanic.streaming.hw.EncoderDebugger.searchSPSandPPS(EncoderDebugger.java:610)

    03-17 03:28:15.495: W/System.err(2358): at net.majorkernelpanic.streaming.hw.EncoderDebugger.debug(EncoderDebugger.java:225)

    03-17 03:28:15.575: W/System.err(2358): at net.majorkernelpanic.streaming.hw.EncoderDebugger.debug(EncoderDebugger.java:115)

    03-17 03:28:15.585: W/System.err(2358): at net.majorkernelpanic.streaming.video.H264Stream.testMediaCodecAPI(H264Stream.java:132)

    03-17 03:28:15.625: W/System.err(2358): at net.majorkernelpanic.streaming.video.H264Stream.testH264(H264Stream.java:119)

    03-17 03:28:15.655: W/System.err(2358): at net.majorkernelpanic.streaming.video.H264Stream.configure(H264Stream.java:111)

    03-17 03:28:15.655: W/System.err(2358): at net.majorkernelpanic.streaming.Session.syncConfigure(Session.java:408)

    03-17 03:28:15.665: W/System.err(2358): at net.majorkernelpanic.streaming.rtsp.RtspClient$4.run(RtspClient.java:242)

    03-17 03:28:15.695: W/System.err(2358): at android.os.Handler.handleCallback(Handler.java:733)

    03-17 03:28:15.705: W/System.err(2358): at android.os.Handler.dispatchMessage(Handler.java:95)

    03-17 03:28:15.705: W/System.err(2358): at android.os.Looper.loop(Looper.java:136)

    03-17 03:28:15.725: W/System.err(2358): at android.os.HandlerThread.run(HandlerThread.java:61)

    03-17 03:28:15.905: D/dalvikvm(2358): GC_FOR_ALLOC freed 2286K, 16% free 10752K/12716K, paused 117ms, total 138ms

    03-17 03:28:15.905: I/dalvikvm-heap(2358): Grow heap (frag case) to 12.757MB for 2304016-byte allocation

    03-17 03:28:16.025: D/dalvikvm(2358): GC_FOR_ALLOC freed 338K, 16% free 12663K/14968K, paused 122ms, total 122ms.

    after some time my eumlater will showing error start failed .

    pls help for sloution this error.

  • Abdul Mohsin

    Great work Ravi. As always :). thanks a lot

    • You are welcome.

      • JasApp Time

        Hello,
        I set up all the things as mentioned.
        When I run the application working ok but I can see only black screen on server, No video or No Audio there….

        Please let me if something i missed.
        Thanks

  • Md. Mamun Abdul Kayum

    Great work !!
    I have tried all of the procedures but I’am getting some errors ,like
    03-25 10:38:18.369: E/MediaRecorder(5207): start failed: -19
    03-25 10:38:18.369: E/MediaRecorder(5207): stop called in an invalid state: 0
    03-25 10:38:18.489: W/System.err(5207): net.majorkernelpanic.streaming.exceptions.ConfNotSupportedException: start failed.

    and showing “start failed” in my device .
    please help me . Thanks in advance.

  • yamini

    Hi can you create emoji- emoticons-android keyboard, like whats app.

  • Dhina19

    am not getting my trail License

  • chen

    the output video orientation is landscape,how to solve it??

    • JasApp Time

      via

      setPreviewOrientation(90)

  • Dani

    Ravi Excellent tutorial. I have a problem with me my only transmits audio video that can not be.

    • JasApp Time

      Hi DAni,

      Have you found any sloution. I am facing with the same issue. Even I try to use latest Library.

  • Mohamed

    i have a problem, in the logCat i get this error “No usable encoder were found on the phone for resolution 176×144” can any one help me it’s urgent

  • Mohamed

    please help???????

  • Mohamed

    the android app seems to work fine and i receive the stream but the bytes coming in are 00.000 bites/s and the test player in wowza stream engine is not showing anything

    • Rehman

      I have same issue, did you find any solution.

      • Mohamed

        in the main activity try to change the session in initRtspClient() method to :

        mSession = SessionBuilder.getInstance()

        .setCallback(this)

        .setSurfaceView(mSurfaceView)

        .setPreviewOrientation(90)

        .setContext(getApplicationContext())

        .setAudioEncoder(SessionBuilder.AUDIO_NONE)

        .setAudioQuality(new AudioQuality(16000, 32000))

        .setVideoEncoder(SessionBuilder.VIDEO_H264)

        .build();

        this worked for me and you should disable the fire wall or the antivirus because sometimes the fire wall prevent the stream send,and make shure that the appconfig file contains valid url for the stream.

        • Rehman

          Thanks for reply but here Network Throughput is all 0. Please any solution ??

  • Rehman

    I done all step all thing are working good, i can’t see live streaming in Jwplayer it show just loading animation please help why i can’t see video

    • JasApp Time

      Hi Rehman,

      Have you found any sloution. I am facing with the same issue. Even I try to use latest Library.

  • Mohamed

    install wowza local in your pc

  • Roya

    hello..

    i need to make video streaming on my server not localhost ..and both the android and my webpage running on different network..

    any help ,please?

  • Roya

    hello..

    i need to make video streaming on my server not localhost ..and the android and my webpage running on different networks..

    any help ,please?

  • Anil Kumar

    Can I save the stream at server side ?

  • Mohamed

    Great work Ravi ,it’s working perfectly , can get red of the surfae view so i can run it in background ? and how can i accomplish that ?

    • Hadeedian Hamza

      hey mohamed…. h r u?? i need help about this project… i am student of university level…and i am new in android development… plz help… i am unable to integrate the “Libstreaming” library. please guide me… thanks in advance…

      • ȜAmer Elsayed

        Hi Please Can You Send Me your Sample Because i have Errors ,

        dev.amer.elsayed@gmail.com

        • Eng.Amal Kronz

          Hi Amer, i need some help please, i do the same of this tutorial but it didn’t work how can i change the IP in the URL in android part and web part, and if you can use successfully this tutorial or other app for live streaming from app to webpage please configure it to me ,thanks a lot

          • ȜAmer Elsayed

            check tutorial of Wowza now it’s very good and it’s too Easy

  • Rian Erlangga

    i need help,i try this tutorial, Why always got alert Try Again ?? please help me

    • JasApp Time

      Device issue in my case

  • vai

    Hi ,

    After import lib streaming library into Android Studio,I am not getting RTS interface .when I am implementing RtspClient.Callback interface that is not found in library.

    • imen

      Hello,
      I work also with android studio but i found a problem when i imported libstreaming library project to the VideoStreaming project as shown in the tutorial i always get Default configuration error can you tell me please how did you do this step with android studio, thanks a lot !

  • Sagar

    Works like a charm. Great Tutorial. Just to add The streaming works perfectly on laptops/ PC but JWPlayer throws an error on Mobile Browsers. Any recommendations?

  • Jagat

    Unable to switch camera from front to back and vice versa.

    • Kanguru

      You Should use Session.SwitchCamera()

  • Jagat

    How can do that?

  • Ashish Kumar

    Hi Ravi,

    The Tutorial was amazing and works on most of my devices , thanks a lot for such nice tutorial,
    I
    want to develop a application for live streaming but the application
    giving me RRF error (Camera) and some times TRY AGAIN!!! on some of the
    devices, Can you please help me out
    Regards Ashish

    • ȜAmer Elsayed

      i have same error have you solved it ?
      Regards Amer

  • joan

    Hi Folks, Impossible for me to import to Android Studio, Any guide or help?, thanks

  • satya&roid

    I have installed Wowza engine. I have logined.But the problem is when I am clicking on server tab
    I am not getting publishers option. So can anyone will help me?

    • Satyaki Mukherjee

      Now it change, instead of publisher you will get Source Authentication under Server tab. On Source Authentication you can add source instead of add publisher.

      • Thanh Tùng Vũ

        thanks

  • irfan

    Can anybody guide me same thing but not using internet, only WIFI….

    how can i stream voice over wifi from android to desktop C# application/ server ??????

  • Satyaki Mukherjee

    Hi Ravi,

    First of all thanks to you for such kind of nice tutorial . Can you please give me a suggestion about recording the video on android device also? What I have seen that streaming and recording on same camera or same device is not possible for me. Is there any way to stream and record at the same time from android device.

  • George

    Thanks for the demo. But can you explain about the stream “android_test”, where did you specify the stream name? By default, it should be “myStream”.

  • carlos

    how can I get the ip of my camera from my android phone, i want to do that from one phone to another

  • Avinash Shukla

    hello when i click on start button on web page its showing “Error loading stream Could not connect to server.” please tell me…Thanks

  • JCDenton

    Is ist easy to change the camera-streaming from the wowza server to a red5 server? Which step are necessary to use red5 for RTSP streaming? Is RTSP yet implemented for red5?

  • JasApp Time

    Hello,
    I set up all the things as mentioned.
    When I run the application working ok but I can see only black screen on server, No video or No Audio there….

    Please let me if something i missed.
    Thanks

  • Kim Velker

    Hello!

    On every device I have tested, I don’t have the right aspect ratio. Instead of filling the screen horizontally, I get a smaller width than the one required. The aspect ratio of the video is 1.22, while the aspect ratio of the device is 1.77. I want to match the aspect ratio of the device. If I try to use mSurfaceView.setAspectRatioMode(SurfaceView.ASPECT_RATIO_STRETCH), the image is distorted, and the resolution I receive when I view the video is 1.22 and undistorted.

    • Kanguru

      I have same question like you.

  • Kanguru

    Hi everybody,

    I want to get better resolution of video.
    I try to set VideoQuality. But I can not obtain it.

    Please give an advice!
    Thank you!

    • ali

      Hi,
      I am trying to set this up but its not working for me, can you please send me an email on ali.javed2@mail.dcu.ie and help me.
      I am having a problem in setting up android studio. If you can send me an email and i’ll tell you the exact problem i am having.
      Please help.
      Thank you.

  • ali

    Hello Sir,

    I am trying to SUBSCRIBE to download the code, When I put in my email address, it asks to check my account to verify, but i receive NO EMAIL IN MY ACCOUNT.
    Please fix this.
    Thank you.

  • Azim Khan

    great work it is working on my system perfectly with android app great and thanks.

  • Azim Khan

    It is working on localhost but when I install it on my server this message is displaying “Wowza Streaming Engine 4 Trial Edition (Expires: Jul 21, 2016) 4.3.0 build16025”. how can I view the enginemanager home page.

  • orange lemons

    ID not found on server please help…..

  • Hi Ravi, thanks for your example tutorial.
    after i follow all the steps, when i start the stream, why it always thrown “java.net.SocketException: Connection lost”. for network i using “Mobile network and Wifi”.
    i can’t find a good solution.
    please suggest me, how to fix it.

    • Sometimes we might not able to access the devices through wifi. Try to reset the router and try again (Note: By resetting router you will loose your internet settings. Note down your internet settings first)

      • impossible to reset my office router :-D,
        so, how about mobile network, is there something wrong?, i just got “Connection error”

        • Have two mobiles. Use one for creating the hotspot and other for testing. Previously I had a problem while using the same mobile for creating the hotspot and testing the app.

    • ȜAmer Elsayed

      please Can Help me

      Ravi this my Logcat

      02-03 09:38:48.603 9279-15676/com.aait.livestream D/MDP: DpMmu: enable M4U port MDP_WDMA

      02-03 09:38:48.603 9279-15676/com.aait.livestream D/MDP: DpMmu: config M4U port MDP_WDMA VA 1

      02-03 09:38:48.603 9279-15676/com.aait.livestream E/M4U_L: ioctl MTK_M4U_T_CACHE_FLUSH_ALL fail! 0, Success

      02-03 09:38:48.604 9279-15676/com.aait.livestream D/MDP: DpBlit: time 1 ms

      02-03 09:38:48.604 9279-15676/com.aait.livestream E/M4U_L: ioctl MTK_M4U_T_M4UDrv_DECONSTRUCT fail! 0, Success

      02-03 09:38:48.604 9279-15676/com.aait.livestream E/M4U_L: ioctl MTK_M4U_T_M4UDrv_DECONSTRUCT fail! 0, Success

      02-03 09:38:48.604 9279-15676/com.aait.livestream E/M4U_L: ioctl MTK_M4U_T_M4UDrv_DECONSTRUCT fail! 0, Success

      02-03 09:38:48.604 9279-15676/com.aait.livestream E/M4U_L: ioctl MTK_M4U_T_M4UDrv_DECONSTRUCT fail! 0, Success

      02-03 09:38:48.604 9279-15676/com.aait.livestream E/M4U_L: ioctl MTK_M4U_T_M4UDrv_DECONSTRUCT fail! 0, Success

      02-03 09:38:48.604 9279-15676/com.aait.livestream D/ACodec: convert t: = 2235 during 1566 ~ 3540, avg 19785 micro sec

      02-03 09:38:48.604 9279-15676/com.aait.livestream D/ACodec: BaseState::onOMXMessage type 2

      02-03 09:38:48.604 9279-15676/com.aait.livestream D/ACodec: Tid 15676, mM4UMVABufferPa 0xd900800, mM4UVABufferVa 0xaabe8800

      this my Error

  • razi3742

    From Where i can get IP address ??? which you have used in AppConfig Class ??

    • Matthias Seidel

      You need to shearch at your computer for “cmd”
      Then enter “ipconfig” and your ip will be shown you.

      • Eng.Amal Kronz

        OK, i find the ip address but the port and the path how can i change it in the url

  • ȜAmer Elsayed

    Hi Ravi , Thanks for this Tutorial ,
    After following all Steps and Change IP in App Config But I have Dialog With Message Try Again
    Please Can u Help Me ?

    • Do you see any error in the Log?

      • ȜAmer Elsayed
      • ȜAmer Elsayed
      • ȜAmer Elsayed

        Ravi this my Logcat

        02-03 09:38:48.603 9279-15676/com.aait.livestream D/MDP: DpMmu: enable M4U port MDP_WDMA
        02-03 09:38:48.603 9279-15676/com.aait.livestream D/MDP: DpMmu: config M4U port MDP_WDMA VA 1
        02-03 09:38:48.603 9279-15676/com.aait.livestream E/M4U_L: ioctl MTK_M4U_T_CACHE_FLUSH_ALL fail! 0, Success
        02-03 09:38:48.604 9279-15676/com.aait.livestream D/MDP: DpBlit: time 1 ms
        02-03 09:38:48.604 9279-15676/com.aait.livestream E/M4U_L: ioctl MTK_M4U_T_M4UDrv_DECONSTRUCT fail! 0, Success
        02-03 09:38:48.604 9279-15676/com.aait.livestream E/M4U_L: ioctl MTK_M4U_T_M4UDrv_DECONSTRUCT fail! 0, Success
        02-03 09:38:48.604 9279-15676/com.aait.livestream E/M4U_L: ioctl MTK_M4U_T_M4UDrv_DECONSTRUCT fail! 0, Success
        02-03 09:38:48.604 9279-15676/com.aait.livestream E/M4U_L: ioctl MTK_M4U_T_M4UDrv_DECONSTRUCT fail! 0, Success
        02-03 09:38:48.604 9279-15676/com.aait.livestream E/M4U_L: ioctl MTK_M4U_T_M4UDrv_DECONSTRUCT fail! 0, Success
        02-03 09:38:48.604 9279-15676/com.aait.livestream D/ACodec: convert t: = 2235 during 1566 ~ 3540, avg 19785 micro sec
        02-03 09:38:48.604 9279-15676/com.aait.livestream D/ACodec: BaseState::onOMXMessage type 2
        02-03 09:38:48.604 9279-15676/com.aait.livestream D/ACodec: Tid 15676, mM4UMVABufferPa 0xd900800, mM4UVABufferVa 0xaabe8800

  • ȜAmer Elsayed

    Ravi please help me
    this my problem and i don’t understand reason

    Camera RRF and ‘Try again’ message in start streaming

    • Rian Erlangga

      hi bro,
      i have same issue with you, any help??

  • Aldhi

    Hy Ravi, How to make a AppConfig.java for Wowza Streaming Cloud?
    Can you give me a Tutorial?

    • ȜAmer Elsayed

      did you face this Error before ?
      Camera RRF and ‘Try again’ message in start streaming
      Thanks

  • Ali Javed

    Hi Ravi,

    I want to display my android camera, on to a VLC.
    Can I use the method above and instead of displaying the android camera onto a JWplayer, Can I view the stream on VLC media player?

    Thanks in advance.

    • Yes, you can. It is very easy. I didn’t find exact guide for it but you can steam it using the ipaddress of the device in vlc. Please google it.

      • Ali Javed

        Thank you for your quick reply.
        However, I downloaded your source Code and import it in my android studio.When I build the project it is giving me 3 errors.
        I’ve attached the log.

        Error:Execution failed for task ‘:androidVideoStreaming:processDebugResources’.

        > com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process ‘command ‘C:UsersAliAppDataLocalAndroidsdk1build-tools23.0.2aapt.exe” finished with non-zero exit value 1

        Error:(7, 24) No resource found that matches the given name (at ‘title’ with value ‘@string/action_settings’).

        Error:(2) Error parsing XML: prefix must not be bound to one of the reserved namespace names

        C:UsersAliAndroidStudioProjectsAndroidVideoStreaming1androidVideoStreamingsrcmainresmenumain.xml

        C:UsersAliAndroidStudioProjectsAndroidVideoStreaming1androidVideoStreamingbuildintermediatesresmergeddebugvaluesvalues.xml

        • Clean the project and try again. Build -> Clean Project

          • Ali Javed

            Hi Ravi,
            That did not work.
            When I import your project in android studio, it gives an error:

            Error:Execution failed for task ‘:androidVideoStreaming:processDebugManifest’.

            > Manifest merger failed : uses-sdk:minSdkVersion 8 cannot be smaller than version 14 declared in library [AndroidVideoStreaming5:libstreaming:unspecified] C:UsersAliAndroidStudioProjectsAndroidVideoStreaming5androidVideoStreamingbuildintermediatesexploded-aarAndroidVideoStreaming5libstreamingunspecifiedAndroidManifest.xml

            Suggestion: use tools:overrideLibrary=”net.majorkernelpanic.streaming” to force usage

            SOLUTION:
            I change the minSDK in gradle file to : 14.
            Afterwards it starts giving me errors, as shown in my previous comment.
            Any suggestion?

            Thanks

          • Okay. Why don’t you create a new project in AS and start adding one by one file as mentioned in the article.

  • Aldhi

    Hi Ravi, How to make this, to be wowza streaming cloud? please give a tutorial

  • Rohit Sharma

    Hi Ravi, how to connect external camera for video streaming.

    Thanks in advance.

    • What do you mean by external camera?

      • Rohit Sharma

        I am using external camera for video streaming. When i used this code, then it show error “Invalid Surface”. please help me out from this error.

  • Waheed Khatri

    Hi, Ravi, new to android, how can I know my RTSP address that you have incorporated in AppConfig.java?

  • Matthias Seidel

    Hi Ravi,

    firstefull a big Thanks for your awesome tutorial.

    Works all pretty well. But after a few seconds I’ll get the Error: “Invalid Surface” and the shown camera in the SurfaceView disapears. Do you know how I can fix it?

    Thanks for your help.

    Greeting Matthias

  • yoko

    Hi Ravi,
    I could not find jwplayer downloadable file anywhere in the link.
    Would you help get the file?

    Thanks for your help,
    yoko

    • You have to register on jwplayer website to download the files.

  • yoko

    Hi Ravi,

    I found it when I changed browser from chrome to firefox.

    yoko

  • Agnibesh Chauhan

    Hi Ravi,

    I am casting my screen using mediaProjection. So instead of using camera I am casting my sreen. Can I do the same? And In this code,I want to know where the surface is rendered for streaming?

    Thanks in Advance

  • Riris Rismawati

    Hi Ravi,

    Thanks for your awesome tutorial.
    I have read it, compile it, and successfully compiled. Btw how can we make the streaming resolution to High Definition streaming. I have tried it but the resolution is very low 🙁

    Thanks for your help,
    Riris

    • ahtisham

      The apps only run on smartphone, not run on website.
      Can you help me.

  • Zouzou Nana

    hello i have read this tutoriel carefully and I have all the stages, but I am having a problem when runnig android projcet so i need your help thanks

  • A Chakra

    There is no publisher option in wowza streamingengine under server tab..Any idea ? I am using wowza streamingengine 4.4.1 my stack overflow question please have a look http://stackoverflow.com/questions/36177228/there-is-no-publisher-option-in-wowza-streamingengine-under-server-tab

  • David

    Ravi. Why my app just black ?

  • chhatrasal singh

    failed to connect to (port 1935):connection failed:EHOSTUNREACH(No route to host)

    • Prabha Vathi

      I am also getting same problem.Please tell me the sollution

  • Le Thanh Tan

    Dear Ravi
    The apps only run on smartphone, not run on website.
    Can you help me.
    Thank you.

    • ahtisham

      same probelm i am facing .. 🙁

    • Anshul

      Dear Ravi,
      I am new in android development. First of all thanks for this simple and useful tutorials.
      I am facing few issues during running this project.
      I got the error flash plugin failed to load. Can you please solve this issue.

      Thank you

  • Al Noman

    Hi Ravi,
    Is that possible to stream ip cam’s video to the server?? If that possible then how?

    Thank you.

  • Rajat Soni

    Hello Sir, In wowza there is no option for add publisher.So what should i have to use for username and password?If any new things i have to implement apart from this then please help me

  • 翁郁翔

    Hello
    I follow your code step by step.
    And I do this on android studio, but here comes to an error
    “Fail to connect to Camera service”.
    And I checked twice that I did type the permission of camera.Do you have any idea about why this happen?

    • Prabha Vathi

      Add this permissions in MainActivity

      if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
      if (checkSelfPermission(Manifest.permission.CAMERA) != PackageManager.PERMISSION_GRANTED) {
      requestPermissions(new String[] {Manifest.permission.CAMERA}, 1);
      }
      }

  • Ivan Benke

    I continue to get message: error loading stream id not found on server. Port is ok i don’t know what else could be the problem?

    • Anurag Sengupta

      yes even i am getting the same problem

      • Ivan Benke

        are you solved problem?

    • Farina Ashfaq

      Yes i am also have same problem :/ ???

  • Anurag Sengupta

    hi ravi , i can’t get the wowza engine to work on my phone can you help , thanks

  • Eng.Amal Kronz

    thanks for this tutorial, i make as you explain but it didn’t work i think it’s because the URL ,what’s part of URL can i change to be my PC IP

  • Anshul

    Dear Ravi,
    I am new in android development. First of all thanks for this simple and useful tutorials.
    I am facing few issues during running this project.
    I got the error flash plugin failed to load. Can you please solve this issue.

    Thank you

  • Maddy

    Hi Ravi, Can I use asp.net instead of PHP for web app??? Also can you send me the code. Available link is not working.

  • Thato Rammoko

    Thank you for the beautiful tutorial Ravi Super grateful, I have one problem though the live stream has no audio how do i fix that?

    • For me audio worked. Explore about SessionBuilder code.

      • vaikunj

        Hiiii Ravi Tamada i want to make Chat App Web And android so what to do??/

      • Kumar

        For video what can i do help me.

      • Prasannakumarnalam

        Audio is working what about video please help me

  • nnkteja

    hello ,i’m unable to establish rtsp between my android phone and wowza.I’m always getting try again message in alert box in app.And no incoming streaming in wowza.Any help??

  • 柯柯

    Hello
    I follow your code step by step.
    And I do this on android studio, but here comes to an error
    “Fail to connect to Camera service”.
    And I checked twice that I did type the permission of camera.Do you have any idea about why this happen?

    • Krupa Rudani

      Apply the Permission

    • Prabha Vathi

      Write this permissions in MainActivity

      if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
      if (checkSelfPermission(Manifest.permission.CAMERA) != PackageManager.PERMISSION_GRANTED) {
      requestPermissions(new String[] {Manifest.permission.CAMERA}, 1);
      }
      }

  • prachi

    i am getting error in web browser- Error setting up player: Invalid license key in http://localhost/wowza_web_app/index.html please help me to setup video connection ans me soon

  • Vijay Kalyan
    • You need to install the adobe flash plugin in your browser.

  • Avikal Keshri

    Sir i want to view this recorded video online (Live) in my app
    what should i do????
    Sir Please help me………

    • This article explains the same. Go through it once again.

  • Kumar

    Hi Ravi,
    Thanks this is very useful to me.
    I Done above all steps but unable to see live. i am getting below error

    RtspClient: OPTIONS rtsp://192.168.1.10:1935/live/android_test RTSP/1.0

    RtspClient: Response from server: 200

    V/MediaCodecInputStream: No buffer available…

    I tested above Testing the app cases also (4-cases)– working fine.

    Result on web :- loading

    Please help me how to resolve this.Thanks in adv

    • Devesh Pandya

      have u got any solutions. Coz i am also facing the same problem. will u explain how to connect and start the streaming. i have followed all steps.
      1.downloaded the wamp server and accessing.
      2.downloded the player but dont know how to access this.
      3.I have tried with main application and example application.

      plz help me in this

    • Farina Ashfaq

      i have same issue u have any solution please tell me ??

  • Parth

    What to do if I want to use an open source server like node-rtsp-rtmp-server instead of wowza.

  • Shashank Shekhar

    Well I followed all your steps and I am getting the video but not the audio. Any help ?

    • Devesh Pandya

      will u plz explain how you have done the streaming. m not getting the streaming.

      plz help.
      @disqus_M3WgmUUuy9:disqus

      • Shashank Shekhar

        I just followed all the steps mentioned above. Change your ip from Appconfig and the html file to your own ip.

  • Shammer

    Hi Ravi this is Shammer well i need to start initRtspClient() while clicking a Button ,and how to change Stream name everytime .

  • Devesh Pandya

    can i use this application to direct the stream to computer without website?
    i want to send the mobile stream to computer, but without any website help.

    sorry to ask this silly question but i am new for this streaming.

    • Where you want to display the video if there is no website? You can use VLC player to do the same.

  • Vikas Rana

    Hey!
    have you ever worked with youtube api getting problems while doing live stream on youtube !

  • Rajbir Kumar

    How can we stream a live video from remote server in our android app

    • Kyle

      This app is for video encoding (creating video). Not video decoding (playing video).

  • Shammer Warhorse

    Hi ravi in my app its saying BADCREDENTIALS! what to do

  • kush misra

    hi ravi.

    i am getting issue with the app.

    java.lang.IllegalStateException: No successful match so far.

    can u help me sot this please

  • Shashank Shekhar

    I have performed live streaming using Wowza and it is working fine, but what I actually want to do is to make other users able to see the live video streaming through their mobile phones. Like if they visit the URL on which I am performing live streaming, then they should be able to see the video. Any idea how I can do this ?

    • Sunilt Kumawat

      Hello friends i need your help… Am facing the problem of quality of streaming..so can you tell me that how am increase the quality of video streaming…??

      Thanks

    • Kyle

      You can use HLS. Wowza will ingest the rtsp stream from your camera and re-package it into multiple stream types. One is HLS. The standard format for playing the HLS stream is “http://wowza_ip:1935/app/stream_name/playlist.m3u8”. Open that stream address in your mobile browser and it should play.

  • Sunilt Kumawat

    Greetings! thanx for the tutorial I appreciate it. It helps me a lot. I followed the complete tutorial as shown. But I am facing camera related issues. When I start streaming the quality captured by the surface view is degraded. Even when my device have a superb quality camera. If anyone facing the same issue then please help me out. Any help will be appreciated.

    • Samet Karyürek

      hi guys University homework this project but not working can you help me ?

  • Dhiraj Tiwari

    hi Ravi , I am getting error , ” Error loading player: no playable sources found”
    and how to check wowza server store videos as a stream fromet

    • Kyle

      Open the Wowza server web interface and verify that the server is receiving the stream. http://wowza_ip:8088

  • Samet Karyürek

    hi guys University homework this project but not working can you help me

  • Samet Karyürek
    • marwa

      I face the same problem, did you find solution for that ?

    • Kid 1412

      please check setup server with wowza engine streaming (username and pass word publish)

  • Laxman Ghuge
  • Ashfaq Ahmed

    Hello Ravi, can you please add a tutorial for audio stream over a web server ? without using Wowza Media Engine or any third party service ?

  • Nandita Mehta

    Hey Is there any way for streaming this back to an android app and not web page

    • MediaPlayer can play streaming videos. Try using the same url with MediaPlayer.

      • Shubham Upadhyay

        Can we directly stream video to another android phone instead of web page?

  • Shubham Upadhyay

    Sir Everything is working except this http://your_pc_ip_address:8088/enginemanager/ in mobile browser. I didn’t see any wowza engine manager page in my mobile browser. Please help me Sir

  • Vaibhav hadole

    Not able to see the video on jwplayer stuck in loading phase..

    on device getting log
    I/RtspClient(23523): OPTIONS rtsp://xxx.xxx.xx.xx:1935/live/gp-test RTSP/1.0
    D/RtspClient(23523): Response from server: 200

    Stuck on it since last week ;(

  • Amit Kumar Verma

    Hi Ravi,I want to send audio only not video.When I remove surfaceview getting error,Please help me.

  • Habib Ur REhman

    Hi
    How to build an app that save video to desktop Pc( Laptop ) storage