Wowza Community

How to Play offline audio Radio on VLC using http:// protocol in wowza media server

I have some problem about how to play live stream audio radio (.mp3) file on localhost using wowza media server. That is, when I would run wowza startup this stream is playing on VLC using this URL:

rtsp://localhost:1935/live/rsstream0

where ‘live’ is my application name and ‘rsstream0’ is my stream-name. This URL play the file just like a radio fine ok … But when I change the URL from rtsp:// to http://, e.g.

[http://localhost:1935/live/rsstream0/manifest.f4m]

This does not work.

If any one have help about this issue tell me.

Hi,

You’re using the wrong URL for VLC to play the stream via HTTP.

Try - http://localhost:1935/live/rsstream0/playlist.m3u8

You will have to ensure you have configured the “cupertinostreamingpacketizer” in the LiveStreamPacketizers section of the Application.xml file for this stream to play.

Jason

You have set the Application.xml /HTTPStreamer HTTPOriginMode to “on”. If you are connecting playback clients to this application, you should set that to “off” or remove it.

Richard

Winamp and Windows Media Player are not supported players for Wowza.

Richard

Thanks Jason for your reply ,but the same problem after your suggestion . i have change the URL as you say [http://localhost:1935/live/rsstream0/playlist.m3u8] and the my Application.XML file is correct .

this is my configuration setting

Below is my ----

1)Application.xml file

true

live

${com.wowza.wms.context.VHostConfigHome}/content

${com.wowza.wms.context.VHostConfigHome}/keys

cupertinostreamingpacketizer,smoothstreamingpacketizer,sanjosestreamingpacketizer

${SourceStreamName}.xml,transrate.xml

${com.wowza.wms.context.VHostConfigHome}/transcoder/profiles

${com.wowza.wms.context.VHostConfigHome}/transcoder/templates

0

${com.wowza.wms.context.VHostConfigHome}/dvr

append

vodcaptionprovidermp4_3gpp

cupertinostreaming,smoothstreaming,sanjosestreaming

-1

*

*

*

*

digest

none

senderreport

12000

75

90000

0

0.0.0.0

127.0.0.1

*

interleave

httpRandomizeMediaName

true

Boolean

httpOriginMode

on

cupertinoCacheControlPlaylist

max-age=1

cupertinoCacheControlMediaChunk

max-age=3600

smoothCacheControlPlaylist

max-age=1

smoothCacheControlMediaChunk

max-age=3600

smoothCacheControlDataChunk

max-age=3600

sanjoseCacheControlPlaylist

max-age=1

sanjoseCacheControlMediaChunk

max-age=3600

cupertinoOnChunkStartResetCounter

true

Boolean

RadioListener

RSStream

com.riverstream.RadioListener

base

Base

com.wowza.wms.module.ModuleCore

properties

Properties

com.wowza.wms.module.ModuleProperties

logging

Client Logging

com.wowza.wms.module.ModuleClientLogging

flvplayback

FLVPlayback

com.wowza.wms.module.ModuleFLVPlayback


2)server.xml file is

*

8083

Server,VHost,VHostItem,Application,ApplicationInstance,MediaCaster,Module,IdleWorker

false

localhost

localhost

8084

8085

true

${com.wowza.wms.ConfigHome}/conf/jmxremote.password

${com.wowza.wms.ConfigHome}/conf/jmxremote.access

false

Shockwave Flash|CFNetwork|MacNetwork/1.0 (Macintosh)

com.riverstream.RadioListener

10

10

6970

false


3)my server side java code for playlist (.mp3) is

!)RadioListener -class code is

package com.riverstream;

import com.wowza.wms.logging.WMSLoggerFactory;

import com.wowza.wms.server.IServer;

import com.wowza.wms.server.IServerNotify2;

import com.wowza.wms.stream.publish.IStreamActionNotify;

import com.wowza.wms.stream.publish.Playlist;

import com.wowza.wms.stream.publish.Stream;

import com.wowza.wms.vhost.IVHost;

import com.wowza.wms.vhost.VHost;

import com.wowza.wms.vhost.VHostSingleton;

public class RadioListener implements IServerNotify2 {

private static int STREAM_SIZE = 2;

@Override

public void onServerCreate(IServer arg0) {

// TODO Auto-generated method stub

WMSLoggerFactory.getLogger(null).info(“onServerCreate”);

}

@Override

public void onServerInit(IServer arg0) {

// TODO Auto-generated method stub

WMSLoggerFactory.getLogger(null).info(“onServerInit”);

IVHost vhost = VHostSingleton.getInstance(VHost.VHOST_DEFAULT);

for(int sCount = 0; sCount < STREAM_SIZE; sCount++){

Playlist p = new Playlist(“playlist” + sCount);

p.addItem(“mp3:” + sCount + “.mp3”, 0, -1);

//System.out.println("MyPlaylist === "+p);

p.setRepeat(true);

//playlists.add§;

Stream rsstream = Stream.createInstance(vhost, “live”, “rsstream” + sCount);

//System.out.println(“Mystream”+rsstream);

p.open(rsstream);

System.out.println(rsstream.getName()+" gotit");

IStreamActionNotify actionNotify = new StreamListener();

rsstream.addListener(actionNotify);

}

}

@Override

public void onServerShutdownComplete(IServer arg0) {

// TODO Auto-generated method stub

}

@Override

public void onServerShutdownStart(IServer arg0) {

// TODO Auto-generated method stub

}

@Override

public void onServerConfigLoaded(IServer arg0) {

// TODO Auto-generated method stub

}

}


!!)StreamingRadio — class file is

package com.riverstream;

import com.wowza.wms.application.*;

import com.wowza.wms.amf.*;

import com.wowza.wms.client.*;

import com.wowza.wms.module.*;

import com.wowza.wms.request.*;

import com.wowza.wms.stream.*;

import com.wowza.wms.rtp.model.*;

import com.wowza.wms.httpstreamer.model.*;

import com.wowza.wms.httpstreamer.cupertinostreaming.httpstreamer.*;

import com.wowza.wms.httpstreamer.smoothstreaming.httpstreamer.*;

public class StreamingRadio extends ModuleBase {

public void doSomething(IClient client, RequestFunction function,

AMFDataList params) {

getLogger().info(“doSomething”);

sendResult(client, params, “Hello Wowza”);

}

public void onAppStart(IApplicationInstance appInstance) {

String fullname = appInstance.getApplication().getName() + “/”

  • appInstance.getName();

getLogger().info("onAppStart: " + fullname);

}

public void onAppStop(IApplicationInstance appInstance) {

String fullname = appInstance.getApplication().getName() + “/”

  • appInstance.getName();

getLogger().info("onAppStop: " + fullname);

}

public void onConnect(IClient client, RequestFunction function,

AMFDataList params) {

getLogger().info("onConnect: " + client.getClientId());

}

public void onConnectAccept(IClient client) {

getLogger().info("onConnectAccept: " + client.getClientId());

}

public void onConnectReject(IClient client) {

getLogger().info("onConnectReject: " + client.getClientId());

}

public void onDisconnect(IClient client) {

getLogger().info("onDisconnect: " + client.getClientId());

}

}


!!!)StreamListener -class file is

package com.riverstream;

import java.sql.Date;

import java.sql.Time;

import org.joda.time.DateTime;

import com.wowza.wms.stream.publish.IStreamActionNotify;

import com.wowza.wms.stream.publish.PlaylistItem;

import com.wowza.wms.stream.publish.Stream;

public class StreamListener implements IStreamActionNotify {

@Override

public void onPlaylistItemStart(Stream stream, PlaylistItem playlistItem) {

// TODO Auto-generated method stub

System.out.print(“hello player started” + DateTime.now() );

}

@Override

public void onPlaylistItemStop(Stream stream, PlaylistItem playlistItem) {

// TODO Auto-generated method stub

// TODO Auto-generated method stub

System.out.print(“hello player stopped” + DateTime.now() );

}

}


this is my setting and code ,i have to play this offline radio(localhost) on vlc player using http ptotocol , So understand this coding and help me… Thanks …!

ok , your URL -[http://192.168.82.53:1935/live/rsstream0/playlist.m3u8] on VLC its working … thanks.

but my work is not completed i want list of winamp,windows media player… that is all the media player play this stream using http:// url format… , so plz list out all the http:// URL which is compatible to all the media player ,once again thanks for VLC support Http Url .

ok, but ‘Itune’ media player can play this stream using http:// ?

plz send the url according to itune media player using http:// protocol … thanks.