Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EncodedOutputs not sending image snapshot #21

Open
doston0000 opened this issue Apr 17, 2024 · 1 comment
Open

EncodedOutputs not sending image snapshot #21

doston0000 opened this issue Apr 17, 2024 · 1 comment

Comments

@doston0000
Copy link

We want to save image and video in order to upload to s3 (minio) using same egress client, we tried to use EncodedOutput. Video is saving successfully, but image is not. Can anyone help with that or we missing something

public function recordStream(string $roomName): string
    {
        $egressClient = new EgressServiceClient(
            config('livekit.host_port'),
            config('livekit.api_key'),
            config('livekit.api_secret')
        );

        $egressClient2 = new EgressServiceClient(
            config('livekit.host_port'),
            config('livekit.api_key'),
            config('livekit.api_secret')
        );

        $s3 = (new S3Upload())
            ->setAccessKey(config('filesystems.disks.minio.key'))
            ->setSecret(config('filesystems.disks.minio.secret'))
            ->setBucket(config('filesystems.disks.minio.bucket'))
            ->setRegion(config('filesystems.disks.minio.region'))
            ->setEndpoint(config('filesystems.disks.minio.host'))
            ->setForcePathStyle(true);

        $outputImage = (new ImageOutput)
            ->setCaptureInterval(10)
            ->setFilenamePrefix($roomName . '/' . $roomName . '-image-')
            ->setWidth(640)
            ->setHeight(480)
            ->setS3($s3);

        $outputVideo = (new EncodedFileOutput)
            ->setFileType(EncodedFileType::MP4)
            ->setFilepath($roomName . '/' . $roomName . '.mp4')
            ->setS3($s3);

        $output = (new EncodedOutputs())
            ->setFile($outputVideo)
            ->setImage($outputImage);
        $info = $egressClient->startRoomCompositeEgress(roomName: $roomName, layout: 'single-speaker', output: $output);

        return $info->getEgressId();

    }
@riteshghimire9090
Copy link

After update , my issue is fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants