quasarstream / PHP-FFmpeg-video-streaming

📼 Package media content for online streaming(DASH and HLS) using FFmpeg
https://www.quasarstream.com/op/php/ffmpeg-streaming?u=php-ff
MIT License
514 stars 117 forks source link

Upload to AWS S3 Fails #85

Closed imrealashu closed 3 years ago

imrealashu commented 3 years ago

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.

aminyazdanpanah commented 3 years ago

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