change Storage directory for streams

Yes I think there is a problem with slashes? how to solve that.

There must be a way to do this… without making subfolders per client.

How do you guys do integration with s3.

this is very important for us

it gives me this error :

ERROR server comment - MediaReaderFactory: getInstance: Missing definition for c

and runs in an infinite loop

I did this in play method :

params.set(PARAM1, new AMFDataItem(“C:\mnt\sdt-platfs1\images\forums2\FR\0\0\videos\videos_8dcd5c3c-9dea-43d3-b8e8-2145ee0c37e0.flv”));

  1. comment storageDir tag in application.xml
  1. onAppConnect do this :
public void onConnect(IClient client, RequestFunction function,
			AMFDataList params) {
		getLogger().info("onConnect: " + client.getClientId());
		
		client.getAppInstance().setStreamStorageDir("C:\\mnt\\sdt-platfs1\\images\\forums2\\");
		getLogger().info("onConnect: " + client.getClientId());
	}
  1. and call one function from flex client to set user folder path like this :
public void setPathValue(IClient client, RequestFunction function, AMFDataList params){
		if (getParam(params, PARAM1).getType() == AMFData.DATA_TYPE_STRING)
			FlvOperator.Path  = params.getString(PARAM1);
			System.out.println("path :: " + FlvOperator.Path);
			sendResult(client, params, "path set successfully");
	}
  1. override play method like this :
public void play(IClient client, RequestFunction function, AMFDataList params)
	{
		
		if (params.get(PARAM1).getType() == AMFData.DATA_TYPE_STRING)
		{
			String streamName = params.getString(PARAM1);
			System.out.println("com.ness.wms.module.FlvOperator.Path :: " + com.ness.wms.module.FlvOperator.Path);
			
			params.set(PARAM1, new AMFDataItem(com.ness.wms.module.FlvOperator.Path + params.get(PARAM1)));
	}
		com.wowza.wms.module.ModuleCore.play(client, function, params);
	}

and it works.

And also if I print value of client.getAppInstance().getStreamStorageDir()

it gives me proper value like “C:\mnt\sdt-platfs1\images\forums2\”

Thanks again for all the help

I am still not sure, how we would do if We have our flvs’ on any server and we need our storage directory to look like “http://…/…”

Change Application.xml /StorageDir to the location you want to use.

<StorageDir>c://mnt/sdt-platfs1/images/forums2/FR/0/0/videos</StorageDir>

Richard

Hello, Google brings me here :slight_smile:

Do you have this example for a mac OSX server ?

<StorageDir>MACHD://library/Movies/flop/</StorageDir>

doesn’t work …

thanks !

Ok, so symbolic link are working on OSX, where the Aliases are not !

To make a symlink, go to the terminal :

ln -s /target/path /link/path

Doing this allow you to put your video files on another drive easily.

Those threads puts me in the good way, thanks :slight_smile:

https://www.wowza.com/forums/showthread.php?17995-server-media-from-different-folder

http://gigaom.com/2011/04/27/how-to-create-and-use-symlinks-on-a-mac/