Adam MedziDski Posted July 7, 2021 Share Posted July 7, 2021 Is it possible to cyclically save to S3 videos from the RTMP stream from an IP camera? I would like to periodically save video from surveillance cameras for viewing later - but I would not like to interrupt broadcasting. Link to comment Share on other sites More sharing options...
0 Enes Kuluk Posted July 7, 2021 Share Posted July 7, 2021 Did you set S3 settings in Ant Media Server? If you are using 2.3.3, you can set S3 credentials on the dashboard. If not take a look on this guide : https://antmedia.io/how-to-record-streams-to-s3-compatible-systems/ You can take a look at the script i wrote before: https://stackoverflow.com/questions/65918569/how-can-i-save-vod-recordings-without-stopping-streaming/65919417#65919417 This script makes start and stop according to given interval. Enes. Link to comment Share on other sites More sharing options...
0 Adam MedziDski Posted July 8, 2021 Author Share Posted July 8, 2021 Thanks for the link to the script code it will be useful! Still, I struggle with S3 configuration as we host Ant Media Server on GCP, and we get some cryptic errors when we try to use S3 interoperability endpoint. Do you have any confirmed use cases for S3 integration on GCP? Link to comment Share on other sites More sharing options...
0 Enes Kuluk Posted July 8, 2021 Share Posted July 8, 2021 As far as i know S3 integration is platform independent. If you have done the configuration correctly, there should be no issues whatsoever. Also could check the required ports are opened on your end please: https://github.com/ant-media/Ant-Media-Server/wiki/Getting-Started#server-ports Best Regards, Enes. Link to comment Share on other sites More sharing options...
0 Enes Kuluk Posted July 12, 2021 Share Posted July 12, 2021 Were you able to resolve your issues with S3 saving? Enes. Link to comment Share on other sites More sharing options...
0 Adam MedziDski Posted July 14, 2021 Author Share Posted July 14, 2021 It still fails with following error: 2021-07-14 11:22:05,223 [java-sdk-progress-listener-callback-thread] ERROR i.a.storage.AmazonS3StorageClient - S3 - Error: Upload failed for gbiZzC4FLsL71626261671502-2021-07-14_11-21-51.029.mp4 with key streams/gbiZzC4FLsL71626261671502-2021-07-14_11-21-51.029.mp42021-07-14 11:22:05,225 [vert.x-eventloop-thread-0] ERROR i.a.storage.AmazonS3StorageClient - com.amazonaws.services.s3.model.AmazonS3Exception: Invalid argument. (Service: Amazon S3; Status Code: 400; Error Code: InvalidArgument; Request ID: null; S3 Extended Request ID: null; Proxy: null), S3 Extended Request ID: null at com.amazonaws.http.AmazonHttpClient$RequestExecutor.handleErrorResponse(AmazonHttpClient.java:1811) at com.amazonaws.http.AmazonHttpClient$RequestExecutor.handleServiceErrorResponse(AmazonHttpClient.java:1395) at com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeOneRequest(AmazonHttpClient.java:1371) at com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeHelper(AmazonHttpClient.java:1145) at com.amazonaws.http.AmazonHttpClient$RequestExecutor.doExecute(AmazonHttpClient.java:802) at com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeWithTimer(AmazonHttpClient.java:770) at com.amazonaws.http.AmazonHttpClient$RequestExecutor.execute(AmazonHttpClient.java:744) at com.amazonaws.http.AmazonHttpClient$RequestExecutor.access$500(AmazonHttpClient.java:704) at com.amazonaws.http.AmazonHttpClient$RequestExecutionBuilderImpl.execute(AmazonHttpClient.java:686) at com.amazonaws.http.AmazonHttpClient.execute(AmazonHttpClient.java:550) at com.amazonaws.http.AmazonHttpClient.execute(AmazonHttpClient.java:530) at com.amazonaws.services.s3.AmazonS3Client.invoke(AmazonS3Client.java:5062) at com.amazonaws.services.s3.AmazonS3Client.invoke(AmazonS3Client.java:5008) at com.amazonaws.services.s3.AmazonS3Client.access$300(AmazonS3Client.java:394) at com.amazonaws.services.s3.AmazonS3Client$PutObjectStrategy.invokeServiceCall(AmazonS3Client.java:5950) at com.amazonaws.services.s3.AmazonS3Client.uploadObject(AmazonS3Client.java:1812) at com.amazonaws.services.s3.AmazonS3Client.putObject(AmazonS3Client.java:1772) at com.amazonaws.services.s3.transfer.internal.UploadCallable.uploadInOneChunk(UploadCallable.java:168) at com.amazonaws.services.s3.transfer.internal.UploadCallable.call(UploadCallable.java:148) at com.amazonaws.services.s3.transfer.internal.UploadMonitor.call(UploadMonitor.java:115) at com.amazonaws.services.s3.transfer.internal.UploadMonitor.call(UploadMonitor.java:45) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.lang.Thread.run(Thread.java:829) Link to comment Share on other sites More sharing options...
0 Enes Kuluk Posted July 15, 2021 Share Posted July 15, 2021 Could you confirm that your credentials and S3 account is setup okey? Because it is giving status code 400 which might have many meanings. https://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html Best Regards, Enes. Link to comment Share on other sites More sharing options...
Question
Adam MedziDski
Link to comment
Share on other sites
Top Posters For This Question
4
3
Popular Days
Jul 7
2
Jul 8
2
Jul 12
1
Jul 14
1
Top Posters For This Question
Enes Kuluk 4 posts
Adam MedziDski 3 posts
Popular Days
Jul 7 2021
2 posts
Jul 8 2021
2 posts
Jul 12 2021
1 post
Jul 14 2021
1 post
6 answers to this question
Recommended Posts