Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: Stream redirection

  1. #1

    Default Stream redirection

    Hi, I have a problem to resolve and any help would be appreciate
    This is my scenario:

    I have flash live encoder pushing video to
    rtmp://myurl/myapplication/somefolder

    this should be a friendly url to allow people to have something simple to remember.
    In reality the mount point is something similar to
    rtmp://myurl/myapplication/clientid/guid
    the guid is 32 alphanumeric characters long and I got this from a database.

    My question is:

    1) how can handle the publish event from flash live encoder on wowza?
    2) how I can redirect the stream to a different mount point?
    3) there any way to understand if the client is pushing video is flash live encoder or a flash/flex client?

    Thanks in advance

  2. #2
    Join Date
    Dec 2007
    Posts
    28,412

    Default

    1) You can use the onPublish event in a Wowza Module using the Wowza IDE

    2) Try the stream alias package for this.

    3) I'm not sure exactly, but you can put a breakpoint or trace statements on the onMetaData callback and compare
    Code:
    var client:Object
    client.onMetaData = function(infoObject:Object):void
    {
    trace("onMetaData");
    for (var propName:String in infoObject.info)
    	{
    	trace("  "+propName + " = " + infoObject.info[propName]);
    }
    }
    netconnection.client = client
    Richard

  3. #3

    Default

    Hi Richard,

    I've seen the stream alias link.
    If I understand correctly there is an override of the play method.
    My problem is not rewrite the url to a new one. I'd like actually to know if there is a way to redirect a publish stream from a mount point into another server side
    I'm not sure also if the redirectConnection method on the client object could be useful or not. I tried without any success.

    Francesco

  4. #4
    Join Date
    Dec 2007
    Posts
    28,412

    Default

    I don't think redirecting client-side will accomplish that. What is the scenario for this?

    Richard

  5. #5

    Default

    Basically we have flash live encoder (the only client will be this, no flex/flash) as client.
    Our back end generate a mount point like:

    rtmp://serverlurl/1/546/E1409AF2-8707-404E-BBF6-878F80C7DAB2

    to avoid this complicated url for our client, we want to provide some more friendly url like this

    rtmp://serverurl/1/546/myfolder

    Now flash live encoder will push video using the rtmp://serverurl/1/546/myfolder, and we want wowza redirect the pushed stream on the other mount point rtmp://serverlurl/1/546/E1409AF2-8707-404E-BBF6-878F80C7DAB2

    We cannot modify the structure of the url with the guid, because all the players are configured to work with this kind of mount point. Also we could have as a client newtek tricaster and using this we cannot use any copy/paste for the url as tricaster run fullscreen cutting any access to the operating system

    Is it possible to redirect the stream? Or there is any other way to perform this task?

    Thanks a lot for your time

    Francesco

  6. #6

    Default

    You can override the publish command and change the stream name on the fly. The code looks something like this:

    Code:
    package com.wowza.wms.plugin.overrideexample;
    
    import com.wowza.wms.amf.*;
    import com.wowza.wms.client.*;
    import com.wowza.wms.module.*;
    import com.wowza.wms.request.*;
    
    public class ModuleOverrideExample extends ModuleBase
    {
    	public void publish(IClient client, RequestFunction function, AMFDataList params)
    	{
    		if (params.get(PARAM1).getType() == AMFData.DATA_TYPE_STRING)
    		{
    			String publishName = params.getString(PARAM1);
    			
    			// modify it here
    			publishName = publishName+"+testing123";
    			
    			params.set(PARAM1, new AMFDataItem(publishName));
    		}
    		this.invokePrevious(client, function, params);
    	}
    }
    Charlie

  7. #7

    Default

    yes it works. You are the best Charlie thanks a lot

  8. #8
    Join Date
    May 2009
    Posts
    1

    Default how to ?

    We have a NewTek Tricaster - and would like to use the Wowza Amazon instance

    is there a how-to for this anywhere?

  9. #9

    Default

    The instructions are going to be similar to this:

    http://www.wowzamedia.com/forums/showthread.php?t=1063

    Charlie

  10. #10

    Default

    Hate to resurrect and old thread.. but I do have the need to redirect a play request to a new container.

    So my base streamDir in the Application xml is something like this:
    /content/

    That is used for recording. When someone requests to play a stream I want the content to be served from something like this:
    /processed_content/

    I have tried switching the stream storage dir in the onPlay and onPublish handlers.. like so:

    Code:
    public void onPlay(IMediaStream stream, String streamName, double playStart, double playLen, int playReset) 
    		{
    			log("onPlay: "+stream.getName());
    			stream.getClient().getAppInstance().setStreamStorageDir("/processed_content/");
    		}
    public void onPublish(IMediaStream stream, String streamName, boolean isRecord, boolean isAppend)
    		{
    			log("onPublish: "+streamName);
    			stream.getClient().getAppInstance().setStreamStorageDir("/content/");
    		}
    That doesn't seem to be working.. I've even tried to switch the stream name for the stream. I've started to look into the IMediaStreamPlay object to see if I can use that.

    Thanks for any and all help.

    Jake

Page 1 of 2 12 LastLast

Tags for this Thread

Posting Permissions

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