Hi,
I am using the Wowza API REST in order to record a live stream.
curl -X POST http://myhost:8087/v2/servers/_defaultServer_ /vhosts/_defaultVHost_/applications/test/instances/_definst_/streamrecorders/live
-d '
{
"restURI":"http://myhost:8087/v2/servers/_defaultServer_ /vhosts/_defaultVHost_/applications/test/instances/_definst_/streamrecorders/live",
"recorderName":"live",
"instanceName":"_definst_",
"defaultRecorder":true,
"segmentationType":"None",
"outputPath": "",
"baseFile":"Test.flv",
"fileFormat":"FLV",
"fileVersionDelegateName":"com.wowza.wms.livestreamrecord.manager.StreamRecorderFileVersionDelegate",
"fileTemplate":"${BaseFileName}_${RecordingStartTime}_${SegmentNumber}",
"segmentDuration":900000,
"segmentSize":10485760,
"segmentSchedule":"0 * * * * *",
"recordData":true,
"startOnKeyFrame":true,
"option":"Overwrite existing file",
"moveFirstVideoFrameToZero":true,
"currentSize":0,
"currentDuration":0,
"recordingStartTime":""
}'
Immediately I request the status of the stream recorder:
curl -X GET http://myhost:8087/v2/servers/_defaultServer_ /vhosts/_defaultVHost_/applications/test/instances/_definst_/streamrecorders/live
In most of the cases although the incoming stream is active, Wowza API response has recorderState field as “Waiting for stream”.
{"recorderName":"live","instanceName":"_definst_","recorderState":"Waiting for stream","defaultRecorder":false,"segmentationType":"None","outputPath":"","baseFile":"Test.flv","fileFormat":"FLV","fileVersionDelegateName":"com.wowza.wms.livestreamrecord.manager.StreamRecorderFileVersionDelegate","fileTemplate":"${BaseFileName}","segmentDuration":0,"segmentSize":10485760,"segmentSchedule":"0 * * * * *","recordData":true,"startOnKeyFrame":true,"option":"Overwrite existing file","moveFirstVideoFrameToZero":true,"currentSize":0,"currentDuration":0,"recordingStartTime":""}
This status (“Waiting for stream”) is returned when the incoming stream of the stream recorder does not exist, so in my opinion recorderState could not be “Waiting for stream” when the incoming stream is active.