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)
46
46
return false ;
47
47
}
48
48
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
+
49
67
50
- $ ffprobe = FFMpeg \FFProbe::create ();
51
68
52
69
$ stream = $ ffprobe ->streams ($ file )->videos ()->first ()->all ();
53
70
$ format = $ ffprobe ->format ($ file )->all ();
Original file line number Diff line number Diff line change @@ -55,7 +55,7 @@ class Exiftool implements MapperInterface
55
55
const GPSLONGITUDE = 'GPS:GPSLongitude ' ;
56
56
const GPSALTITUDE = 'GPS:GPSAltitude ' ;
57
57
const IMGDIRECTION = 'GPS:GPSImgDirection ' ;
58
- const DESCRIPTION = 'IFD0 :ImageDescription ' ;
58
+ const DESCRIPTION = 'ExifIFD :ImageDescription ' ;
59
59
const MAKE = 'IFD0:Make ' ;
60
60
const LENS = 'ExifIFD:LensModel ' ;
61
61
const SUBJECT = 'XMP-dc:Subject ' ;
You can’t perform that action at this time.
0 commit comments