Use webhooks to listen for and respond to events in your Wowza Streaming Cloud account.
Note: To receive event notifications, you have to enable webhooks for your account and create a webhook endpoint. See Receive event notifications with webhooks for more information.
Events
Wowza Streaming Cloud sends webhook events for transcoder and recording actions in JSON format through a POST request. The following sample webhook payload is sent when a transcoder stops.
{"version": 1.0, "event": "stop.complete", "event_id": "9be47e2a-b5ff-492a-a291-c7be79c060ba", "event_time": 1588864470.813283, "object_type": "transcoder", "object_id": "pl3fff7q", "object_data": { "uptime_id": 7cb5yfnx } }
While the payloads for other webhooks are structured similarly, object_data changes to display information specific to the triggered event.
Transcoder and live stream
Wowza Streaming Cloud sends the following events for transcoder actions. The object_id in the payload is the transcoder ID.
Note: These events are triggered for transcoder actions in both the live stream and transcoder workflows.
Object type | Event | Sample object data | Description |
---|---|---|---|
transcoder | download.success | "object_data": { "file_name": "https://download_url.mp4", "file_size": "58958409", "reference_id": "null" } |
Occurs when the transcoder successfully downloads the source file. Only applicable when a file is the source for a stream. |
transcoder | download.failed | "object_data": { "file_name": "https://download_url.mp4", "file_size": "0", "reference_id": "null" } |
Occurs when the URL in file_name returns a 404 error and the file can't be downloaded. Only applicable when a file is the source for a stream. |
transcoder | start.requested | "object_data": { "uptime_id": "bjwbhwld", "reference_id": "null" } |
Occurs when a request is made to start a transcoder. |
transcoder | start.complete | "object_data": { "uptime_id": "bjwbhwld", "ip_address": "34.73.51.79", "reference_id": "null" } |
Occurs when the transcoder starts and is available. |
transcoder | start.canceled | "object_data": { "uptime_id": "null", "reference_id": "null" } |
Occurs when the transcoder cancels the startup process because of a failure. |
transcoder | reset.requested | "object_data": { "uptime_id": "null", "ip_address": "34.73.51.79", "reference_id": "null" } |
Occurs when a request is made to reset a transcoder. |
transcoder | stop.complete | "object_data": { "uptime_id": "cczpplpv", "reference_id": "null" } |
Occurs when the transcoder has stopped and is no longer available. |
transcoder | audio.started | "object_data": { "stream_name": "3920b4c6.stream", "codec": "AAC", "reference_id": "null" } |
Occurs when a running transcoder has started receiving audio. |
transcoder | audio.stopped | "object_data": { "stream_name": "3920b4c6.stream", "reference_id": "null" } |
Occurs when a running transcoder has stopped receiving audio. |
transcoder | video.started | "object_data": { "stream_name": "3920b4c6.stream", "height": "720", "width": "1280", "codec": "H264", "codec_string": "avc1.4d402a", "profile": "Main", "level": "1.2", "reference_id": "null" } |
Occurs when a running transcoder has started receiving video. |
transcoder | video.stopped | "object_data": { "stream_name": "3920b4c6.stream", "reference_id": "null" } |
Occurs when a running transcoder has stopped receiving video. |
Note: By default, reference_id is null. Version 1.7 (beta) of the Wowza Streaming Cloud API introduces functionality that lets you set a unique ID, reference_id, associated with transcoder events and returned in transcoder webhook payloads.
Sample data_object after setting reference_id:"object_data": { "uptime_id": "jbfg6npg", "reference_id": "mySystemID_01" }
See POST /transcoders, PATCH /transcoders/[ID], POST /live_streams, and PATCH /live_streams/[ID] for more information.
Recording
Wowza Streaming Cloud sends the following events for recording actions. The object_id in the payload is the recording ID.
Object type | Event | Sample object data | Description |
---|---|---|---|
recording | converting | "object_data": { "transcoder_id": "b3hjs7ty", "transcoder_uptime_id": "blc5grjh" } |
Occurs when a recording has been created and conversion to mp4 format begins. |
recording | uploading | "object_data": { "transcoder_id": "b3hjs7ty", "transcoder_uptime_id": "blc5grjh" } |
Occurs when a recording is being uploaded to account storage. |
recording | completed | "object_data": { "transcoder_id": "b3hjs7ty", "transcoder_uptime_id": "blc5grjh", "file_name": "filename.mp4", "file_size": "117957690", "duration": "546550", " ": "https://download_url.mp4" } |
Occurs when a recording is complete and available in account storage. |
recording | failed | "object_data": { "transcoder_id": "b3hjs7ty", "transcoder_uptime_id": "blc5grjh", "reason_code": "recording_too_long", "reason": "Recording Convert Failing: been running over 45 minutes (45.31778333333333 mins) and file size is still 0, aborting recording for wse_recording_id: 31255, transcoder id 397800", } |
Occurs when a recording failed to be converted or uploaded. object_data includes a reason_code and a descriptive reason string for the failure. If the file couldn't be converted to an mp4, the reason_code can be either of the following:
If the mp4 is corrupt, the reason_code can be either of the following:
|
recording | no_video | "object_data": { "transcoder_id": "b3hjs7ty", "transcoder_uptime_id": "blc5grjh" } |
Occurs when no video content is found for the recording. |
recording | deleted | "object_data": { "uptime_id": "blc5grih", "transcoder_id": "b3hjs7ty" } |
Occurs when a recording is deleted. |