Custom recorder app to upload to S3 in v5.1.1

685 views
Skip to first unread message

Jay Prall

unread,
Mar 24, 2015, 5:08:16 PM3/24/15
to kur...@googlegroups.com

I'm looking to record a file locally on the server, then upload it to Amazon S3 and make an API call to another application.

I see the developer guide here for version 4.2.1:
http://www.kurento.org/docs/4.2.1/Developer_and_Programmer_Guide.html

Does this apply to version 5.1.1?  It seems to imply that I need to install JBoss and build my own war file.   Or is there another way to get custom code to run under 5.1.1?

Thanks

-JP

Ivan Gracia

unread,
Mar 25, 2015, 3:36:22 PM3/25/15
to Kurento Public
Hi Jay, 

That documentation is really old! How did you arrive to that link? The current documentation is here. You'll see that things are very different now. We don't depend on JBoss, for instance.

You can check the tutorials for an example of what you are trying to do. This one has a recorder endpoint that will allow you to record locally or elsewhere. It will work with the latest development version of KMS (v6). If you want one that works with the stable version, check this branch.

Cheers,

Ivan Gracia



--
You received this message because you are subscribed to the Google Groups "kurento" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kurento+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Jay Prall

unread,
Mar 27, 2015, 3:19:45 PM3/27/15
to kur...@googlegroups.com
I found that page by searching for "onSessionTerminated" and "kurento" in google.

I got the tutorials working and they are very nice.  One thing I can't quite figure out is where to implement the piece that copies the video to S3.

I was thinking of doing it in onSessionTerminated, but I'm not sure how to modify the example to use this version of the recorder.  It needs a specific path?

@WebRtcContentService(path = "/webRtcRecorderLoopback/*")
public class WebRtcRecorder extends WebRtcContentHandler {

    @Override
    public void onSessionTerminated(WebRtcContentSession contentSession, int code, String reason) throws Exception {
    
        // copy video associated with contentSession to S3

        super.onSessionTerminated(contentSession, code, reason);
    }

}

I'm attaching the client side code that I'm using to test. Any advice on how to achieve that is appreciated.
kurento-record.index.js

Jay Prall

unread,
Mar 30, 2015, 2:06:28 PM3/30/15
to kur...@googlegroups.com

It looks like the "onSessionTerminated" API has been removed in version 5.x.x. 

Is the correct place to copy the video to S3 the afterConnectionClosed method of TextWebSocketHandler?

    @Override
    public void afterConnectionClosed(WebSocketSession session,
            CloseStatus status) throws Exception {
         // copy to S3 here?

Ivan Gracia

unread,
Apr 9, 2015, 1:21:38 PM4/9/15
to Kurento Public
That code will get executed when the client connection is closed. If that's ok, you can add it there.

Another option is to copy to S3 when the stop button is pressed. The handler for that message in the server is here.

Ivan Gracia


Dhana babu

unread,
Apr 20, 2015, 1:21:35 PM4/20/15
to kur...@googlegroups.com
Hi Ivan, I have read your answers. I am successfully streaming the record in my instance. Can I directly stream the record in s3 and you guys are provided that functionality ?

Thanks for advanced help.

Regards,
Dhana

Paul-Emile Veuve

unread,
Jul 24, 2015, 12:27:21 PM7/24/15
to kurento, igr...@kurento.org
Wait, how can you upload the recorded file in S3 from the application server since it has been created on the media server?
Unless both servers are run on the same VM, the application server has no access to the media server disk.
The only option seems to implement a media element just for that, na dplug it in the media server, but is it possible?
Reply all
Reply to author
Forward
0 new messages