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

Is there a way to FFprobe::fromDisk('s3') #522

Open
selajdinbilali opened this issue Jun 21, 2024 · 0 comments
Open

Is there a way to FFprobe::fromDisk('s3') #522

selajdinbilali opened this issue Jun 21, 2024 · 0 comments

Comments

@selajdinbilali
Copy link

I need to get meta data from a file in S3.

Is there an easy way like FFprobe::fromDisk('s3') ?

I tried :

  • to open the file with ffmpeg but streams() accepts only string.
  • to create a temporaryUrl of Storage facade, but it's still unable to probe.

Thanks in advance for your help.

Previously it was easy because the file was in my filesystem :

        $ffprobe = FFProbe::create();
        $media_file = $ffprobe->streams($fullFilePath);
        $codec_type = $media_file->first()->get('codec_type');

        if ($codec_type === 'audio') {
            $codec_name = $media_file->audios()->first()->get('codec_name');
            if ($codec_name !== 'aac') {
                return 'Non valid audio codec, we only accept aac';
            }
        } else {
            $codec_name = $media_file->videos()->first()->get('codec_name');
            if ($codec_name !== 'h264') {
                return 'Non valid video codec, we only accept h264';
            }
        }
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

1 participant