File tree Expand file tree Collapse file tree 2 files changed +19
-2
lines changed Expand file tree Collapse file tree 2 files changed +19
-2
lines changed Original file line number Diff line number Diff line change @@ -46,8 +46,25 @@ public function getExifFromFile($file)
4646 return false ;
4747 }
4848
49+ $ ffprobe = null ;
50+ try {
51+ // Let's try use the default paths
52+ // No need to call exec(..) which takes time and might
53+ // not be possible
54+ $ ffprobe = FFMpeg \FFProbe::create ();
55+ } catch (\Exception $ e ) {
56+ // Let's try to pass paths explicitly
57+ // @codeCoverageIgnoreStart
58+ $ path_ffmpeg = exec ('which ffmpeg ' );
59+ $ path_ffprobe = exec ('which ffprobe ' );
60+ $ ffprobe = FFMpeg \FFProbe::create (array (
61+ 'ffmpeg.binaries ' => $ path_ffmpeg ,
62+ 'ffprobe.binaries ' => $ path_ffprobe ,
63+ ));
64+ // @codeCoverageIgnoreEnd
65+ }
66+
4967
50- $ ffprobe = FFMpeg \FFProbe::create ();
5168
5269 $ stream = $ ffprobe ->streams ($ file )->videos ()->first ()->all ();
5370 $ format = $ ffprobe ->format ($ file )->all ();
Original file line number Diff line number Diff line change @@ -55,7 +55,7 @@ class Exiftool implements MapperInterface
5555 const GPSLONGITUDE = 'GPS:GPSLongitude ' ;
5656 const GPSALTITUDE = 'GPS:GPSAltitude ' ;
5757 const IMGDIRECTION = 'GPS:GPSImgDirection ' ;
58- const DESCRIPTION = 'IFD0 :ImageDescription ' ;
58+ const DESCRIPTION = 'ExifIFD :ImageDescription ' ;
5959 const MAKE = 'IFD0:Make ' ;
6060 const LENS = 'ExifIFD:LensModel ' ;
6161 const SUBJECT = 'XMP-dc:Subject ' ;
You can’t perform that action at this time.
0 commit comments