Its not that difficult. Just create a simple application of yours. Steps as follows: 1. Create a folder called "myApp". 2. Create a "streams" folder and under streams folder create "_definst_" folder. Place all your VOD files here. 3. Create a main.asc file and put below code in it application.onConnect = function(){ return true; } application.onPublish = function(myClient,myStream){ myStream.record(); } application.onUnpublish = function(myClient,myStream){ myStream.record(false); } Place this main.asc file under "myApp" folder. 4. Now to publish your code would be: nc.connection("rtmp://10.8.4.56:1935/myApp"); ns.publish("mycamera","live"); So when you do this automatically recorded file by name "mycamera.flv" would get created. 5. So if you want to play live stream your client would issue: ns.play("mycamera",-2,-1,true) For on goign recording i.e. DVR kind of play ns.play("mycamera",0,-1,true) For VOD , say you already have file called "sample" , issue ns.play("sample",0,-1,true) In all above cases , netconnection would be to "myApp" like how publisher does. See if this solves your problem.
... View more