Webhook Filter Reference

Webhook endpoints support filtering to control which events are sent. Filters are specified using array-based property syntax.

Filter Properties

Property Type Description
webhooks.endpoints.N.urlStringWebhook endpoint URL (required)
webhooks.endpoints.N.filters.categoriesStringComma-separated list of categories
webhooks.endpoints.N.filters.eventsStringComma-separated list of events
webhooks.endpoints.N.filters.nodeRoleStringFilter by node role
webhooks.endpoints.N.filters.appStringFilter by application name
webhooks.endpoints.N.filters.sourceTypesStringFilter by source types (rtmp, webrtc)
webhooks.endpoints.N.filters.streamPatternStringRegex pattern for stream names

Example Configuration

# Send all events to primary endpoint
webhooks.endpoints.0.url=http://primary.example.com/webhook

# Send only PUBLISH events for WebRTC streams to secondary endpoint
webhooks.endpoints.1.url=http://analytics.example.com/webhook
webhooks.endpoints.1.filters.categories=PUBLISH
webhooks.endpoints.1.filters.sourceTypes=webrtc

Webhook Categories

Category Events
CONNECTconnection-connect, connection-disconnect
PUBLISHstream-published, stream-unpublished
SUBSCRIBEstream-subscribed, stream-unsubscribed, video-started
WEBSOCKETwebsocket-connect, websocket-disconnect
MEDIAthumbnail-generated, video-saved
USERCustom user-defined events

Webhook Events

Event Category Description
connection-connectCONNECTClient connected to server
connection-disconnectCONNECTClient disconnected from server
stream-publishedPUBLISHStream started publishing
stream-unpublishedPUBLISHStream stopped publishing
stream-subscribedSUBSCRIBEClient started subscribing
stream-unsubscribedSUBSCRIBEClient stopped subscribing
video-startedSUBSCRIBEVideo playback started
websocket-connectWEBSOCKETWebSocket connection established
websocket-disconnectWEBSOCKETWebSocket connection closed
thumbnail-generatedMEDIAThumbnail image generated
video-savedMEDIAVideo recording saved

Frame Extractor

Extracts JPEG frames from live streams and pushes them to a WebSocket endpoint. Builds on the thumbnail generation feature.

Server Properties (conf/red5.properties)

Property Default Description
thumbnails.activefalseEnable thumbnail / frame extraction
thumbnails.decode.allfalseDecode all frames (required for extraction)
thumbnails.websocket.endpointWebSocket URL to receive frames (e.g. ws://host:5080/ws/frames)
thumbnails.frequency7Extraction interval in seconds (0 = every frame)

Per-Stream Params (connection/query params)

Override server-level settings per stream using connection params or query params on the publish URL.

Param Default Description
thumbnails.activefalseEnable frame extraction for this stream
thumbnails.decodeAllfalseDecode all frames
thumbnails.websocketEndpointWebSocket URL to receive frames
thumbnails.frequency7Extraction interval in seconds (0 = every frame)

Per-Stream Example

ffmpeg -re -stream_loop -1 -i example.mp4 -c:v libx264 -c:a aac -f flv \
  "rtmp://RED5PRO_HOST/live/stream1?thumbnails.active=true&thumbnails.decodeAll=true&thumbnails.websocketEndpoint=ws://XENOSIM_HOST:5080/ws/frames&thumbnails.frequency=0"

WebSocket Binary Message Format

Offset Length Description
04 bytesMetadata length (big-endian Int32)
4N bytesMetadata JSON (UTF-8): {"filename": "STREAM_TIMESTAMP.jpeg"}
4 + NremainingJPEG image data