Ask a Question related to Macromedia Flash Flashcom, Design and Development.
-
B_Shack #1
FMS server record stream from stored FLV
All,
I have an application where a user records a temp cam video. This temp video
is stored on FMS. The user can crop the beginning and end times to save as the
final video.
The user passes the times through the nc.call method to FMS where the server
Stream gets the "final" flv (just the stream name), starts to record on the
"final" flv, and then plays the temp flv with the start and end times passed as
variables.
Now, the problem. If variables are passed, no cropping is accomplished. If I
hard-code the times, cropping is accomplished. How strange...Anyway, any
suggestion is appreciated.
Thanks,
Shack
//Client code
//__userID is varibale passed from logon (i.e. 123)
//__startTime is variable inputed to TextInput
//__endTime is variable inputted to TextInput
__nc.call(""submitVideo", null, __userID, _startTime, _endTime)
//Server side
Client.prototype.submitVideo = function(p_userID, p_startTime, p_endTime)
{
var userID = p_userID;
var start = p_startTime;
var end = p_endTime;
myStream = Stream.get(userID);//Creates the "final" flv stream for recording
myStream.onStatus = function(info){
switch (info.code) {
case "NetStream.Record.Stop" :
trace("Stream Record Stopped")
myStream.flush();
application.clientID.call("RecordVideo/onSubmitVideo",null);
break;
case "NetStream.Record.Start" :
trace("Stream Start Record")
//myStream.send("RecordVideo/onSubmitVideo",null);
break;
case "NetStream.Record.Failed" :
trace("Stream Record Failed")
//myStream.send("RecordVideo/onSubmitVideo",null);
break;
case "NetStream.Play.Start" :
trace("Stream Play Start")
//myStream.send("RecordVideo/onSubmitVideo",null);
break;
case "NetStream.Play.Stop" :
trace("Stream Play Stopped");
myStream.record(false);
//myStream.send("RecordVideo/onSubmitVideo",null);
break;
case "NetStream.Play.Failed" :
trace("Stream Play Failed")
//myStream.send("RecordVideo/onSubmitVideo",null);
break;
}
}
if(myStream){
trace("User ID :" + userID + "\nStart Time :" + start + "\nEnd Time :"+ end)
myStream.record();//Records the userID stream name to be stored as "final"
myStream.play("temp_" + userID, start, end); //Hard-coding values here crops
video
}
}
B_Shack Guest
-
Record live stream with different name
Hi all! I have a live streaming application running with FMS2 and I have come across an issue with recording streams. My application allows a... -
FMS2 fails to record the stream
Hi, This has been a frustrating week, so i REALLY appreciate any help in advance We have installed FMS 2.0.4 on linux (tried both ubunto and... -
FLV record stream varying quyality?
I am wondering how you would create an app which streams varying quality recorded FLVs, based on user input or bandwidth. Is it possible to take a... -
To record Stream de V?deo with bigger quality?
Already I finished to make the skeleton of my application... It is with that I want... Now the only problem that I do not know if exists solution... -
How to stream MP3s stored above the root
My mp3s are kept above the root to protect them from unauthorized download. I am currently using cfcontent to dynamically retrieve the audio files... -
JayCharles #2
Re: FMS server record stream from stored FLV
Well... for starters, I see a syntax error in you client side code:
__nc.call(""submitVideo", null, __userID, _startTime, _endTime)
I see an extra quote in that line before the name of the server side method.
I'm surpised the compiler didn't catch that, and even more surprised that you
didn't get a "method not found" error in the FMS debug.
When you see the trace from this line:
trace("User ID :" + userID + "\nStart Time :" + start + "\nEnd Time :"+ end)
do you see the values, or are they undefined?
JayCharles Guest
-
B_Shack #3
Re: FMS server record stream from stored FLV
Jay,
It's a typo here. Code compiles just fine. I recieve all the variables that
I pass to the servide side (that's why it's sooo strange). I even defined the
start and end as new numbers, but still no go. ???
Thanks,
Shack
B_Shack Guest



Reply With Quote

