Changing the default path of application's folder in fms
Copy link to clipboard
Copied
Hi,
Now, the path that I am using for application in the server is following:
/opt/adobe/fms/applications/live_test
Actually I am the application is for recoeding live stream. The recorded videos are placing in the folder named live_test as specififed above.
But I want to change this path. There is a folder named public in the root directory. In the "public" folder we have a folder named Recorded_Videos, I need to place the recorded videos on this folder. How can I do this. Can anybody help me to do this. This is an urgent requirement. So please help me.
Another issue that occurs while recording is NetStream.Record.noAccess. This is occuring while the recorded video is placing on client's flash media server with the path that i specified above. But when i running it in the local flash media server(developer version), its working well. The recorded files are placed on live_test folder. In the client's server the stream is not recording, instead its showing an error like "NetStream.Record.noAccess". The code that I am using for recording live stream is follows:
stop();
var nc = new NetConnection();
var CommPage = 'http://68.233.8.57/videos/destination';
System.security.allowDomain(CommPage);
connect_pb.onRelease = function(){
if(this.label == "Connect"){
status_txt.text += "Connecting..." + newline;
this.label = "Disconnect";
nc.connect("rtmp://192.168.0.22/live_test")
} else {
status_txt.text += "Disconnecting." + newline;
this.label = "Connect";
myvid.attachVideo(null);
myvid.clear();
ns.close();
rec_ns.close();
}
}
nc.onStatus = function(info) {
status_txt.text += "NC.onStatus> info.code: " + info.code + newline;
if (info.code == "NetConnection.Connect.Success") {
status_txt.text = "Connected to " + this.uri + newline;
startstop_pb.enabled = true;
createNetStream(this);
RecordNetStream(this);
}
}
createNetStream = function(nc){
ns = new NetStream(nc);
ns.onStatus = function(info) {
status_txt.text += "NS.onStatus> info.code: " + info.code + newline;
}
mycam = Camera.get();
mycam.setQuality(25600, 0);
mymic = Microphone.get();
mymic.setRate(11);
ns.attachVideo(mycam);
ns.attachAudio(mymic);
myvid.attachVideo(mycam);
ns.publish("livevideo","live");
}
RecordNetStream = function(nc){
rec_ns = new NetStream(nc);
var xml_feed = new XML();
xml_feed.onLoad = function(loaded) {
};
var dt1:Date = new Date();
var dt0:String = String(dt1+":"+dt1.getTime());
dt0 = dt0.split(' ').join('');
dt0 = dt0.split(':').join('');
dt0 = dt0.split('+').join('');//trace(dt0);
var send_lv:LoadVars = new LoadVars();
var RecordURL = CommPage+"?name="+dt0;
send_lv.sendAndLoad(RecordURL, xml_feed, "POST");
rec_cam = Camera.get();
rec_cam.setQuality(25600,0);
rec_mic = Microphone.get();
rec_mic.setRate(11);
rec_ns.attachVideo(rec_cam);
rec_ns.attachAudio(rec_mic);
rec_ns.publish(dt0,"record");
}
Regards,
Sreelash

Copy link to clipboard
Copied
For your first question, see the documentation on configuring virtual directories:
http://livedocs.adobe.com/flashmediaserver/3.0/docs/help.html?content=03_configtasks_37.html
For your second question, I typically see a noAccess status when one of the following are true:
1. Another client is using the stream to publish (or it has been less than two seconds since another client published to the stream)
2. The client does not have write access. See the client.writeAccess property in the server side actionscript documentation.
Copy link to clipboard
Copied
Hi,
Now the client had changed the default value of LIVE_DIR parameter to LIVE_DIR = /opt/adobe/fms/webroot/live_recorded( /opt/adobe/fms/webroot/live_recorded) . Still the NoAccess error is reporting. Is there any changes to be make in the code since the client changes the LIVE_DIR path. Also how can I test Client.writeAccess property. Now I am not using any asc file for broadcasting or recording. Inorder to make this test, we need to create an asc file na?
Regards,
Sreelash
Copy link to clipboard
Copied
Are you trying to record to "live" application which comes with default installation of FMS, if you are doing that then you will get Record.NoAccess as "live" application does not allow recording. Now hopefully you have FMIS and not FMSS. If you are having FMSS, you will just get live & vod apps and both of them you wont be allowed to record.
Now I will assume you have FMIS :
Please use other app to record other than "live". Renaming "live" to "live_test" or changing its location wont help, you will still get error.
In order to record do following things,
1. Create a folder called "recordApp" - since you are triggering record from client side you dont need any server-side code.
2. Just change application name in your client connection URL to connect to "recordApp" instead of "live_test"
3. You dont have to change anything in fms.ini so keep the default as it comes in installation.
4. As mentioned by JayCharles please use :http://livedocs.adobe.com/flashmediaserver/3.0/docs/help.html?content=03_configtasks_37.html for doing VirtualDirectory settings so that you can record your files in particular directory. (However I would note one thing is that VirtualDirectory feature is more for play than record/ingest)
5.Give write permissions to your folder where you would be recording.
please let me know if this does not work
