Results 1 to 7 of 7

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

  1. #1
    Join Date
    Oct 2013
    Posts
    18

    Post 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.

  2. #2
    Join Date
    Sep 2011
    Posts
    1,934

    Default

    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

  3. #3
    Join Date
    Oct 2013
    Posts
    18

    Post

    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

    <Root>
    <Application>
    <!-- Uncomment to set application level timeout values
    <ApplicationTimeout>60000</ApplicationTimeout>
    <PingTimeout>12000</PingTimeout>
    <ValidationFrequency>8000</ValidationFrequency>
    <MaximumPendingWriteBytes>0</MaximumPendingWriteBytes>
    <MaximumSetBufferTime>60000</MaximumSetBufferTime>
    <MaximumStorageDirDepth>25</MaximumStorageDirDepth>
    -->
    <Connections>
    <AutoAccept>true</AutoAccept>
    <AllowDomains></AllowDomains>
    </Connections>
    <!--
    StorageDir path variables

    ${com.wowza.wms.AppHome} - Application home directory
    ${com.wowza.wms.ConfigHome} - Configuration home directory
    ${com.wowza.wms.context.VHost} - Virtual host name
    ${com.wowza.wms.context.VHostConfigHome} - Virtual host config directory
    ${com.wowza.wms.context.Application} - Application name
    ${com.wowza.wms.context.ApplicationInstance} - Application instance name

    -->
    <Streams>
    <StreamType>live</StreamType>
    <StorageDir>${com.wowza.wms.context.VHostConfigHome}/content</StorageDir>
    <KeyDir>${com.wowza.wms.context.VHostConfigHome}/keys</KeyDir>
    <!-- LiveStreamPacketizers (separate with commas): cupertinostreamingpacketizer, smoothstreamingpacketizer, sanjosestreamingpacketizer, mpegdashstreamingpacketizer, cupertinostreamingrepeater, smoothstreamingrepeater, sanjosestreamingrepeater -->
    <LiveStreamPacketizers>cupertinostreamingpacketizer,smoothstreamingpacketizer,sanjosestreamingpacket izer</LiveStreamPacketizers>
    <!-- Properties defined here will override any properties defined in conf/Streams.xml for any streams types loaded by this application -->
    <Properties>
    </Properties>
    </Streams>
    <Transcoder>
    <!-- To turn on transcoder set to: transcoder -->
    <LiveStreamTranscoder></LiveStreamTranscoder>
    <!-- [templatename].xml or ${SourceStreamName}.xml -->
    <Templates>${SourceStreamName}.xml,transrate.xml</Templates>
    <ProfileDir>${com.wowza.wms.context.VHostConfigHome}/transcoder/profiles</ProfileDir>
    <TemplateDir>${com.wowza.wms.context.VHostConfigHome}/transcoder/templates</TemplateDir>
    <Properties>
    </Properties>
    </Transcoder>

    <DVR>
    <!-- As a single server or as an origin, use dvrstreamingpacketizer in LiveStreamPacketizers above -->
    <!-- Or, in an origin-edge configuration, edges use dvrstreamingrepeater in LiveStreamPacketizers above -->
    <!-- As an origin, also add dvrchunkstreaming to HTTPStreamers below -->

    <!-- If this is a dvrstreamingrepeater, define Application/Repeater/OriginURL to point back to the origin -->

    <!-- To turn on DVR recording set Recorders to dvrrecorder. This works with dvrstreamingpacketizer -->
    <Recorders></Recorders>

    <!-- As a single server or as an origin, set the Store to dvrfilestorage-->
    <!-- edges should have this empty -->
    <Store></Store>

    <!-- Window Duration is length of live DVR window in seconds. 0 means the window is never trimmed. -->
    <WindowDuration>0</WindowDuration>

    <!-- Storage Directory is top level location where dvr is stored. e.g. c:/temp/dvr -->
    <StorageDir>${com.wowza.wms.context.VHostConfigHome}/dvr</StorageDir>

    <!-- valid ArchiveStrategy values are append, version, delete -->
    <ArchiveStrategy>append</ArchiveStrategy>

    <!-- Properties for DVR -->
    <Properties>
    </Properties>
    </DVR>

    <TimedText>
    <!-- VOD caption providers (separate with commas): vodcaptionprovidermp4_3gpp, vodcaptionproviderttml, vodcaptionproviderwebvtt, vodcaptionprovidersrt, vodcaptionproviderscc -->
    <VODTimedTextProviders>vodcaptionprovidermp4_3gpp</VODTimedTextProviders>

    <!-- Properties for TimedText -->
    <Properties>
    </Properties>
    </TimedText>

    <!-- HTTPStreamers (separate with commas): cupertinostreaming, smoothstreaming, sanjosestreaming, mpegdashstreaming, dvrchunkstreaming -->
    <HTTPStreamers>cupertinostreaming,smoothstreaming,sanjosestreaming</HTTPStreamers>
    <SharedObjects>
    <StorageDir></StorageDir>
    </SharedObjects>
    <Client>
    <IdleFrequency>-1</IdleFrequency>
    <Access>
    <StreamReadAccess>*</StreamReadAccess>
    <StreamWriteAccess>*</StreamWriteAccess>
    <StreamAudioSampleAccess></StreamAudioSampleAccess>
    <StreamVideoSampleAccess></StreamVideoSampleAccess>
    <SharedObjectReadAccess>*</SharedObjectReadAccess>
    <SharedObjectWriteAccess>*</SharedObjectWriteAccess>
    </Access>
    </Client>
    <RTP>
    <!-- RTP/Authentication/[type]Methods defined in Authentication.xml. Default setup includes; none, basic, digest -->
    <Authentication>
    <PublishMethod>digest</PublishMethod>
    <PlayMethod>none</PlayMethod>
    </Authentication>
    <!-- RTP/AVSyncMethod. Valid values are: senderreport, systemclock, rtptimecode -->
    <AVSyncMethod>senderreport</AVSyncMethod>
    <MaxRTCPWaitTime>12000</MaxRTCPWaitTime>
    <IdleFrequency>75</IdleFrequency>
    <RTSPSessionTimeout>90000</RTSPSessionTimeout>
    <RTSPMaximumPendingWriteBytes>0</RTSPMaximumPendingWriteBytes>
    <RTSPBindIpAddress></RTSPBindIpAddress>
    <RTSPConnectionIpAddress>0.0.0.0</RTSPConnectionIpAddress>
    <RTSPOriginIpAddress>127.0.0.1</RTSPOriginIpAddress>
    <IncomingDatagramPortRanges>*</IncomingDatagramPortRanges>
    <!-- Properties defined here will override any properties defined in conf/RTP.xml for any depacketizers loaded by this application -->
    <Properties>
    </Properties>
    </RTP>
    <MediaCaster>
    <RTP>
    <RTSP>
    <!-- udp, interleave -->
    <RTPTransportMode>interleave</RTPTransportMode>
    </RTSP>
    </RTP>
    <!-- Properties defined here will override any properties defined in conf/MediaCasters.xml for any MediaCasters loaded by this applications -->
    <Properties>
    </Properties>
    </MediaCaster>
    <MediaReader>
    <!-- Properties defined here will override any properties defined in conf/MediaReaders.xml for any MediaReaders loaded by this applications -->
    <Properties>
    </Properties>
    </MediaReader>
    <MediaWriter>
    <!-- Properties defined here will override any properties defined in conf/MediaWriter.xml for any MediaWriter loaded by this applications -->
    <Properties>
    </Properties>
    </MediaWriter>
    <LiveStreamPacketizer>
    <!-- Properties defined here will override any properties defined in conf/LiveStreamPacketizers.xml for any LiveStreamPacketizers loaded by this applications -->
    <Properties>
    <!-- Code changes by Sagar aher-->
    <Property>
    <Name>httpRandomizeMediaName</Name>
    <Value>true</Value>
    <Type>Boolean</Type>
    </Property>
    <!-- Code changes by Sagar aher-->
    </Properties>
    </LiveStreamPacketizer>
    <HTTPStreamer>
    <!-- Properties defined here will override any properties defined in conf/HTTPStreamers.xml for any HTTPStreamer loaded by this applications -->
    <Properties>
    <!-- Code changes by Sagar aher-->
    <!-- HTTP origin mode: on, off -->
    <Property>
    <Name>httpOriginMode</Name>
    <Value>on</Value>
    </Property>

    <!-- Apple HLS: cache control -->
    <Property>
    <Name>cupertinoCacheControlPlaylist</Name>
    <Value>max-age=1</Value>
    </Property>
    <Property>
    <Name>cupertinoCacheControlMediaChunk</Name>
    <Value>max-age=3600</Value>
    </Property>

    <!-- Smooth Streaming: cache control -->
    <Property>
    <Name>smoothCacheControlPlaylist</Name>
    <Value>max-age=1</Value>
    </Property>
    <Property>
    <Name>smoothCacheControlMediaChunk</Name>
    <Value>max-age=3600</Value>
    </Property>
    <Property>
    <Name>smoothCacheControlDataChunk</Name>
    <Value>max-age=3600</Value>
    </Property>

    <!-- Flash HDS: cache control -->
    <Property>
    <Name>sanjoseCacheControlPlaylist</Name>
    <Value>max-age=1</Value>
    </Property>
    <Property>
    <Name>sanjoseCacheControlMediaChunk</Name>
    <Value>max-age=3600</Value>
    </Property>
    <Property>
    <Name>cupertinoOnChunkStartResetCounter</Name>
    <Value>true</Value>
    <Type>Boolean</Type>
    </Property>
    <!-- Code changes by Sagar aher-->

    </Properties>
    </HTTPStreamer>
    <Repeater>
    <OriginURL></OriginURL>
    <QueryString><![CDATA[]]></QueryString>
    </Repeater>
    <Modules>
    <Module>
    <Name>RadioListener</Name>
    <Description>RSStream</Description>
    <Class>com.riverstream.RadioListener</Class>
    </Module>
    <Module>
    <Name>base</Name>
    <Description>Base</Description>
    <Class>com.wowza.wms.module.ModuleCore</Class>
    </Module>
    <Module>
    <Name>properties</Name>
    <Description>Properties</Description>
    <Class>com.wowza.wms.module.ModuleProperties</Class>
    </Module>
    <Module>
    <Name>logging</Name>
    <Description>Client Logging</Description>
    <Class>com.wowza.wms.module.ModuleClientLogging</Class>
    </Module>
    <Module>
    <Name>flvplayback</Name>
    <Description>FLVPlayback</Description>
    <Class>com.wowza.wms.module.ModuleFLVPlayback</Class>
    </Module>
    </Modules>
    <!-- Properties defined here will be added to the IApplication.getProperties() and IApplicationInstance.getProperties() collections -->
    <Properties>
    </Properties>
    </Application>
    </Root>






    ---------------------






    2)server.xml file is


    <Root>
    <Server>
    <CommandInterface>
    <HostPort>
    <IpAddress>*</IpAddress>
    <Port>8083</Port>
    </HostPort>
    </CommandInterface>
    <AdminInterface>
    <!-- Objects exposed through JMX interface: Server, VHost, VHostItem, Application, ApplicationInstance, MediaCaster, Module, Client, MediaStream, SharedObject, Acceptor, IdleWorker -->
    <ObjectList>Server,VHost,VHostItem,Application,ApplicationInstance,MediaCaster,Module,IdleWorker</ObjectList>
    </AdminInterface>
    <!-- JMXUrl: service:jmx:rmi://localhost:8084/jndi/rmi://localhost:8085/jmxrmi -->
    <JMXRemoteConfiguration>
    <Enable>false</Enable>
    <IpAddress>localhost</IpAddress> <!-- set to localhost or internal ip address if behind NAT -->
    <RMIServerHostName>localhost</RMIServerHostName> <!-- set to external ip address or domain name if behind NAT -->
    <RMIConnectionPort>8084</RMIConnectionPort>
    <RMIRegistryPort>8085</RMIRegistryPort>
    <Authenticate>true</Authenticate>
    <PasswordFile>${com.wowza.wms.ConfigHome}/conf/jmxremote.password</PasswordFile>
    <AccessFile>${com.wowza.wms.ConfigHome}/conf/jmxremote.access</AccessFile>
    <SSLSecure>false</SSLSecure>
    </JMXRemoteConfiguration>
    <UserAgents>Shockwave Flash|CFNetwork|MacNetwork/1.0 (Macintosh)</UserAgents>
    <ServerListeners>
    <!--
    <ServerListener>
    <BaseClass>com.wowza.wms.plugin.loadbalancer.ServerListenerLoadBalancerListener</BaseClass>
    </ServerListener>
    -->
    <!--
    <ServerListener>
    <BaseClass>com.wowza.wms.plugin.loadbalancer.ServerListenerLoadBalancerSender</BaseClass>
    </ServerListener>
    -->

    <ServerListener>
    <BaseClass>com.riverstream.RadioListener</BaseClass>
    </ServerListener>
    </ServerListeners>
    <VHostListeners>
    <!--
    <VHostListener>
    <BaseClass></BaseClass>
    </VHostListener>
    -->
    </VHostListeners>
    <HandlerThreadPool>
    <PoolSize>10</PoolSize>
    </HandlerThreadPool>
    <TransportThreadPool>
    <PoolSize>10</PoolSize>
    </TransportThreadPool>
    <RTP>
    <DatagramStartingPort>6970</DatagramStartingPort>
    <DatagramPortSharing>false</DatagramPortSharing>
    </RTP>
    <!-- Properties defined here will be added to the IServer.getProperties() collection -->
    <Properties>
    </Properties>
    </Server>
    </Root>



    ----------------------------



    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(p);

    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 ..!
    Last edited by sagar123AHER; 10-03-2013 at 04:44 AM.

  4. #4
    Join Date
    Dec 2007
    Posts
    21,962

    Default

    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

  5. #5
    Join Date
    Oct 2013
    Posts
    18

    Default

    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 .

  6. #6
    Join Date
    Dec 2007
    Posts
    21,962

    Default

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

    Richard

  7. #7
    Join Date
    Oct 2013
    Posts
    18

    Default

    ok, but 'Itune' media player can play this stream using http:// ?
    plz send the url according to itune media player using http:// protocol .. thanks.

Similar Threads

  1. tell me URL for i-tune media player using http:// protocol
    By sagar123AHER in forum General Forum
    Replies: 4
    Last Post: 10-08-2013, 06:41 AM
  2. VLC, Wowza and HTTP protocol
    By dariolb in forum General Forum
    Replies: 5
    Last Post: 07-06-2012, 05:30 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •