Skip to content

EncodedOutputs not sending image snapshot #21

Description

@doston0000

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();

    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions