sure
so first what is working: i have a folder, lets say /usr/local/temp created thought my ftp client with permissions 777.
if i define this folder in the application.xml recording is ok. If i define this folder on the fly when recording from the swf client, it works too
now, the way i need it to work:
first my user sets his recording settings (name, blabla). this is saved to a db when user validate, and at the same time i create a new folder like this:
$dir1 = “mysite.com/htdocs/recordings/”.$adherent_id;
$dir2 = “mysite.com/htdocs/recordings/“.$adherent_id.”/”.$recordSessID; //this is the ID of the insert in the db. i want to save flv files in this folder so its not a mess on the server. Each session will have its own folder containing related flv’s
$ftpuser=“userftp”;
$ftppwd=“ftppassword”;
$ftpc = ftp_connect(“localhost”,21);
$cool = ftp_login($ftpc, $ftpuser, $ftppwd);
ftp_pasv($ftpc, true);
//i create userID folder if not exists
@ftp_mkdir($ftpc, $dir1);
//i created sessionID folder and sets permisions 777
ftp_mkdir($ftpc, $dir2);
ftp_chmod($ftpc, 0777, $dir2);
ftp_close($ftpc);
then the swf client gets back the session ID, and i defined the save path like this:
recordOptions.outputPath = “/mysite.com/htdocs/recordings/”+_adherentID+“/”+_recordingID+“/”+_recordID+“.flv”;
then i start recording. no errors in wowza logs:
2011-12-25 11:24:08 CET create stream INFO 200 - - defaultVHost videorecording 1412 0.015 [any] 1935 rtmp://myserverIP:1935/videorecording/1412 122.155.37.45 rtmp http://www.mysite.com/visiohtml5/visio_HTML5.swf?pseudo=&adherent_id=&sponsor_id=1&roomID=1412&isAdmin=&audioMess=2&roomName=mysite WIN 11,1,102,55 886594029 3595 3413 1 - 0 0 - - - - 0 0.0 rtmp://myserverIP:1935/videorecording/1412 rtmp://myserverIP:1935/videorecording/1412 - rtmp://myserverIP:1935/videorecording/1412 -
2011-12-25 11:24:09 CET publish stream INFO 200 886594029 - defaultVHost videorecording 1412 0.518 [any] 1935 rtmp://myserverIP:1935/videorecording/1412 122.155.37.45 rtmp http://www.mysite.com/visiohtml5/visio_HTML5.swf?pseudo=&adherent_id=&sponsor_id=1&roomID=1412&isAdmin=&audioMess=2&roomName=mysite WIN 11,1,102,55 886594029 3703 3455 1 - 56 0 886594029 - - - 0 0.0 rtmp://myserverIP:1935/videorecording/1412/886594029 rtmp://myserverIP:1935/videorecording/1412/886594029 - rtmp://myserverIP:1935/videorecording/1412 -
2011-12-25 11:24:10 CET comment server INFO 200 - ModuleStreamRecord.startRecording: stream:886594029 format:flv append:true outputPath:/usr/local/apache/sites/mysite.com/htdocs/recordings/1/1139/886594029.flv versionFile:true startOnKeyFrame:true recordData:true - - - 14.98 - - – - - - - - - - - - - - - - - - - - - - - -
when stopping recording:
2011-12-25 11:24:33 CET unpublish stream INFO 200 886594029 - defaultVHost videorecording 1412 24.4 [any] 1935 rtmp://myserverIP:1935/videorecording/1412 122.155.37.45 rtmp http://www.mysite.com/visiohtml5/visio_HTML5.swf?pseudo=&adherent_id=&sponsor_id=1&roomID=1412&isAdmin=&audioMess=2&roomName=mysite WIN 11,1,102,55 886594029 293749 3614 1 - 288749 0 886594029 - - - 0 0.0 rtmp://myserverIP:1935/videorecording/1412/886594029 rtmp://myserverIP:1935/videorecording/1412/886594029 - rtmp://myserverIP:1935/videorecording/1412 -
2011-12-25 11:24:33 CET destroy stream INFO 200 886594029 - defaultVHost videorecording 1412 24.401 [any] 1935 rtmp://myserverIP:1935/videorecording/1412 122.155.37.45 rtmp http://www.mysite.com/visiohtml5/visio_HTML5.swf?pseudo=&adherent_id=&sponsor_id=1&roomID=1412&isAdmin=&audioMess=2&roomName=mysite WIN 11,1,102,55 886594029 293749 3614 1 - 288749 0 886594029 - - - 0 0.0 rtmp://myserverIP:1935/videorecording/1412/886594029 rtmp://myserverIP:1935/videorecording/1412/886594029 - rtmp://myserverIP:1935/videorecording/1412 -
2011-12-25 11:24:33 CET disconnect session INFO 200 886594029 - defaultVHost videorecording 1412 25.728 [any] 1935 rtmp://myserverIP:1935/videorecording/1412 122.155.37.45 rtmp http://www.mysite.com/visiohtml5/visio_HTML5.swf?pseudo=&adherent_id=&sponsor_id=1&roomID=1412&isAdmin=&audioMess=2&roomName=mysite WIN 11,1,102,55 886594029 293749 3614 - - - - - - - - - - - - -rtmp://myserverIP:1935/videorecording/1412 -
2011-12-25 11:25:33 CET app-stop application INFO 200 1412 videorecording/1412 - - - 98.101 - - - – - - - - - - - - - - - - - - - - - - - -
2011-12-25 11:25:33 CET comment server INFO 200 - ModuleStreamRecord.onAppStop - - - 98.102 - - - - – - - - - - - - - - - - - - - - - - - -
2011-12-25 11:25:33 CET comment server INFO 200 - stopRecording: 886594029 - - - 98.119 - - - - – - - - - - - - - - - - - - - - - - - -
if i create the folders with php the same way but with 755 permissions, or if the folder doesnt exists, i have errors in wowzalogs
i confirm that manually created and on the fly folders have same permissions (777), belongs to same user/group, and are created with the same ftp user.
i am recording regular audio/video feed captured from flashplayer
thanks for your help