Results 1 to 2 of 2

Thread: Audio Only Stream: Live advertising insertion

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    May 2009

    Default Audio Only Stream: Live advertising insertion

    We have a continuous live stream we are running through Wowza Streaming Engine and transcoding to a few bitrates and pushing the RTMP to Akamai. I'd like to be able to programmatically insert a 30 second mp3 promo/ad into the stream, then switch back to the original live source, without stopping the stream or restarting the application.

    The closest forum I see is: however, this appears to create multiple playlists, one for each asset.

    I've coded it so we have an HTTProvider2Base that I can pass which promo I'd like to switch to, then be able to switch back to the live stream.

    I'm seeing a few things that I don't understand:

    1.) When I make a call to switch playlists, it takes about 5 seconds for the new assets to start playing, and there is buffering before it begins to play.

    2.) If I create a playlist that is a promo, then the live stream in the same playlist, the transition is instantaneous. Why is this different than #1?

    3.) We are trying to push our transcoded streams to Akamai, but it appears every time you switch the playlist, the transcoder is reset, and this seems to break the stream Akamai is trying to read.

    4.) The publishStream doesn't seem to start right away. Do I need to be waiting for a callback before the startMediaCasterStream is finished before I can push that playlist into a stream?

    Here is some of the code we are using:

    	String theStreamName = "publishStream";
    	String streamName = "";
    	if( action.equalsIgnoreCase( "start" ) )
    		appInstance.startMediaCasterStream(streamName, streamType);
    		Stream stream = Stream.createInstance(appInstance, theStreamName);						
    		appInstance.getProperties().setProperty(theStreamName, stream);
    		Playlist start_playlist = new Playlist("start");;
    		WMSLoggerFactory.getLogger(null).info("AMVDM.API: startMediaCasterStream: streamName: " + streamName + " & streamType: " + streamType);
    		retStr = "<html><head><title>" + streamName
    				+ "</title></head><body>" + streamName + " has been started</body></html>";
    	else if( action.equalsIgnoreCase( "stop" ) )
    		WMSLoggerFactory.getLogger(null).info("AMVDM.API: stopMediaCasterStream: streamName: " + streamName);
    		retStr = "<html><head><title>" + streamName
    				+ "</title></head><body>" + streamName + " has been stopped</body></html>";
    	else if( action.equalsIgnoreCase( "play_promo" ))
    		Playlist promo_playlist = new Playlist("promo");
    		promo_playlist.addItem("mp3:psa.mp3", 0, -1);
    		promo_playlist.addItem( streamName, -2, -1);
    		appInstance.getProperties().setProperty( promo_playlist.getName(), promo_playlist );
    		Stream stream = (Stream)appInstance.getProperties().getProperty(theStreamName);;
    		WMSLoggerFactory.getLogger(null).info( "AMVDM.API: switching to promo: streamName: " + streamName );
    		retStr = "<html><head><title>" + streamName
    				+ "</title></head><body>" + streamName + " has been switched to a promo</body></html>";
    	else if( action.equalsIgnoreCase( "play_live_stream" ))
    		Playlist livestream_playlist = new Playlist("livestream");
    		livestream_playlist.addItem( streamName, -2, -1);
    		appInstance.getProperties().setProperty( livestream_playlist.getName(), livestream_playlist );
    		Stream stream = (Stream)appInstance.getProperties().getProperty( theStreamName);;
    		WMSLoggerFactory.getLogger(null).info( "AMVDM.API: switching to live stream: streamName: " + streamName );
    		retStr = "<html><head><title>" + streamName
    				+ "</title></head><body>" + streamName + " has been switched to the live stream</body></html>";
    Last edited by angelfilm; 11-05-2014 at 04:05 PM.

Similar Threads

  1. About the insertion of emergency live signal
    By bordon in forum Assistance with live events
    Replies: 1
    Last Post: 08-22-2013, 10:23 AM
  2. IN-Stream Ad Insertion in live stream wowza
    By daljit.singh in forum Integrating Wowza into your workflow
    Replies: 1
    Last Post: 05-15-2013, 01:13 AM
  3. adding advertising layers
    By RobbieRaas in forum General Forum
    Replies: 2
    Last Post: 01-21-2012, 03:24 PM

Posting Permissions

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