Copy link to clipboard
Copied
I am trying to record the h.264 long video through fms server side code(more than 2 hour), but video recording is stopped before I stop publishing the video, and it’s not throwing any error in server side as well as client side, I have given the video recording code
stream=Stream.get("mp4:testStream.f4v");
if(stream)
{
stream.record("append");
stream.play(streamName, -1, -1);
}
and recorded video also not playing fine, its stuck in middle. should I need to modify anything? Any help are appreciated......
Copy link to clipboard
Copied
Hi,
Please use the recommended Application - DVRCast - for Server Side recording and report back if you are still not able to record content.
Thanks,
Shiven
Copy link to clipboard
Copied
Cant I record the stream with out using the DVR cast application? If I must to use DVRCast application please could you tell me whats the reason for that. what should I do for recording the stream using DVRCast
Copy link to clipboard
Copied
Can you paste the whole server-side code and what are you using for publishing? And is there set pattern where your recording stops? Can you check your server-side core.00.logs and see if you see any recording failures?
Copy link to clipboard
Copied
For publishing I am using the action script code, It stops after 40 min some time its recording fine upto two hours I count find where its stoping and why its happening, I am giving the server side code and client publishing code and the log with this
Server side code
------------------------
application.onAppStart = function() { trace("app fme started!"); application.message_so = SharedObject.get( "message"); // Initialize the unique user ID application.noOfUser = 0; } application.onConnect = function(client) { this.acceptConnection(client); client.id = "u" + application.noOfUser++; client.recordStream=function(streamName) { trace('record called'); stream=Stream.get("mp4:"+streamName+".f4v"); if(stream) { stream.record("append"); stream.play(streamName, -1, -1); live=true; } } client.stopRecordingStream=function(streamName) { stream=Stream.get("mp4:"+streamName+".f4v"); if(stream) { stream.flush(); msg=stream.record(false); live=false; stream.play(false); } } } application.onPublish = function (client, stream) { } application.onUnpublish = function(client, stream) {
}
client side code
------------------------------------------------------------------------------------------------------------------------
private function publishCamera():void {
ns = new NetStream(nc);
if(cmbEncoder.selectedItem.data=="Sorenson")
{
ns.videoStreamSettings=new VideoStreamSettings();
}
else//H.264
{
var h264Codec:H264VideoStreamSettings=new H264VideoStreamSettings();
h264Codec.setKeyFrameInterval(12);
h264Codec.setProfileLevel(H264Profile.BASELINE, H264Level.LEVEL_5_1);
ns.videoStreamSettings=h264Codec;
}
cam = Camera.getCamera(cmbCamera.selectedIndex.toString());
mic = Microphone.getMicrophone(cmbMicroPhone.selectedIndex);
var resolutionWidth:Number;
var resolutionHeight:Number;
var videoQuality:Number;
resolutionWidth=768;
resolutionHeight=576;
ns.client = this;
ns.addEventListener(NetStatusEvent.NET_STATUS, onNetStatus);
ns.addEventListener(AsyncErrorEvent.ASYNC_ERROR, asyncErrorHandler);
videoQuality=(Number(cmbBandWidth.selectedItem.data)/8)*1024;
cam.setQuality(videoQuality, 0);
/* Set the mode of the camera component
width, height, fps
this will be the recorded size of the video
*/
cam.setMode(resolutionWidth,resolutionHeight,12);
mic.rate = 11;
ns.attachCamera(cam);
ns.attachAudio(mic);
ns.publish("mp4:testStream.f4v");
nc.call('recordStream',null,'testStream');
}
---------------------------------------------------------------------------------------------------------------------------------------------
core.00.log
--------------------
#Version: 1.0
#Start-Date: 2012-09-07 10:06:18
#Software: Adobe Flash Media Server 4.0.0 r1121 x86
#Date: 2012-09-07
#Fields: date time x-pid x-status x-ctx x-comment
2012-09-07 10:06:18 1180 (i)2631174 Listener started ( _defaultRoot_ ) : 192.168.173.184:19350 (rtmfp-core)/v4 -
2012-09-07 10:06:18 1180 (i)2631174 Listener started ( _defaultRoot_ ) : 127.0.0.1:19350 (rtmfp-core)/v4 -
2012-09-07 10:06:18 1180 (i)2631509 Public rtmfp-core addresses for listener _defaultRoot_ are: 192.168.173.184:19350;127.0.0.1:19350 -
2012-09-07 10:06:18 1180 (i)2581246 Core (1180) sending register cmd to edge. -
#Date: 2012-09-07
#Fields: date time x-pid x-status x-ctx x-comment
2012-09-07 11:39:02 5696 (i)2581237 Starting admin app on core (5696). -
2012-09-07 11:39:02 5696 (i)2581238 Core (5696) connecting to admin. -
2012-09-07 11:39:02 5696 (i)2581231 Core (5696) connected to admin. -
2012-09-07 11:39:02 5696 (i)2631174 Listener started ( _defaultRoot_ ) : 192.168.173.184:19352 (rtmfp-core)/v4 -
2012-09-07 11:39:02 5696 (i)2631174 Listener started ( _defaultRoot_ ) : 127.0.0.1:19352 (rtmfp-core)/v4 -
2012-09-07 11:39:02 5696 (i)2631509 Public rtmfp-core addresses for listener _defaultRoot_ are: 192.168.173.184:19352;127.0.0.1:19352 -
2012-09-07 11:39:02 5696 (i)2581246 Core (5696) sending register cmd to edge. -
2012-09-07 11:39:02 5696 (i)2581234 Core (5696) connection to admin accepted. -
-------------------------------------------------------------------------------------------------------------------------------------
Copy link to clipboard
Copied
Your code looks ok and difficult to conclude what's goign wrong. Can you paste your application logs too? If there is a way to attach can you attach all your logs and server and client side source files. If there is no way to attach here - please drop me any email with attachments to rchari@adobe.com
Copy link to clipboard
Copied
Where will be the application log? can you please give me the code which working fine? am I missing anything?
Copy link to clipboard
Copied
You can find applications logs in <FMSinstalldir>/logs/_defaultVHost_/<yourApplication>