save streaming in different file
I want to record the my stream at media server with file name 1.flv, and after 30 min same stream saved in another file like 2.flv, same prcess atfetr each 30 min.
How to do that
I want to record the my stream at media server with file name 1.flv, and after 30 min same stream saved in another file like 2.flv, same prcess atfetr each 30 min.
How to do that
Do you want to do server-side record or on client side. Either ways the logic remains the same:
You can define a timer that calls a function every 30 minutes. In that function unpublish the first stream and start publish of the second stream with the new name. Let's say
//Pseudocode
var streamName:string = "1";
var counter:Number = 1;
var timer:Timer = new Timer(30000);
timer.addEventListener(TimerEvent.TIMER,timeout);
//Create new netConnection and Initialize a netstream , let's say nc is NetConnection and ns is you new NetStream;
........
........
........
ns.publish(streamName,"record");
timer.start();
.........
..........
...........
.........
function timeout() {
//Unpublish the netstream
counter++;
streamName = counter.toString();
ns.publish(streamName,"record");
}
//Finally when you want to stop issue timer.stop()
I hope this can get you started. Please revert back if you need clarifications.
Thanks,
Abhishek
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.