How to make RecorderEndpoint directly load to S3?

1,143 views
Skip to first unread message

henry...@umbocv.com

unread,
Nov 10, 2015, 12:23:38 PM11/10/15
to kurento
Hi Kurento team,

has it been verified that the Kurento Recorder Endpoint can indeed directly
load to the AWS S3 (as opposed to writing files via file://)
using the uri parameter?

I tried in the javascript AWS sdk to do something like this
where I computed a signedUrl that I then fed to the RecorderEndpoint uri value:

              var params = {
                Bucket: 'myVeryOwnTestBucket',
                Key: 'mytest.mp4', 
                Expires: 300
              };
              var s3 = new AWS.S3();
              var s3Url = s3.getSignedUrl('putObject', params);
              pipeline.create('RecorderEndpoint', {
                  mediaProfile: 'MP4', 
                  uri: s3Url
                }, 
              ...
              recorderEndpoint.record(function(error) {
              ...

But the problem is I don't see any files created on the cloud after running this code through.
Now, if I replace the "uri: s3Url" with "uri: file://<some local file>",
then I see it successfully writes.

So, has anybody gotten AWS S3 direct upload successfully to work with Kurento RecorderEndpoint
or know what I did wrong?

Thanks!

Henry

henry...@umbocv.com

unread,
Nov 10, 2015, 10:50:29 PM11/10/15
to kurento, henry...@umbocv.com
And here's the log file in Kurento , but I didn't see anything wrong indicated:


/var/log/kurento-media-server/media-server_2015-11-10_00-01-27.00005.pid13645.log


2015-11-10 21:44:25,022824 13645 [0x00007f8e1afad700]   debug KurentoWebSocketTransport WebSocketTransport.cpp:484 processMessage()  Message: >{"id":89,"jsonrpc":"2.0","method":"invoke","params":{"object":"5325312c-74ba-4a85-b4bd-a21bb7146bc4_kurento.MediaPipeline/2b20617f-9f9b-4b27-92d5-4f3e7d016ec7_kurento.WebRtcEndpoint","operation":"getMediaPipeline","sessionId":"86fe2552-4e81-4e4c-bb6b-f805a459ae78"}}
<
2015-11-10 21:44:25,023019 13645 [0x00007f8e1afad700]   debug KurentoWebSocketTransport WebSocketTransport.cpp:486 processMessage()  Response: >{"id":89,"jsonrpc":"2.0","result":{"sessionId":"86fe2552-4e81-4e4c-bb6b-f805a459ae78","value":"5325312c-74ba-4a85-b4bd-a21bb7146bc4_kurento.MediaPipeline"}}
<
2015-11-10 21:44:25,255471 13645 [0x00007f8e187a8700]   debug KurentoWebSocketTransport WebSocketTransport.cpp:484 processMessage()  Message: >{"id":90,"jsonrpc":"2.0","method":"create","params":{"constructorParams":{"mediaPipeline":"5325312c-74ba-4a85-b4bd-a21bb7146bc4_kurento.MediaPipeline","mediaProfile":"MP4","uri":"https://myVeryOwnBucket.s3.amazonaws.com/mytest.mp4?AWSAccessKeyId=XXXXXSNIPXXXX&Expires=1447214365&Signature=XXXXXSNIPXXXX"},"sessionId":"86fe2552-4e81-4e4c-bb6b-f805a459ae78","type":"RecorderEndpoint"}}
<
2015-11-10 21:44:25,263152 13645 [0x00007f8e187a8700]    info KurentoRecorderEndpointImpl RecorderEndpointImpl.cpp:40 RecorderEndpointImpl()  Set MP4 profile
2015-11-10 21:44:25,263336 13645 [0x00007f8e187a8700]   debug KurentoWebSocketTransport WebSocketTransport.cpp:486 processMessage()  Response: >{"id":90,"jsonrpc":"2.0","result":{"sessionId":"86fe2552-4e81-4e4c-bb6b-f805a459ae78","value":"5325312c-74ba-4a85-b4bd-a21bb7146bc4_kurento.MediaPipeline/2bddf312-93d7-47c2-8b05-7f780a682be0_kurento.RecorderEndpoint"}}
<
2015-11-10 21:44:25,459926 13645 [0x00007f8e197aa700]   debug KurentoWebSocketTransport WebSocketTransport.cpp:484 processMessage()  Message: >{"id":91,"jsonrpc":"2.0","method":"invoke","params":{"object":"5325312c-74ba-4a85-b4bd-a21bb7146bc4_kurento.MediaPipeline/2b20617f-9f9b-4b27-92d5-4f3e7d016ec7_kurento.WebRtcEndpoint","operation":"connect","operationParams":{"sink":"5325312c-74ba-4a85-b4bd-a21bb7146bc4_kurento.MediaPipeline/2bddf312-93d7-47c2-8b05-7f780a682be0_kurento.RecorderEndpoint"},"sessionId":"86fe2552-4e81-4e4c-bb6b-f805a459ae78"}}
<
2015-11-10 21:44:25,460073 13645 [0x00007f8e197aa700]   debug KurentoMediaElementImpl   MediaElementImpl.cpp:637 connect()  Connecting 5325312c-74ba-4a85-b4bd-a21bb7146bc4_kurento.MediaPipeline/2b20617f-9f9b-4b27-92d5-4f3e7d016ec7_kurento.WebRtcEndpoint -> 5325312c-74ba-4a85-b4bd-a21bb7146bc4_kurento.MediaPipeline/2bddf312-93d7-47c2-8b05-7f780a682be0_kurento.RecorderEndpoint params AUDIO 
2015-11-10 21:44:25,460161 13645 [0x00007f8e197aa700]   debug KurentoMediaElementImpl   MediaElementImpl.cpp:637 connect()  Connecting 5325312c-74ba-4a85-b4bd-a21bb7146bc4_kurento.MediaPipeline/2b20617f-9f9b-4b27-92d5-4f3e7d016ec7_kurento.WebRtcEndpoint -> 5325312c-74ba-4a85-b4bd-a21bb7146bc4_kurento.MediaPipeline/2bddf312-93d7-47c2-8b05-7f780a682be0_kurento.RecorderEndpoint params VIDEO 
2015-11-10 21:44:25,460274 13645 [0x00007f8e197aa700]   debug KurentoMediaElementImpl   MediaElementImpl.cpp:637 connect()  Connecting 5325312c-74ba-4a85-b4bd-a21bb7146bc4_kurento.MediaPipeline/2b20617f-9f9b-4b27-92d5-4f3e7d016ec7_kurento.WebRtcEndpoint -> 5325312c-74ba-4a85-b4bd-a21bb7146bc4_kurento.MediaPipeline/2bddf312-93d7-47c2-8b05-7f780a682be0_kurento.RecorderEndpoint params DATA 
2015-11-10 21:44:25,460398 13645 [0x00007f8e197aa700]   debug KurentoWebSocketTransport WebSocketTransport.cpp:486 processMessage()  Response: >{"id":91,"jsonrpc":"2.0","result":{"sessionId":"86fe2552-4e81-4e4c-bb6b-f805a459ae78","value":null}}
<
2015-11-10 21:44:25,653108 13645 [0x00007f8e1afad700]   debug KurentoWebSocketTransport WebSocketTransport.cpp:484 processMessage()  Message: >{"id":92,"jsonrpc":"2.0","method":"invoke","params":{"object":"5325312c-74ba-4a85-b4bd-a21bb7146bc4_kurento.MediaPipeline/2bddf312-93d7-47c2-8b05-7f780a682be0_kurento.RecorderEndpoint","operation":"record","sessionId":"86fe2552-4e81-4e4c-bb6b-f805a459ae78"}}
<
2015-11-10 21:44:25,655299 13645 [0x00007f8e1afad700]   debug KurentoWebSocketTransport WebSocketTransport.cpp:486 processMessage()  Response: >{"id":92,"jsonrpc":"2.0","result":{"sessionId":"86fe2552-4e81-4e4c-bb6b-f805a459ae78","value":null}}
<
2015-11-10 21:44:27,923722 13645 [0x00007f8e167a4700]    info KurentoWebSocketTransport WebSocketTransport.cpp:257 keepAliveSessions()  Keep alive 86fe2552-4e81-4e4c-bb6b-f805a459ae78

Ivan Gracia

unread,
Nov 11, 2015, 5:26:41 AM11/11/15
to Kurento Public, henry...@umbocv.com
I'm afraid this is not supported at the moment. The recorder endpoint supports uploading files to network servers that supports PUT with a range, as we upload chunks of the file.

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.

Alen Komic

unread,
Oct 26, 2016, 6:38:11 AM10/26/16
to kurento, henry...@umbocv.com
Is KMS direct uploading to S3 instead of file supported now? I cannot find any documentation support that.

Ivan Gracia

unread,
Oct 26, 2016, 2:17:08 PM10/26/16
to Kurento Public, henry...@umbocv.com
Nope, sorry.

Ivan Gracia



To unsubscribe from this group and stop receiving emails from it, send an email to kurento+unsubscribe@googlegroups.com.
To post to this group, send email to kur...@googlegroups.com.
Visit this group at https://groups.google.com/group/kurento.
To view this discussion on the web visit https://groups.google.com/d/msgid/kurento/59d90a9e-1981-48a5-acc0-1096dc6f283e%40googlegroups.com.

gcorey

unread,
Feb 20, 2018, 1:45:32 PM2/20/18
to kurento
Any updates here? Would be a great thing to have. Looks like not too much of a stretch, S3 allows uploads from PUT requests, just need to be able to specify some of the headers. 

Petr Kazda

unread,
Jan 14, 2021, 10:59:44 AM1/14/21
to kurento
@igracia Is there any update?

Micael Gallego

unread,
Jan 14, 2021, 11:02:48 AM1/14/21
to kur...@googlegroups.com
Currently the best way to integrate RecorderEndpoint with S3 is using AWS Storage Gateway:


Best regards

--
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.

Rahman Rezaee

unread,
May 20, 2022, 1:04:34 PM5/20/22
to kurento
Can u share ur codes
Reply all
Reply to author
Forward
0 new messages