quasarstream / PHP-FFmpeg-video-streaming

📼 Package media content for online streaming(DASH and HLS) using FFmpeg

Home Page:https://www.quasarstream.com/op/php/ffmpeg-streaming?u=php-ff

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Upload to AWS S3 Fails

imrealashu opened this issue · comments

The PutObject operation requires non-empty parameter:
While saving the file to s3 throws this error. The configuration seems pretty straight forward as described by you Here

My Configuration

$cloudConfig = [
            'version' => 'latest',
            'region' => config('filesystems.disks.s3.region'),
            'credentials' => [
                'key' => config('filesystems.disks.s3.key'),
                'secret' => config('filesystems.disks.s3.secret')
            ]
        ];
$s3Config = new CloudS3($cloudConfig);
$video->dash()
            ->setSegDuration(30) // Default value is 10
            ->setAdaption('id=0,streams=v id=1,streams=a')
            ->x264()
            ->addRepresentations([$r_360p, $r_480p, $r_720p])
            ->save(null, [
                'cloud' => $s3Config,
                'options' => [
                    'dest' => 's3://' . config('filesystems.disks.s3.bucket') . '/test-directory/',
                    'filename' => $filename . '.mpd'
                ]
            ]);

This is saving to local filesystem properly but the cloud one getting failed. Check the source code but couldn't point anything specific as everything seemed to be in place properly.

Make sure you use the S3 namespace properly in your code:
See the sample for more information.