Hi all
a few questions regarding live streams recording since wowza 4:
i was previously using the liveStreamRecord add when i was using wowza 3
i was calling the recording this way:
[HTML]var recordSetting:Object = new Object();
// File format: flv or mp4 is supported (if not specified it will base it on the
// stream prefix; 1 (or no prefix): .flv and 2: .mp4)
recordSetting.format = 1;
// Append to current file if exists
recordSetting.append = false;
// Output path (if not set defaults to normal StorageDir using stream name)
recordSetting.outputPath = “/home/recordings/”+recordingID+"/"+streamID+".flv";
// If not appending to the file do we want to version the old file
recordSetting.versionFile = true;
// Start on a key frame or start on first package (if audio only must be false)
if(_recordOptions==“1” || _recordOptions==“3”) {
recordSetting.startOnKeyFrame = false;
} else {
recordSetting.startOnKeyFrame = true;
}
// Record data packets as well as audio/video packets (data packets are not recorded in mp4 format)
recordSetting.recordData = true;
(parent as MovieClip)._nc.connection.call(“startRecording”, null, streamID, recordSetting);[/HTML]
since i migrated to wowza 4, i didn’t notice at first that the recording api was available,so i was still using the livestreamrecord add. i then realized that the settings sent in the recordsettings (specially format) were not overriding the default values (can you confirm this behavior ?) (for instance, i’m using flash rtmp (spark+speex), so i was recording in FLV, and then converting recordings using ffmpeg.
so, since i migrated, video streams were not recorded correctly (only audio was, there was a log message saying something like "spark not supported for mp4 blabla). not i’m still using the livestreamrecord add (is it supposed to work as it should with wowza 4 ?)
i changed in the Application.xml the default value for format, and the recordings are almost ok:
-
now audio AND video are recorded
-
but in the logs i have this:
[HTML]52372:2014-09-05 16:32:28 CEST comment server INFO 200 - StreamRecorder[videochat2/5784] recordStream: action:startRecording stream:1423612791 format:mp4 versioning:version outputFile:1423612791.flv outputPath:/home/recordings/5987 startOnKeyFrame:true moveFirstVideoFrameToZero:true splitOnTcDiscontinuity:false recordData:true segmentDuration:900000 segmentSize:10485760 segmentSchedule:0 * * * * * notifyListener: null fileTemplate:null fileVersionDelegate:StreamRecorderFileVersionDelegate – - 2803857.462 - - - - - - - - - - - - - - - - - - – - - - - -
[/HTML]
note that while i’m specifying format = 1 in the as3 code, and i defined flv as default format, the format specified in the logs is still mp4…but the files are recorded in flv !
another issue is: i’m recording many streams at the same time in the same instance: 1 audio/video (webcam and micro of the attendee) and 1 video only (whiteboard recorded throught a java applet built with the following lib: http://www.smaxe.com/product.jsf?id=juv-rtmp-client. on the wowza 3 using livestreamrecord, the sync between both recordings were fine. apparently recordings on the wowza 4 instance (still using livestreamrecord) are out of sync, missing frames etc…is it related to the add that i should abandon ? and if yes, i’m a little bit confused about the recording options: when looking in the webcam recording sample, there is this H264 function:
[HTML]function initH264Recording(nsPublish:NetStream)
{
var h264Settings:H264VideoStreamSettings = new H264VideoStreamSettings();
h264Settings.setProfileLevel(H264Profile.BASELINE, H264Level.LEVEL_3);
nsPublish.videoStreamSettings = h264Settings;
}[/HTML]
so can i record in mp4 direclty now ? and what influence can it have on the streams, which are broadcasted live and recorded at the same time ? (all using flash as3 or adobe air client)
also, while on most forums i saw that the keyframe interval should be twice the framerate, the record sample show the same keyframe interval and framerate. is it now a recommended setting ?
note that i’m using ubuntu servers, quad core with 24 to 64gb RAM, and have 500mbps bandwidth with 1gbps burst.
i hope i made myslef clear and thank you for your answers