Skip to content

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

Open
@selajdinbilali

Description

@selajdinbilali

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';
            }
        }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions