Description
Hey all,
I've been trying to set up Laravel FFMpeg to work directly with S3 videos, but having trouble having FFMpeg open the file on S3.
Here is a snippet from my code:
public function transcodeVideo(Request $request)
{
$name = "test1.webm";
$s3 = Storage::disk('s3');
$file_path = $this->video_path . '/' . $name;
$exists = $s3->exists($name);
if ($exists) {
$video = FFMpeg::fromDisk('s3')->open($name);
dd("opened");
}
dd($exists);
}
I've placed the same video on both the local machine and the S3 bucket.
However, when I run this code and use FFMpeg::fromDisk('s3') instead of FFMpeg::fromDisk('local'), FFMpeg will not find the file. The S3 configuration is set up correctly for use by Storage/filesystem for Laravel since it does find the file in the $exists call.
I have not done anything special to set up FFMpeg to run alongside S3. Did I potentially miss a process?
Also, here is the error it throws:
ExecutionFailureException in ProcessRunner.php line 100:
ffprobe failed to execute command '/usr/bin/ffprobe' 'test1.webm' '-show_streams' '-print_format' 'json'
RuntimeException in FFProbe.php line 244:
Unable to probe test1.webm
From the command here it looks as if there is nothing being done to handle that the file is on S3 and not the local machine, but I have no clue.
Here is my Filesystems disk setup:
's3' => [
'driver' => 's3',
'key' => env('AWS_KEY'),
'secret' => env('AWS_SECRET'),
'region' => env('AWS_REGION'),
'bucket' => env('AWS_BUCKET'),
]
Any help would be greatly appreciated.