I am trying to streams my flvs’ from my “c” drive instead of default storage directory .
I have override Play() method in my custom module 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);
params.set(PARAM1, new AMFDataItem("c://mnt/sdt-platfs1/images/forums2/FR/0/0/videos/videos_8dcd5c3c-9dea-43d3-b8e8-2145ee0c37e0.flv"));
}
com.wowza.wms.module.ModuleCore.play(client, function, params);
}
after making connection from client I get this errorr
WARN server comment c://mnt/sdt-platfs1/images/forums2/FR/0/0/videos/videos_8dcd5c3c-9dea-43d3-b8e8-2145ee0c37e0.flv open: java.io.FileNotFoundException: C:\Program Files\Wowza Media Systems\Wowza Media Server 2\applications\videoeditor\streams\_definst_\c___mnt_sdt-platfs1_images_forums2_FR_0_0_videos_videos_8dcd5c3c-9dea-43d3-b8e8-2145ee0c37e0.flv (The system cannot find the file specified)
Please help how can I Achieve this?
Also do I need to change Application.xml for this module
You don’t want to do an application instance per connection. This is very inefficient. It would be better to change the relative path using the stream name.
You can use Streams/StorageDir setting in conf/[application]/Application.xml to change the root path to the storage location. You can rewrite the stream name if you override the play command. So for example if for each user you want to have his/her own storage location then you could create a directory structure like this:
/drive/mycontent
under which you have folders for each user:
/drive/mycontent/user1
/drive/mycontent/user2
You can set the Streams/StorageDir to /drive/mycontent. Then in the play command based on the parameters you send in you can rewrite the stream name to include the user id:
You can change StorageDir dynamically through IApplicationInstance method, but I think that will change it for all clients. That’s not what you are trying to do, is it?
But I’m pretty sure it just changes it for everyone, per app instance. It would only work if your application is used by one client at a time… Unless each client connects to a different application instance:
Charlie is also suggesting subfolders of the content location. He’s setting the location in play command server-side but essentially same as netstream.play(“1234/example.flv”)
I guess you are having problems with backslashes, or it just doesn’t work.
right, thats not what we want to do, we have to have different storage directory for each client. it will be dependent on logged in user to application
WARN server comment videos_8dcd5c3c-9dea-43d3-b8e8-2145ee0c37e0.flv open: java.io.FileNotFoundException: C:\Documents and Settings\p7105669\Documents\workspace\sampleflvcropper\C\mnt\sdt-platfs1\images\forums2\FR\0\0\videos\videos_8dcd5c3c-9dea-43d3-b8e8-2145ee0c37e0.flv (The system cannot find the path specified)
dont know from where its appending " C:\Documents and Settings\p7105669\Documents\workspace\sampleflvcropper"
Note : sampleflvcropper is the name of my project in workspace of wowzaIDE
I did the same thing as you have suggested in very first attempt. (overriding the play method)
but i am getting this error
WARN server comment c://mnt/sdt-platfs1/images/forums2/FR/0/0/videos/videos_8dcd5c3c-9dea-43d3-b8e8-2145ee0c37e0.flv open: java.io.FileNotFoundException: C:\Program Files\Wowza Media Systems\Wowza Media Server 2\applications\videoeditor\streams\_definst_\c___mnt_sdt-platfs1_images_forums2_FR_0_0_videos_videos_8dcd5c3c-9dea-43d3-b8e8-2145ee0c37e0.flv (The system cannot find the file specified)