aws / amazon-chime-sdk-js

A JavaScript client library for integrating multi-party communications powered by the Amazon Chime service.
Apache License 2.0
699 stars 473 forks source link

check the status of video created after createMediaConcatenationPipeline #2914

Open UsmanShafaqat007 opened 6 days ago

UsmanShafaqat007 commented 6 days ago

What are you trying to do?

i successfully create a video chunks via

$this->chimeMediaClient->createMediaCapturePipeline([ 'ChimeSdkMeetingConfiguration' => [ 'ArtifactsConfiguration' => [ 'Audio' => [ 'MuxType' => 'AudioWithCompositedVideo' ], 'CompositedVideo' => [ 'GridViewConfiguration' => [ 'ContentShareLayout' => 'Horizontal' ], 'Layout' => 'GridView', 'Resolution' => 'FHD', ], 'Content' => [ 'State' => 'Disabled' ], 'Video' => [ 'State' => 'Disabled' ], ] ], 'SinkArn' => "arn:aws:s3:::{$this->s3Bucket}/{$this->s3BucketDir}/mediaCaptures/{$videoRecordingUuid}", 'SinkType' => 'S3Bucket', 'SourceArn' => "arn:aws:chime::{$accountId}:meeting:{$meeting['MeetingId']}", 'SourceType' => 'ChimeSdkMeeting', ])

and also be able to generate a complete video using this

$this->chimeMediaClient->createMediaConcatenationPipeline([ 'Sinks' => [ [ 'S3BucketSinkConfiguration' => [ 'Destination' => "arn:aws:s3:::{$this->s3Bucket}/{$this->s3BucketDir}/recordings/{$videoRecordingUuid}", ], 'Type' => 'S3Bucket', ] ], 'Sources' => [ [ 'MediaCapturePipelineSourceConfiguration' => [ 'ChimeSdkMeetingConfiguration' => [ 'ArtifactsConfiguration' => [ 'Audio' => [ 'State' => 'Enabled', ], 'CompositedVideo' => [ 'State' => 'Enabled', ], 'Content' => [ 'State' => 'Disabled', ], 'DataChannel' => [ 'State' => 'Enabled', ], 'MeetingEvents' => [ 'State' => 'Disabled', ], 'TranscriptionMessages' => [ 'State' => 'Enabled', ], 'Video' => [ 'State' => 'Disabled', ], ], ], 'MediaPipelineArn' => "arn:aws:chime:{$this->chimeMeetingClient->getRegion()}::media-pipeline/{$meetingId}", ], 'Type' => 'MediaCapturePipeline', ], ] ])

issue that i am facing is i am unable to detect if the video is generated successfully by createMediaConcatenationPipeline after few min or after some time i have tried to use GetMediaCapturePipeline or ListMediaCapturePipelines but it just return as empty or not found against the MediaPipelineId. i want to check the status and need to notify our users that the video is ready to view

i need to check if its created successfully so i can delete the small chunk resourrces generated by createMediaCapturePipeline as i no longer need them and if i dont remove them it will cost me as its on s3 so please suggest if there is any solution you guys have on it. so i can do both check status and remove the Artifacts.

How can the documentation be improved to help your use case?

What documentation have you looked at so far?

https://docs.aws.amazon.com/aws-sdk-php/v3/api/api-chime-sdk-media-pipelines-2021-07-15.html#createmediacapturepipeline

niborkar commented 4 days ago

In order to get the status of media pipeline, you can leverage media pipeline events- https://docs.aws.amazon.com/chime-sdk/latest/dg/media-pipe-events.html

Alternatively, you can also use GetMediaPipeline or ListMediaPipelines APIs with the mediaPipelineId of concatenation pipeline to get the current status- Stopped status would indicate that concatenation is completed and video is ready to view.

UsmanShafaqat007 commented 4 days ago

when ever i tried to call getmedia and listmedia both return emtpy and there is no indication either the concatenation is completed or failed