awslabs / amazon-kinesis-video-streams-webrtc-sdk-android

Android SDK for interfacing with Amazon Kinesis Video Streams Signaling Service.
Apache License 2.0
58 stars 37 forks source link

AWS kinesis webRTC live video recording #14

Closed kishorekrn closed 4 years ago

kishorekrn commented 4 years ago

I'm using AWS kinesis webrtc for live video calling from my android mobile phone. I would also like to record the live video. Is there any way to achieve it ?

Now I want to record the live video session between master and viewer.

MushMal commented 4 years ago

@kishorekrn please elaborate your use case. What do you mean by "recoding"? Do you mean capturing an encoded video onto a flash media on the local device or you want to stream the video to KVS for persistence? What do you want to capture? The outgoing audio/video stream? The composed video/audio stream?

Each will have different answers.

kishorekrn commented 4 years ago

@MushMal First of all, Thanks for replying. I basically want to persist live video to s3.

What do you want to capture ?

I want to capture live audio and video stream happening between master and viewer, I want to persist as MP4 or any other format which can be play backed later.

MushMal commented 4 years ago

@kishorekrn so if I understood it correctly, you are simply trying to persist a video stream into an MP4? There is some solution engineering you need to do as this is outside of the KVS WebRTC implementation which relies on the Android WebRTC SDK (Google's WebRTC implementation for Android https://webrtc.org/) which is tightly integrated with the Android media pipeline. Once you decide whether you want to persist the incoming (viewer video) or outgoing (master video) you could intercept the frame on the surface (https://codereview.webrtc.org/1257043004/) or modify the Google's code and re-compile to directly capture the frame.

Then, you would want to pass it through a packager to produce a fragmented MP4. After your session is done, you could combine the MP4 fragments into a single MP4 file using ffmpeg type of tool.

kishorekrn commented 4 years ago

@MushMal, It doesn't have to me MP4 alone it could be any other format such as MKV too. All I want is, option to playback the live video stream later point of time

MushMal commented 4 years ago

Perhaps Google's WebRTC forums are a better place to ask the question about how to extract the frames. https://codereview.webrtc.org/1257043004/ is one of the articles that came up but there could be direct help from someone in the forums.

MushMal commented 4 years ago

Resolving, unfortunately, the question is not really for AWS KVS

mentordeveloper commented 4 years ago

Hello,

Basically, we want to capture the WebRTC Master Video session and save them on AWS S3 Bucket for later use. can we do AWS Kinese WebRTC Master Video Recording?

SanthoshMKunthe commented 3 years ago

Hi, https://docs.aws.amazon.com/kinesisvideostreams-webrtc-dg/latest/devguide/kvswebrtc-sdk-ios.html . . . Can the videos be stored to S3 . . . I just want a one way streaming. . . can this one way be saved to S3. . .

If yes. . . a) is it officially supported by AWS or b) is it a work around. . . @MushMal . . .

SanthoshMKunthe commented 3 years ago

What is Kinesis Video Streams Producer Libraries for "iOS" ???

https://docs.aws.amazon.com/kinesisvideostreams/latest/dg/producer-sdk.html only mentions

Java Producer Library

Android Producer Library

C++ Producer Library

C Producer Library . ..

What about iOS. . .

Kindly help . . . @MushMal @aws-kinesis-video @amazon-auto

MushMal commented 3 years ago

@SanthoshMKunthe the WebRTC itself is primarily used for realtime communication. Currently, we don't support persistence. If you need persistence you need to build it yourself - one of the ways I suggest is to run dual streaming mode where there is a parallel stream being uploaded to KVS.

There are no iOS specific SDK for the producer. You could try to compile the C or C++ producer SDK for iOS.

nishitchittora commented 2 years ago

@SanthoshMKunthe I have a simpler problem statement. I'm using Amazon Kinesis Video Streams WebRTC SDK in the web browser(ReactJS application). Where a user can record a video session which will be one-way communication and I want to save it to s3 for review at a later time.

My Question:

  1. Is it possible to do? if yes can you provide some official documentation or way?

That will be really helpful. Thank you in advance.