How to receive notification that a recording has completed?

31 views
Skip to first unread message

Herb Jellinek

unread,
Oct 4, 2018, 4:32:45 PM10/4/18
to red5
Hi all,

I'd like to write an extension to Red5 that gets a notification when a live stream has been recorded and the recording has been written to disk.  I'm using Red5Pro.

I say "extension" because I'm not clear on whether I should create a plugin, or if I can do this by creating a subclass of MultiThreadedApplicationAdapter.  I've started by creating a MultiThreadedApplicationAdapter subclass.

My test webapp's appStart method is called when Red5Pro starts up, so I know the webapp is installed in the right place.

I use OBS to publish to rtmp://localhost/live/stream1 and I view it via ffplay rtmp://localhost/live/stream1.  That works as expected.

However, none of the other methods I've overridden (appConnectappDisconnectstreamBroadcastStopstreamRecordStopetc.) is ever called.

The Red5 event model isn't clear to me, and I'm beginning to wonder if it's possible for one webapp to be notified of events in another (in this case, /live) - even events that seem to be reflected in the MultiThreadedApplicationAdapter API.

How can I get notified on RTMP connections opening, closing, or especially when VOD recordings are written?

I appreciate your advice.

Rajdeep Rath

unread,
Oct 4, 2018, 4:43:43 PM10/4/18
to red5in...@googlegroups.com
appConnect and appDisconnect are definitely called. I can't say about recording specifically since I haven't used that. Additionally streamBroadcastStart also gets called.

1. Clone this example to your pc



2. Deploy it to red5 and monitor the events using a RTMP client if your choice 


Should work fine.


Regards
Rajdeep Rath

--

---
You received this message because you are subscribed to the Google Groups "red5" group.
To unsubscribe from this group and stop receiving emails from it, send an email to red5interest...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages