Stream recording query examples for the Wowza Streaming Engine REST API

Use cURL to query the Wowza Streaming Engine™ media server software REST API to create and manage stream recordings in a Wowza Streaming Engine instance.

Notes:

Contents


Get a list of recorders
Create a recorder
Split a recording
Stop a recording

Get a list of recorders


The following example shows how to get a list of all defined stream recordings in your Wowza Streaming Engine instance:

curl -X GET --header 'Accept:application/json; charset=utf-8' http://localhost:8087/v2/servers/_defaultServer_/vhosts/_defaultVHost_/applications/live/instances/_definst_/streamrecorders

Create a recorder


The following example shows how to define a stream recorder and start it:

curl -X POST --header 'Accept:application/json; charset=utf-8' --header 'Content-type:application/json; charset=utf-8' http://localhost:8087/v2/servers/_defaultServer_/vhosts/_defaultVHost_/applications/live/instances/_definst_/streamrecorders/myStream -d '
{
 "restURI":"http://localhost:8087/v2/servers/_defaultServer_/vhosts/_defaultVHost_/applications/live/instances/_definst_/streamrecorders/myStream",
 "recorderName":"myStream",
"instanceName":"_definst_",
"recorderState":"Waiting for stream",
"defaultRecorder":true,
"segmentationType":"None",
"outputPath":"[output-path]",
"baseFile":"myrecord2.mp4",
"fileFormat":"MP4",
"fileVersionDelegateName":"com.wowza.wms.livestreamrecord.manager.StreamRecorderFileVersionDelegate",
"fileTemplate":"${BaseFileName}_${RecordingStartTime}_${SegmentNumber}",
"segmentDuration":900000,
"segmentSize":10485760,
"segmentSchedule":"0 * * * * *",
"recordData":true,
"startOnKeyFrame":true,
"splitOnTcDiscontinuity":false,
"backBufferTime":3000,
"option":"Version existing file",
"moveFirstVideoFrameToZero":true,
"currentSize":0,
"currentDuration":0,
"recordingStartTime":""
}'

Split a recording


To split a current recording, you can use the following request:

curl -X PUT --header 'Accept:application/json; charset=utf-8' http://localhost:8087/v2/servers/_defaultServer_/vhosts/_defaultVHost_/applications/live/instances/_definst_/streamrecorders/myStream/actions/splitRecording

Stop a recording


To stop a current recording, you can use the following request:

curl -X PUT --header 'Accept:application/json; charset=utf-8' http://localhost:8087/v2/servers/_defaultServer_/vhosts/_defaultVHost_/applications/live/instances/_definst_/streamrecorders/myStream/actions/stopRecording

Originally Published: 06-16-2015.
Updated: For Wowza Streaming Engine 4.5.0.02 on 10-05-2016.
 

If you're having problems or want to discuss this article, post in our forum.