amk's avatar
Level 4

Unable to probe viedo file.Why?

    public function file(Request $request){
        
        $file = $request->file;
        $filename =  $file->getClientOriginalName();
        $file->move(public_path().'/videos',$filename);
        $ffprobe = \FFMpeg\FFProbe::create();;

        $duration = $ffprobe
           ->streams('/videos/'.$filename)
           ->videos()                   
           ->first()                  
           ->get('duration');
    dd($duration);

}

show error like that...

        try {
            $output = $this->ffprobe->command($commands);
        } catch (ExecutionFailureException $e) {
            throw new RuntimeException(sprintf('Unable to probe %s', $pathfile), $e->getCode(), $e);
        }
0 likes
2 replies
Snapey's avatar

this

 ->streams('/videos/'.$filename)

probably needs to be the full filesystem path?

Please or to participate in this conversation.