Wowza Community

Android sample

Hello. I need your advice in this matter:

  1. Need to do live stream and vod from Android devices (version 4 +) on the Wowza server.

  2. Be able to receive the stream on the Android devices from Wowza server.

Do you have some example for Android?

I would be grateful for any help in this matter. Thank you.

Hi there,

You can use the Wowza GoCoder app for Android to publish live streams:

How to use Wowza GoCoder video broadcasting Android app

The playback URL for Android looks like this:

rtsp://[wowza-ip]:1935/[application-name]/[stream-name]
rtsp://[wowza-ip]:1935/vod/mp4:sample.mp4

Also, please read through the Quick Start Guide to help get you up to spead with Wowza.

Salvadore

Follow this guide to setup an application to use with GoCoder as the live encoder.

Richard

Please refer to ticket

#93286

.

Hi there,

You can use the Wowza GoCoder app for Android to publish live streams:

How to use Wowza GoCoder video broadcasting Android app

The playback URL for Android looks like this:

rtsp://[wowza-ip]:1935/[application-name]/[stream-name]
rtsp://[wowza-ip]:1935/vod/mp4:sample.mp4

Also, please read through the Quick Start Guide to help get you up to spead with Wowza.

Salvadore

Thanks for reply.

I’m doing a live stream from Android device. How to play it on another device?

Such URL - rtsp://[wowza-ip]:1935/[application-name]/[stream-name] does not work. How transform URL in “http” protocol? For example such URL - http://live.3gv.ifeng.com/live/zixun.m3u8 work perfect on my Android device.

Hello.

Thanks for reply. I read the user manual.

Use case #1:

I’m doing a live stream from Android device(version 4.2) on Wowza server. Here my config:

host - rtsp://10.0.1.9:1935/mediaApp/MyStream

user - root

password -123

Video codec - H264

Audio codec - AAC(AudioQuality(8000,16000))

In the console, I see this live stream tab “Incoming stream”. This stream I can watch through Flesh player and iOS (they use rtmp). Thats okay.

But when I try to watch live video on another Android device, nothing happens.(Message arrives, it is impossible to play video) Here’s the code:

public class MainActivity extends Activity

{

@Override

protected void onCreate(Bundle savedInstanceState) {

super.onCreate(savedInstanceState);

getWindow().addFlags( WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);

requestWindowFeature( Window.FEATURE_NO_TITLE);

setContentView(R.layout.main_new);

VideoView videoView = (VideoView) findViewById(R.id.videoView);

String httpLiveUrl = “rtsp://10.0.1.9.com:1935/mediaApp/MyStream”;

videoView.setVideoURI( Uri.parse( httpLiveUrl ));

videoView.setMediaController(new MediaController(this));

videoView.requestFocus();

videoView.start();

}

}

Use case #2:

I do stream from Android device to the Wowza server. In the console, do video recording in ‘mp4’ and ‘flv’ formats.

Next, I change the server settings for playing records and trying to play this video, using the same code.

host - rtsp://tc.themidnightcoders.com:1935/mediaApp/mp4:MyStream.mp4(for Android)

Flash - can play only flv format, but mp4 not(is there any way to play video in this format?).

iOS - can play only flv format, but mp4 not(is there any way to play video in this format?).

Android - сan not play video, which has been recorded on the device. (Basic “sample.mp4” work perfect)

Can you help me in this case?

Note: I think that you can do to stream from any client(Android, iOs, Flesh), your server converts it and outputs in the format that you want.

Such cases i have:

publisher type player

Android Live Flash yes

Android Live iOS yes

Android Live Android no

Android Record Flash yes (flv format)

Android Record iOS yes (flv format)

Android Record Android no

Flash Live Android no

Flash Record Android no

Now I have the biggest problem is with the Android client, as you can see.

I hope very much for your help.

Hello.

Another issue.

I do stream from Android device to the Wowza server. Here my file config:

Video codec - H.264

Audio codec - AAC(AudioQuality(8000,16000))

In the console, do video recording in ‘mp4’:

File Name : M320.mp4

Directory : .

File Size : 342 kB

File Modification Date/Time : 2014:06:02 13:54:52+03:00

File Permissions : rw-rw-r–

File Type : MP4

MIME Type : video/mp4

Major Brand : Unknown (f4v )

Minor Version : 0.0.0

Compatible Brands : isom, mp42, m4v

Movie Data Size : 346518

Movie Header Version : 0

Create Date : 2014:06:02 10:54:40

Modify Date : 2014:06:02 10:54:40

Time Scale : 90000

Duration : 12.19 s

Preferred Rate : 1

Preferred Volume : 100.00%

Preview Time : 0 s

Preview Duration : 0 s

Poster Time : 0 s

Selection Time : 0 s

Selection Duration : 0 s

Current Time : 0 s

Next Track ID : 3

Track Header Version : 0

Track Create Date : 2014:06:02 10:54:40

Track Modify Date : 2014:06:02 10:54:40

Track ID : 1

Track Duration : 12.19 s

Track Layer : 0

Track Volume : 100.00%

Image Width : 320

Image Height : 240

Graphics Mode : srcCopy

Op Color : 0 0 0

Compressor ID : avc1

Source Image Width : 320

Source Image Height : 240

X Resolution : 72

Y Resolution : 72

Compressor Name : WowzaStreamingEngine

Bit Depth : 24

Video Frame Rate : 20.015

Matrix Structure : 1 0 0 0 1 0 0 0 1

Media Header Version : 0

Media Create Date : 2014:06:02 10:54:40

Media Modify Date : 2014:06:02 10:54:40

Media Time Scale : 90000

Media Duration : 12.18 s

Media Language Code : eng

Handler Type : Audio Track

Handler Description : WowzaStreamingEngine

Balance : 0

Audio Format : mp4a

Audio Channels : 1

Audio Bits Per Sample : 16

Audio Sample Rate : 8000

Avg Bitrate : 227 kbps

Image Size : 320x240

Rotation : 0

Note. On PC(Linux) video play well with sound. A video is played on the device itself is also good.

Next, try to play it in VOD mode on Android device. I use:

  1. rtsp://myIp:1935/mediaApp/mp4:M320.mp4

  2. http://myIp:1935/mediaApp/mp4:M320.mp4/playlist.m3u8

Video does not play. :frowning:

But when I try to do the same with your “sample.mp4” All works. Why is this happening? Help me to understand the reason for this behavior.